diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 735c8b4d..eeec6669 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -30,9 +30,12 @@ jobs:
- name: Cache Gradle packages
uses: actions/cache@v2
with:
- path: ~/.gradle/caches
- key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- restore-keys: ${{ runner.os }}-gradle
+ path: |
+ ~/.gradle/caches
+ ./.gradle/loom-caches
+ ~/.gradle/wrapper
+ key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }}
+ restore-keys: ${{ runner.os }}-gradle-
- name: Get short commit sha
id: get_short_sha
@@ -68,28 +71,33 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: ${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
- path: build/libs/
+ path: fabricWrapper/build/libs/
- - name: Create Github release
+ - name: Create Github Release
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
- repo_token: "${{ secrets.GITHUB_TOKEN }}"
- automatic_release_tag: "dev"
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ automatic_release_tag: dev-${{ github.run_number}}
prerelease: true
title: "[CI#${{ github.run_number}}]${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}"
files: |
LICENSE
- build/libs/*.jar
+ fabricWrapper/build/libs/*.jar
- - name: Publish realease to curseforge
- if: contains(github.event.head_commit.message, '[publish skip]') == false
+ - name: Update Github Release
+ uses: softprops/action-gh-release@v1
+ with:
+ tag_name: dev-${{ github.run_number}}
+ generate_release_notes: true
+
+ - name: Publish release to Curseforge
+ if: contains(github.event.head_commit.message, '[publish skip]') == false && contains(github.event.ref, 'refs/heads/exp') == false
uses: Kir-Antipov/mc-publish@v2.1
with:
curseforge-id: 478757
curseforge-token: ${{ secrets.CF_API_TOKEN }}
-
- files-primary: build/libs/!(*-@(dev|sources)).jar
- files-secondary: build/libs/*-@(dev|sources).jar
+ files-primary: fabricWrapper/build/libs/!(*-@(dev|sources)).jar
+ files-secondary: ''
name: ''
version: ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
@@ -141,9 +149,13 @@ jobs:
- name: Cache Gradle packages
uses: actions/cache@v2
with:
- path: ~/.gradle/caches
- key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- restore-keys: ${{ runner.os }}-gradle
+ path: |
+ ~/.gradle/caches
+ ./.gradle/loom-caches
+ ~/.gradle/wrapper
+ key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties', '**/*.accesswidener') }}
+ restore-keys: ${{ runner.os }}-gradle-
+
- name: Get short commit sha
id: get_short_sha
@@ -179,7 +191,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: ${{ steps.mod_name.outputs.value }} ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
- path: build/libs/
+ path: fabricWrapper/build/libs/
- name: Publish realease to curseforge
uses: Kir-Antipov/mc-publish@v2.1
@@ -187,8 +199,8 @@ jobs:
curseforge-id: 478757
curseforge-token: ${{ secrets.CF_API_TOKEN }}
- files-primary: build/libs/!(*-@(dev|sources)).jar
- files-secondary: build/libs/*-@(dev|sources).jar
+ files-primary: fabricWrapper/build/libs/!(*-@(dev|sources)).jar
+ files-secondary: ''
name: ''
version: ${{ steps.mod_version.outputs.value }}.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
diff --git a/.gitignore b/.gitignore
index 2a7e9b4d..95f594db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
.gradle/
build/
out/
+publish/
classes/
# eclipse
@@ -24,6 +25,10 @@ bin/
.classpath
.project
+# macos
+
+*.DS_Store
+
# fabric
-run/
\ No newline at end of file
+run/
diff --git a/LICENSE b/LICENSE
index e62ec04c..0a041280 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,674 +1,165 @@
-GNU GENERAL PUBLIC LICENSE
+ GNU LESSER 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
-.
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/README.md b/README.md
index 67bab9ac..3c9df738 100644
--- a/README.md
+++ b/README.md
@@ -1,418 +1 @@
-# TweakMyClient
-
-[![Minecraft](http://cf.way2muchnoise.eu/versions/Minecraft_478757_all.svg?badge_style=flat)](https://www.curseforge.com/minecraft/mc-mods/tweakmyclient/files)
-[![License](https://img.shields.io/github/license/Hendrix-Shen/Tweak-My-Client?label=License&style=flat-square)](https://github.com/Hendrix-Shen/Tweak-My-Client/blob/master/LICENSE)
-![Languages](https://img.shields.io/github/languages/top/Hendrix-Shen/Tweak-My-Client?style=flat-square)
-![Java-8~17](https://img.shields.io/badge/Java-8%20%7C%209%20%7C%2010%20%7C%2011%20%7C%2012%20%7C%2013%20%7C%2014%20%7C%2015%20%7C%2016%20%7C%2017-orange?style=flat-square)
-[![Issues](https://img.shields.io/github/issues/Hendrix-Shen/Tweak-My-Client?label=Issuess&style=flat-square)](https://github.com/Hendrix-Shen/Tweak-My-Client/issues)
-[![Pull Requests](https://img.shields.io/github/issues-pr/Hendrix-Shen/Tweak-My-Client?label=Pull%20Requests&style=flat-square)](https://github.com/Hendrix-Shen/Tweak-My-Client/pulls)
-[![Last build](https://img.shields.io/github/workflow/status/Hendrix-Shen/Tweak-My-Client/CI/dev?label=Last%20build&style=flat-square)](https://github.com/Hendrix-Shen/Tweak-My-Client/actions/workflows/CI.yml)
-[![Github Release](https://img.shields.io/github/v/release/Hendrix-Shen/Tweak-My-Client?label=Github%20Release&style=flat-square)](https://github.com/Hendrix-Shen/Tweak-My-Client/releases)
-[![Github Release Downloads](https://img.shields.io/github/downloads/Hendrix-Shen/Tweak-My-Client/total?label=Github%20Release%20Downloads&style=flat-square)](https://github.com/Hendrix-Shen/Tweak-My-Client/releases)
-[![CurseForge Downloads](http://cf.way2muchnoise.eu/478757.svg?badge_style=flat)](https://www.curseforge.com/minecraft/mc-mods/tweakmyclient)
-
-[中文](./README_ZH_CN.md)
-
-The default hotkey to open the in-game config GUI is **T + C**.
-
-## Dependencies (WIP)
-
-| Dependency | Type | Version | Download |
-|--------------------------|----------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------|
-| Auth Me | Compat | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/auth-me) | [Github](https://github.com/axieum/authme) |
-| In-Game Account Switcher | Compat | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/in-game-account-switcher) |
-| MagicLib | Required | \>=0.3.25 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/magiclib) | [Github](https://github.com/Hendrix-Shen/MagicLib) |
-| MaliLib | Required | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/malilib) | [Masa WebSite](https://masa.dy.fi/mcmods/client_mods/?mod=malilib) |
-| Litematica | Compat | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/litematica) | [Masa WebSite](https://masa.dy.fi/mcmods/client_mods/?mod=litematica) |
-| ReAuth (Fabric) | Compat | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/reauth-fabric) |
-
-## Config List (WIP)
-
-### Color
-
-### colorBlockOutside
-
-Custom block outside color.
-
-### colorGuiStart
-
-Custom gui gradient start color.
-
-### colorGuiStop
-
-Custom gui gradient stop color.
-
-### colorSidebarContent
-
-Custom sidebar content color.
-
-### colorSidebarTitle
-
-Custom sidebar title color.
-
-### colorWaterOpen
-
-openWaterHelper open water outline color.
-
-### colorWaterShallow
-
-openWaterHelper open shallow outline color.
-
-### Disable
-
-### disableAttackEntity
-
-Disable attacks on entities in the list.
-
-### disableClientBlockEvents
-
-Disable block event rendering (eg pistons animations).
-
-### disableClientEntityInListUpdates
-
-Disable entity updates in the list on the client.
-
-The priority of this setting is higher than the following:
-
-- `disableClientEntityTNTUpdates`
-- `disableClientEntityWitherUpdates`
-- `disableClientEntityZombieVillagerUpdates`
-
-### disableClientEntityTNTUpdates
-
-Disable TNT entity updates on the client.
-
-Maybe useful for TNT related machines.
-
-### disableClientEntityWitherUpdates
-
-Disable wither entity updates on the client.
-
-Maybe it's useful for fake peace.
-
-### disableClientEntityZombieVillagerUpdates
-
-Disable zombie villager entity updates on the client.
-
-Maybe it's useful for fake peace.
-
-### disableClientEntityInListRendering
-
-Disable rendering of entities in the list.
-
-The priority of this setting is higher than the following:
-
-- `disableEntityTNTRendering`
-- `disableEntityWitherRendering`
-- `disableEntityZombieVillagerRendering`
-
-### disableFovAffectedBySpeed
-
-Disable speed multiplier effect fov transform.
-
-### disableGuiShadowLayer
-
-Disable gui shadow overlay rendering when gui is opening.
-
-### disableItemGlowing
-
-Disable items with enchanted glowing effects.
-
-### disableRenderBossBar
-
-Disable boss bar rendering when player is near boss.
-
-You will gain a broader view.
-
-### disableRenderOverlayFire
-
-Disable fire overlay rendering when player is on fire.
-
-You will gain a broader view.
-
-### disableRenderOverlayPumpkin
-
-Disable mask overlay rendering when player is wearing pumpkin.
-
-You will gain a broader view.
-
-### disableRenderScoreboard
-
-Disable Scoreboard rendering.
-
-You will gain a broader view.
-
-### disableRenderToast
-
-Disable toast rendering.
-
-### disableSlowdown
-
-Cancels slowness effects caused by honey, soul sand and using items.
-
-### Generic
-
-### antiGhostBlocksAutoTriggerInterval
-
-How many seconds does antiGhostBlocks trigger automatically.
-
-### antiGhostBlocksManualTrigger
-
-Manually trigger antiGhostBlocks once.
-
-### antiGhostBlocksMode
-
-antiGhostBlocksMode working mode.
-
-### antiGhostItemsAutoTriggerInterval
-
-How many seconds does antiGhostItems trigger automatically.
-
-### antiGhostItemsManualTrigger
-
-Manually trigger antiGhostItems once.
-
-### antiGhostItemsMode
-
-antiGhostItemsMode working mode.
-
-### autoDropInterval
-
-How many ticks per interval to perform auto drop.
-
-### autoReconnectTimer
-
-How many seconds to wait for auto reconnection.
-
-### daylightOverrideTime
-
-The time set when overriding the client's world time.
-
-### customWindowTitle
-
-Modify current window title.
-
-The available placeholders are as follows:
-
-- {fabric_loader_asm_version}
-- {fabric_loader_version}
-- {fabric_mod_ver:}
-- {mc_fps}
-- {mc_protocol_version}
-- {mc_username}
-- {mc_version}
-- {tmc_version}
-- {tmc_version_type}
-
-### customWindowTitleWithActivity
-
-Modify the current window title with the current activity.
-
-The available placeholders are as follows:
-
-- {fabric_loader_asm_version}
-- {fabric_loader_version}
-- {fabric_mod_ver:}
-- {mc_activity}
-- {mc_fps}
-- {mc_protocol_version}
-- {mc_username}
-- {mc_version}
-- {tmc_version}
-- {tmc_version_type}
-
-### enderPortalRenderMode
-
-If `endPortalRendererFix` is enabled, the ender portal renders in the specified mode.
-
-The available modes are as follows:
-
-- Actual - Rendering the ender portal using its hit box.
-- Full - Rendering the ender portal as a full block.
-- Legacy - Rendering the ender portal with Minecraft 21w13a below.
-- Modern - Rendering the ender portal with Minecraft 21w13a and above.
-
-### getTargetBlockPosition
-
-Gets the position of the looking block.
-
-This feature is used to get the position of the farthest block you point to.
-
-### lowHealthThreshold
-
-Trigger threshold of low health warning.
-
-### memoryCleaner
-
-Force release memory.
-
-### openConfigGui
-
-A hotkey to open the in-game Config GUI.
-
-### targetBlockMaxTraceDistance
-
-Maximum line tracing distance of target block position.
-
-### targetBlockPositionFormat
-
-Position tracing format sent to public chat.
-
-### targetBlockPositionMode
-
-The block tracing position will be sent in this mode.
-
-- private - Only you can see
-- public - Send to public chat
-
-### Feature
-
-### featureAntiGhostBlocks
-
-send mining abort packets to allow the server to reply with the correct data.
-
-### featureAntiGhostItems
-
-Try to send false data to the server in order to get the correct player inventory data from the server.
-
-### featureAutoClimb
-
-When you are approaching the ladder / vine and raises your head, you will automatically climb.
-
-### featureAutoDrop
-
-Automatically drops unwanted items.
-
-### featureAutoReconnect
-
-Automatically reconnects when you disconnect from the server.
-
-Adaptive AuthMe, ReAuth and In-Game Account Switcher session validation.
-
-### featureAutoRespawn
-
-Automatically respawns you whenever you die.
-
-### featureCustomBlockOutsideColor
-
-Enable block outside color override.
-
-### featureCustomGuiBackgroundColor
-
-Enable gui background color override.
-
-### featureCustomSidebarBackgroundColor
-
-Enable sidebar background color override.
-
-### featureCustomWindowIcon
-
-Enable window icon override.
-
-You can define your own icons using the following resource pack namespace files:
-
-- tweakmyclient:icons/icon_16x16.png
-- tweakmyclient:icons/icon_32x32.png
-
-Note: You must reload the resource pack to apply the file changes.
-
-### featureCustomWindowTitle
-
-Enable window title override.
-
-### featureGlobalEventListener
-
-Print global event trigger coordinates.
-
-### featureDaylightOverride
-
-Override the client's world time to the daytime you want.
-
-### featureGetTargetBlockPosition
-
-Allow you get the position of the farthest block you point to.
-
-### featureLowHealthWarning
-
-When your health is too low, use action bar to send a warning message.
-
-### featureOpenWaterHelper
-
-Shows whether you are fishing in 'open water' and draws a box around the area used for the open water calculation.
-
-### featureUnfocusedCPU
-
-Will not render anything when your Minecraft window is not focused.
-
-### List
-
-### listAutoDropBlackList
-
-Auto drop item black list.
-
-All items in this list won't be auto dropped.
-
-### listAutoDropType
-
-Auto drop item list type.
-
-### listAutoDropWhiteList
-
-Auto drop item white list.
-
-All items in this list will be auto dropped.
-
-### listDisableAttackEntity
-
-Disable attack entity list.
-
-All entities in this list will not be attacked.
-
-### listDisableClientEntityUpdates
-
-Disable client entity updates list.
-
-All entities in this list will not be updated.
-
-### listDisableClientEntityRendering
-
-Disable client entity rendering list.
-
-All entities in this list will not be rendered.
-
-### listItemGlowing
-
-Disable items glowing list.
-
-All items in this list will not be glowed.
-
-### Patch
-
-### disableLitematicaEasyPlaceFailTip
-
-Disable easyPlace failure that annoying prompt window.
-
-Note: Takes effect only when litematica is loaded.
-
-### endPortalRendererFix
-
-Fixing the endPortal to only render materials at the top.
-
-### forceDebugInfoDetailed
-
-Always show full debug information, even if game rule reducedDebugInfo is true.
-
-
-### forcePistonWithoutAffectByTool
-
-The pickaxe will no longer be used as an effective mining tool for pistons.
-
-## Development
-
-### Mappings
-
-I am using the **Mojang official** mappings to de-obfuscate Minecraft and insert patches.
-
-## License
-
-This project is available under the GPLv3 license. Feel free to learn from it and incorporate it in your own projects.
\ No newline at end of file
+## fabric-mod-template
diff --git a/build.gradle b/build.gradle
index 3eabce01..522ba2b1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,138 +1,49 @@
plugins {
- id 'fabric-loom' version '0.11-SNAPSHOT'
- id 'io.github.juuxel.loom-quiltflower' version '1.6.1'
+ id("maven-publish")
+ id("fabric-loom").version("0.12-SNAPSHOT").apply(false)
+ // https://github.com/Juuxel/LoomQuiltflower
+ id("io.github.juuxel.loom-quiltflower").version("1.7.0").apply(false)
+ // https://github.com/ReplayMod/preprocessor
+ // https://github.com/Fallen-Breath/preprocessor
+ id("com.replaymod.preprocess").version("b7207cffa9")
+}
+
+preprocess {
+ def mc114 = createNode("1.14.4", 1_14_04, "mojang")
+ def mc115 = createNode("1.15.2", 1_15_02, "mojang")
+ def mc116 = createNode("1.16.5", 1_16_05, "mojang")
+ def mc117 = createNode("1.17.1", 1_17_01, "mojang")
+ def mc118 = createNode("1.18.2", 1_18_02, "mojang") // root
+ def mcSnapshot = createNode("snapshot", 1_19_00, "mojang")
+
+ mc114.link(mc115, null)
+ mc115.link(mc116, null)
+ mc116.link(mc117, null)
+ mc117.link(mc118, null)
+ mc118.link(mcSnapshot, null)
}
-def baseVersion = "${project.mod_version}" as String
def ENV = System.getenv()
+String realVersion = "${project.mod_version}"
if (ENV.BUILD_NUMBER) {
- baseVersion = baseVersion + '.' + ENV.BUILD_NUMBER
+ realVersion += ".${ENV.BUILD_NUMBER}"
} else {
- baseVersion = baseVersion + '.0'
+ realVersion += ".0"
}
if (ENV.COMMIT_SHA) {
- baseVersion = baseVersion + "+" + ENV.COMMIT_SHA
+ realVersion += "+${ENV.COMMIT_SHA}"
}
+
if (ENV.BUILD_TYPE) {
if (ENV.BUILD_TYPE == "RELEASE") {
- baseVersion = baseVersion + "-stable"
+ realVersion += "-stable"
} else if (ENV.BUILD_TYPE == "BETA") {
- baseVersion = baseVersion + "-beta"
+ realVersion += "-beta"
}
} else {
- baseVersion = baseVersion + "-dev"
-}
-
-version = baseVersion
-
-dependencies {
- minecraft("com.mojang:minecraft:${project.minecraft_version}")
- modCompileOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modCompileOnly("curse.maven:inGameAcountSwitcher-232676:${project.library_inGameAcountSwitcher_version}")
- modCompileOnly("curse.maven:malilib-303119:${project.library_malilib_version}")
- modCompileOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
- modCompileOnly("curse.maven:oauth-515054:${project.library_oauth_version}")
- modCompileOnly("curse.maven:reauth-403928:${project.library_reauth_version}")
-
- if (project.gradle.startParameter.projectDir != null &&
- !project.gradle.startParameter.projectDir.getName().startsWith("tweakmyclient-compat")) {
- modRuntimeOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modRuntimeOnly("curse.maven:inGameAcountSwitcher-232676:${project.library_inGameAcountSwitcher_version}")
- modRuntimeOnly("curse.maven:malilib-303119:${project.library_malilib_version}")
- modRuntimeOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
- modRuntimeOnly("curse.maven:oauth-515054:${project.library_oauth_version}")
- modRuntimeOnly("curse.maven:reauth-403928:${project.library_reauth_version}")
- modImplementation("curse.maven:modmenu-308702:${project.library_mod_menu_version}")
-
- runtimeOnly(fileTree(dir: "tweakmyclient-compat-mc1_16/build/devlibs", include: ["*-dev.jar"]))
- }
-
- subprojects.each {
- include(project("${it.name}:"))
- }
-}
-
-allprojects {
- apply plugin: 'fabric-loom'
- apply plugin: 'io.github.juuxel.loom-quiltflower'
-
- group = "${project.group}.${project.mod_id}" as String
- archivesBaseName = "${project.mod_id}"
-
- loom.runConfigs.configureEach {
- property('mixin.debug.export', 'true')
- }
-
- version = rootProject.version
- group = rootProject.group
-
- repositories {
- maven {
- url 'https://www.cursemaven.com/'
- }
- maven {
- url 'https://maven.hendrixshen.top'
- }
- }
-
- dependencies {
- mappings(loom.officialMojangMappings())
- modImplementation("net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}")
- modImplementation("top.hendrixshen.magiclib:magiclib:${project.library_magiclib_version}")
- modRuntimeOnly("curse.maven:lazydfu-433518:${project.library_lazydfu_version}")
- }
-
- loom {
- runs {
- client {
- runDir = "$project.name/run"
- }
- }
- }
-
- runClient {
- defaultCharacterEncoding = "UTF-8"
- }
-
- runServer {
- defaultCharacterEncoding = "UTF-8"
- }
-
- java {
- withSourcesJar()
- }
-
- tasks.withType(JavaCompile).configureEach {
- it.options.encoding = "UTF-8"
- it.sourceCompatibility = JavaVersion.VERSION_1_8
- it.targetCompatibility = JavaVersion.VERSION_1_8
- }
-
- processResources {
- inputs.property "version", rootProject.version
-
- filesMatching("fabric.mod.json") {
- include "fabric.mod.json"
- expand "mod_version": rootProject.version
- }
- }
-}
-
-subprojects {
- if (project.gradle.startParameter.taskNames.size() == 1 && project.gradle.startParameter.taskNames.get(0) == "runClient") {
- dependencies {
- modImplementation(rootProject)
- }
- } else {
- dependencies {
- implementation(rootProject)
- }
- }
-}
-
-jar {
- from("LICENSE")
+ realVersion += "-dev"
}
+version = realVersion
\ No newline at end of file
diff --git a/common.gradle b/common.gradle
new file mode 100644
index 00000000..0dec7a14
--- /dev/null
+++ b/common.gradle
@@ -0,0 +1,120 @@
+apply(plugin: "maven-publish")
+apply(plugin: "fabric-loom")
+apply(plugin: "io.github.juuxel.loom-quiltflower")
+apply(plugin: "com.replaymod.preprocess")
+
+int mcVersion = 1
+
+preprocess {
+ mcVersion = vars.get()["MC"]
+ tabIndentation = false
+}
+
+repositories {
+ maven {
+ url("https://www.cursemaven.com")
+ }
+
+ maven {
+ url("https://api.modrinth.com/maven")
+ }
+
+ maven {
+ url("https://maven.hendrixshen.top")
+ }
+
+ mavenCentral()
+ mavenLocal()
+}
+
+dependencies {
+ minecraft("com.mojang:minecraft:${project.minecraft_version}")
+ mappings(loom.officialMojangMappings())
+
+ modImplementation("top.hendrixshen:magiclib-${project.minecraft_version.replace(".", "_")}:${project.magiclib_version}") {
+ //If you want to use runClient task, you should remove this exclude setting.
+ exclude(group: "net.fabricmc.fabric-api", module: "fabric-api")
+ }
+ modImplementation("curse.maven:litematica-308892:${project.litematica_version}")
+ runtimeOnly(project(path: ":fabricWrapper"))
+}
+
+loom {
+ runConfigs.all {
+ property("mixin.debug.export", "true")
+ }
+
+ runClient {
+ defaultCharacterEncoding("UTF-8")
+ }
+
+ runServer {
+ defaultCharacterEncoding("UTF-8")
+ }
+}
+
+remapJar {
+ remapperIsolation = true
+}
+
+sourceCompatibility = JavaVersion.VERSION_1_8
+targetCompatibility = JavaVersion.VERSION_1_8
+
+archivesBaseName = project.archives_base_name + "-" + project.minecraft_version
+version = project.parent.version
+group = project.maven_group
+
+processResources {
+ outputs.upToDateWhen { false }
+
+ inputs.property("version", version)
+ filesMatching("fabric.mod.json") {
+ expand(["mod_version" : project.version,
+ "mod_id" : project.mod_id,
+ "mod_name" : project.mod_name,
+ "mod_homepage" : project.mod_homepage,
+ "mod_sources" : project.mod_sources,
+ "mod_license" : project.mod_license,
+ "minecraft_dependency": project.minecraft_dependency,
+ "minecraft_version_id": project.minecraft_version.replace(".", "_"),
+ "minecraft_version" : project.minecraft_version,
+ "magiclib_version" : project.magiclib_version
+ ])
+ }
+ println("assets/${project.mod_id}/lang/*.json")
+ filesMatching("assets/${project.mod_id}/lang/*.json") {
+ expand([
+ "mod_id" : project.mod_id,
+ "mod_name": project.mod_name,
+ ])
+ }
+}
+
+tasks.withType(JavaCompile) {
+ options.encoding = "UTF-8"
+}
+
+java {
+ withSourcesJar()
+}
+
+jar {
+ from("../../LICENSE")
+}
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifactId = "${project.mod_id}-${project.minecraft_version.replace(".", "_")}"
+ version = project.version
+ from(components.java)
+ }
+ }
+
+ repositories {
+ mavenLocal()
+ maven {
+ url("$rootDir/publish")
+ }
+ }
+}
diff --git a/fabricWrapper/build.gradle b/fabricWrapper/build.gradle
new file mode 100644
index 00000000..657bbd99
--- /dev/null
+++ b/fabricWrapper/build.gradle
@@ -0,0 +1,82 @@
+plugins {
+ id('java-library')
+}
+apply(plugin: "maven-publish")
+
+sourceCompatibility = JavaVersion.VERSION_1_8
+targetCompatibility = JavaVersion.VERSION_1_8
+
+archivesBaseName = project.archives_base_name
+version = project.parent.version
+group = project.maven_group
+
+
+def fabric_subprojects = project.parent.subprojects.findAll({
+ it.name != "fabricWrapper"
+})
+
+fabric_subprojects.collect {
+ evaluationDependsOn(":${it.name}")
+}
+
+jar {
+ // disable cache
+ outputs.upToDateWhen { false }
+ dependsOn(fabric_subprojects.collect {
+ it.tasks.remapJar
+ })
+
+ doFirst {
+ delete fileTree("build/tmp/submods/META-INF/jars")
+ copy {
+ from {
+ fabric_subprojects.collect {
+ it.remapJar.outputs.files
+ }
+ }
+ into("build/tmp/submods/META-INF/jars")
+ }
+ }
+
+ from("../LICENSE")
+ from("build/tmp/submods")
+}
+
+import groovy.json.JsonBuilder
+
+processResources {
+ // disable cache
+ outputs.upToDateWhen { false }
+ var jars = []
+ fabric_subprojects.each({
+ jars.add(["file": "META-INF/jars/${project.archives_base_name}-${it.minecraft_version}-${project.version}.jar"])
+ })
+ filesMatching("fabric.mod.json") {
+ expand(["mod_version" : project.version,
+ "mod_id" : project.mod_id,
+ "mod_name" : project.mod_name,
+ "mod_homepage": project.mod_homepage,
+ "mod_sources" : project.mod_sources,
+ "mod_license" : project.mod_license,
+ "magiclib_version": project.magiclib_version,
+ "sub_jars" : new JsonBuilder(jars).toPrettyString(),
+ ])
+ }
+}
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifactId = project.mod_id
+ version = project.version
+ from(components.java)
+ }
+ }
+
+ repositories {
+ mavenLocal()
+ maven {
+ url("$rootDir/publish")
+ }
+ }
+}
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icon.png b/fabricWrapper/src/main/resources/assets/tweakmyclient/icon.png
similarity index 100%
rename from tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icon.png
rename to fabricWrapper/src/main/resources/assets/tweakmyclient/icon.png
diff --git a/fabricWrapper/src/main/resources/fabric.mod.json b/fabricWrapper/src/main/resources/fabric.mod.json
new file mode 100644
index 00000000..602fd357
--- /dev/null
+++ b/fabricWrapper/src/main/resources/fabric.mod.json
@@ -0,0 +1,35 @@
+{
+ "schemaVersion": 1,
+ "id": "${mod_id}",
+ "version": "${mod_version}",
+ "icon": "assets/${mod_id}/icon.png",
+ "name": "${mod_name}",
+ "description": "${mod_name}",
+ "authors": [
+ {
+ "name": "Hendrix_Shen",
+ "contact": {
+ "homepage": "https://github.com/Hendrix-Shen"
+ }
+ }
+ ],
+ "contact": {
+ "homepage": "${mod_homepage}",
+ "issues": "${mod_sources}/issues",
+ "sources": "${mod_sources}"
+ },
+ "license": "${mod_license}",
+ "environment": "client",
+ "entrypoints": {
+ "modmenu": [
+ "top.hendrixshen.tweakmyclient.compat.modmenu.WrapperModMenuApiImpl"
+ ]
+ },
+ "depends": {
+ "magiclib": ">=${magiclib_version}"
+ },
+ "custom": {
+ "modmenu:clientsideOnly": true
+ },
+ "jars": ${sub_jars}
+}
diff --git a/gradle.properties b/gradle.properties
index da698d4d..57d24192 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,35 +1,19 @@
# Gradle properties
-org.gradle.jvmargs=-Xmx4G
+org.gradle.jvmargs=-Xmx6G
-# Mod reference
-author=Hendrix-Shen
-group=top.hendrixshen
+# Mod Properties
mod_id=tweakmyclient
mod_name=Tweak My Client
-mod_version=2.0
+mod_homepage=https://www.curseforge.com/minecraft/mc-mods/tweakmyclient
+mod_license=LGPLv3
+mod_sources=https://github.com/Hendrix-Shen/Tweak-My-Client
+mod_version=3.0
+maven_group=top.hendrixshen
+archives_base_name=TweakMyClient
# Development Environment
-fabric_loader_version=0.13.3
-minecraft_version=1.16.5
+loader_version=0.13.3
-# Compatible Libraries
-# MagicLib - 0.3.24
-library_magiclib_version=0.3.24
-# MaLiLib - 0.10.0-dev.21+arne.8
-library_malilib_version=3542536
-# Mod Menu - 1.16.22
-library_mod_menu_version=3479748
-
-# Runtime Libraries - Only for development environment
-# Auth Me - 2.1.0
-library_authme_version=3554693
-# In-Game Account Switcher - 7.1.3
-library_inGameAcountSwitcher_version=3493810
-# LazyDFU 0.1.3
-library_lazydfu_version=3209972
-# Litematica - 0.0.0-dev.20210612.170003
-library_litematica_version=3349118
-# OAuth - 1.0
-library_oauth_version=3566331
-# ReAuth - 3.9.3
-library_reauth_version=3105780
+# Required Libraries
+# MagicLib - 0.5.19
+magiclib_version=0.5.19
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index fbdc47ca..fe377964 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
\ No newline at end of file
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
\ No newline at end of file
diff --git a/gradlew b/gradlew
index cccdd3d5..1b6c7873 100644
--- a/gradlew
+++ b/gradlew
@@ -1,78 +1,129 @@
-#!/usr/bin/env sh
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
##############################################################################
-##
-## Gradle start up script for UN*X
-##
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
##############################################################################
# Attempt to set APP_HOME
+
# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
+APP_BASE_NAME=${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=""
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
+MAX_FD=maximum
warn () {
echo "$*"
-}
+} >&2
die () {
echo
echo "$*"
echo
exit 1
-}
+} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
+ JAVACMD=$JAVA_HOME/jre/sh/java
else
- JAVACMD="$JAVA_HOME/bin/java"
+ JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
- JAVACMD="java"
+ 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
@@ -89,84 +140,95 @@ 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
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
fi
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
fi
- i=$((i+1))
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
fi
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
+# Collect all arguments for the java command;
+# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
+# shell script including quotes and variable substitutions, so put them in
+# double quotes to make sure that they get re-expanded; and
+# * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index f9553162..107acd32 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,3 +1,19 @@
+@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
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,28 +64,14 @@ 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%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/settings.gradle b/settings.gradle
index 93bd0654..eda72677 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,25 +1,46 @@
pluginManagement {
repositories {
maven {
- name = 'Fabric'
- url = 'https://maven.fabricmc.net/'
+ name("Fabric")
+ url("https://maven.fabricmc.net")
}
maven {
- name = 'Cotton'
- url = 'https://server.bbkr.space/artifactory/libs-release/'
+ name("Jitpack")
+ url("https://jitpack.io")
}
+ maven {
+ name("Cotton")
+ url("https://server.bbkr.space/artifactory/libs-release")
+ }
+ mavenCentral()
gradlePluginPortal()
}
+ resolutionStrategy {
+ eachPlugin {
+ switch (requested.id.id) {
+ case "com.replaymod.preprocess": {
+ useModule("com.github.Fallen-Breath:preprocessor:${requested.version}")
+ }
+ }
+ }
+ }
}
-rootProject.name = "tweakmyclient"
+def versions = Arrays.asList(
+ "1.14.4",
+ "1.15.2",
+ "1.16.5",
+ "1.17.1",
+ "1.18.2",
+ //"snapshot",
+)
+
+for (String version : versions) {
+ include(":$version")
-if (!(gradle.startParameter.taskNames.size() == 1 && gradle.startParameter.taskNames.get(0) == "runClient") ||
- (gradle.startParameter.projectDir != null && gradle.startParameter.projectDir.getName().startsWith("tweakmyclient-compat"))) {
- include "tweakmyclient-compat-mc1_14"
- include "tweakmyclient-compat-mc1_15"
- include "tweakmyclient-compat-mc1_16"
- include "tweakmyclient-compat-mc1_17"
- include "tweakmyclient-compat-mc1_18"
- include "tweakmyclient-compat-mc1_19"
+ def proj = project(":$version")
+ proj.projectDir = file("versions/$version")
+ proj.buildFileName = "../../common.gradle"
}
+
+include(":fabricWrapper")
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClient.java b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClient.java
index f68432c7..8888bdbd 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClient.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClient.java
@@ -1,21 +1,22 @@
package top.hendrixshen.tweakmyclient;
-import net.fabricmc.api.ModInitializer;
+//#if MC >= 11600
+import fi.dy.masa.malilib.event.RenderEventHandler;
+//#endif
+import net.fabricmc.api.ClientModInitializer;
import net.minecraft.client.Minecraft;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import top.hendrixshen.magiclib.config.ConfigHandler;
-import top.hendrixshen.magiclib.config.ConfigManager;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
+import top.hendrixshen.tweakmyclient.config.ConfigHandler;
import top.hendrixshen.tweakmyclient.config.Configs;
+//#if MC >= 11600
+import top.hendrixshen.tweakmyclient.event.RenderHandler;
+//#endif
-public class TweakMyClient implements ModInitializer {
+public class TweakMyClient implements ClientModInitializer {
private static final Logger logger = LogManager.getLogger(TweakMyClientReference.getModId());
private static final Minecraft minecraftClient = Minecraft.getInstance();
- public static ConfigManager cm = ConfigManager.get(TweakMyClientReference.getModId());
-
public static Minecraft getMinecraftClient() {
return minecraftClient;
}
@@ -24,21 +25,15 @@ public static Logger getLogger() {
return logger;
}
- @Dependencies(
- or = {
- @Dependency(value = "minecraft", versionPredicate = "1.14.4"),
- @Dependency(value = "minecraft", versionPredicate = "1.15.2"),
- @Dependency(value = "minecraft", versionPredicate = "1.16.5"),
- @Dependency(value = "minecraft", versionPredicate = "1.17.1"),
- @Dependency(value = "minecraft", versionPredicate = "1.18.2"),
- @Dependency(value = "minecraft", versionPredicate = "1.19.x"),
- }
- )
@Override
- public void onInitialize() {
- cm.parseConfigClass(Configs.class);
- ConfigHandler.register(new ConfigHandler(TweakMyClientReference.getModId(), cm, TweakMyClientReference.getConfigVersion(), null, null));
- Configs.initCallbacks(cm);
+ public void onInitializeClient() {
+ ConfigHandler configHandler = TweakMyClientReference.getConfigHandler();
+ configHandler.configManager.parseConfigClass(Configs.class);
+ ConfigHandler.register(configHandler);
+ Configs.initCallbacks(configHandler.configManager);
+ //#if MC >= 11600
+ RenderEventHandler.getInstance().registerWorldLastRenderer(RenderHandler.getInstance());
+ //#endif
logger.info("[{}]: Mod initialized - Version: {} ({})", TweakMyClientReference.getModName(), TweakMyClientReference.getModVersion(), TweakMyClientReference.getModVersionType());
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientConfigGui.java b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientConfigGui.java
index 2eafb7c4..738b11eb 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientConfigGui.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientConfigGui.java
@@ -1,19 +1,15 @@
package top.hendrixshen.tweakmyclient;
-import fi.dy.masa.malilib.util.StringUtils;
import top.hendrixshen.magiclib.config.ConfigManager;
import top.hendrixshen.magiclib.gui.ConfigGui;
import top.hendrixshen.tweakmyclient.config.ConfigCategory;
+import top.hendrixshen.tweakmyclient.util.StringUtil;
public class TweakMyClientConfigGui extends ConfigGui {
- private static final TweakMyClientConfigGui INSTANCE;
+ private final static TweakMyClientConfigGui INSTANCE = new TweakMyClientConfigGui(TweakMyClientReference.getModId(), ConfigCategory.GENERIC, TweakMyClientReference.getConfigHandler().configManager);
public TweakMyClientConfigGui(String identifier, String defaultTab, ConfigManager configManager) {
- super(identifier, defaultTab, configManager, StringUtils.translate("tweakmyclient.gui.title", TweakMyClientReference.getModVersion(), StringUtils.translate(String.format("tweakmyclient.misc.versionType.%s", TweakMyClientReference.getModVersionType()))));
- }
-
- static {
- INSTANCE = new TweakMyClientConfigGui(TweakMyClientReference.getModId(), ConfigCategory.GENERIC, TweakMyClient.cm);
+ super(identifier, defaultTab, configManager, () -> StringUtil.tr("gui.title", TweakMyClientReference.getModVersion(), StringUtil.tr(String.format("misc.versionType.%s", TweakMyClientReference.getModVersionType()))));
}
public static TweakMyClientConfigGui getInstance() {
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientMixinPlugin.java b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientMixinPlugin.java
index 6400f022..4ac18fa6 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientMixinPlugin.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientMixinPlugin.java
@@ -1,6 +1,6 @@
package top.hendrixshen.tweakmyclient;
-import top.hendrixshen.magiclib.dependency.mixin.MagicMixinPlugin;
+import top.hendrixshen.magiclib.MagicMixinPlugin;
public class TweakMyClientMixinPlugin extends MagicMixinPlugin {
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientReference.java b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientReference.java
index b98c6567..1ccdf27f 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientReference.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientReference.java
@@ -1,7 +1,9 @@
package top.hendrixshen.tweakmyclient;
import net.fabricmc.loader.api.FabricLoader;
+import top.hendrixshen.magiclib.config.ConfigManager;
import top.hendrixshen.magiclib.util.FabricUtil;
+import top.hendrixshen.tweakmyclient.config.ConfigHandler;
import top.hendrixshen.tweakmyclient.util.VersionParser;
public class TweakMyClientReference {
@@ -10,13 +12,37 @@ public class TweakMyClientReference {
private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);
+ //#if MC > 11802
+ //$$ private static final String CURRENT_MOD_ID = String.format("%s-snapshot", MOD_ID);
+ //#elseif MC > 11701
+ private static final String CURRENT_MOD_ID = String.format("%s-1_18_2", MOD_ID);
+ //#elseif MC > 11605
+ //$$ private static final String CURRENT_MOD_ID = String.format("%s-1_17_1", MOD_ID);
+ //#elseif MC > 11502
+ //$$ private static final String CURRENT_MOD_ID = String.format("%s-1_16_5", MOD_ID);
+ //#elseif MC > 11404
+ //$$ private static final String CURRENT_MOD_ID = String.format("%s-1_15_2", MOD_ID);
+ //#else
+ //$$ private static final String CURRENT_MOD_ID = String.format("%s-1_14_4", MOD_ID);
+ //#endif
+
private static final int CONFIG_VERSION = 1;
+ private static final ConfigManager CONFIG_MANAGER = ConfigManager.get(MOD_ID);
+ private static final ConfigHandler CONFIG_HANDLER = new ConfigHandler(MOD_ID, CONFIG_MANAGER, CONFIG_VERSION);
public static boolean isAuthMeLoaded = FabricUtil.isModLoaded("authme");
public static boolean isInGameAccountSwitcherLoaded = FabricUtil.isModLoaded("ias");
public static boolean isReAuthLoaded = FabricUtil.isModLoaded("reauth");
public static boolean isOauthLoaded = FabricUtil.isModLoaded("oauth-fabric");
+ public static ConfigHandler getConfigHandler() {
+ return CONFIG_HANDLER;
+ }
+
+ public static String getCurrentModId() {
+ return CURRENT_MOD_ID;
+ }
+
public static String getModId() {
return MOD_ID;
}
@@ -32,8 +58,4 @@ public static String getModVersion() {
public static String getModVersionType() {
return MOD_VERSION_TYPE;
}
-
- public static int getConfigVersion() {
- return CONFIG_VERSION;
- }
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
new file mode 100644
index 00000000..6b443775
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
@@ -0,0 +1,21 @@
+package top.hendrixshen.tweakmyclient.compat.modmenu;
+
+import top.hendrixshen.magiclib.compat.modmenu.ModMenuCompatApi;
+import top.hendrixshen.tweakmyclient.TweakMyClientConfigGui;
+import top.hendrixshen.tweakmyclient.TweakMyClientReference;
+
+public class ModMenuApiImpl implements ModMenuCompatApi {
+ @Override
+ public ConfigScreenFactoryCompat> getConfigScreenFactoryCompat() {
+ return (screen) -> {
+ TweakMyClientConfigGui gui = TweakMyClientConfigGui.getInstance();
+ gui.setParentGui(screen);
+ return gui;
+ };
+ }
+
+ @Override
+ public String getModIdCompat() {
+ return TweakMyClientReference.getCurrentModId();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/WrapperModMenuApiImpl.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/WrapperModMenuApiImpl.java
new file mode 100644
index 00000000..3739c441
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/WrapperModMenuApiImpl.java
@@ -0,0 +1,10 @@
+package top.hendrixshen.tweakmyclient.compat.modmenu;
+
+import top.hendrixshen.tweakmyclient.TweakMyClientReference;
+
+public class WrapperModMenuApiImpl extends ModMenuApiImpl {
+ @Override
+ public String getModIdCompat() {
+ return TweakMyClientReference.getModId();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatApi.java
deleted file mode 100644
index 68f88973..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatApi.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-public abstract class SharedConstantCompatApi {
- protected static SharedConstantCompatApi INSTANCE;
-
- public static SharedConstantCompatApi getInstance() {
- return INSTANCE;
- }
-
- public abstract int getProtocolVersion();
-
- public abstract String getCurrentVersionName();
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatApi.java
deleted file mode 100644
index 9d2e9a95..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatApi.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import com.mojang.blaze3d.platform.Window;
-
-public abstract class WindowCompatApi {
- protected static WindowCompatApi INSTANCE;
-
- public static WindowCompatApi getInstance() {
- return INSTANCE;
- }
-
- public abstract void resetTitle();
-
- public abstract Window getWindow();
-
- public abstract void setTitle(long window, String title);
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatApi.java
deleted file mode 100644
index ab084b66..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatApi.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-
-public abstract class EntityCompatApi {
- protected static EntityCompatApi INSTANCE;
-
- public static EntityCompatApi getInstance() {
- return INSTANCE;
- }
-
- public abstract boolean onClimbable(LivingEntity entity);
-
- public abstract boolean isCrouching(LivingEntity entity);
-
- public abstract float getXRot(Entity entity);
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatApi.java
deleted file mode 100644
index 3df83aaa..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatApi.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.client.multiplayer.MultiPlayerGameMode;
-import net.minecraft.world.entity.player.Inventory;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.inventory.ClickType;
-
-public abstract class PlayerCompatApi {
- protected static PlayerCompatApi INSTANCE;
-
- public static PlayerCompatApi getInstance() {
- return INSTANCE;
- }
-
- public abstract Inventory getInventory(Player player);
-
- public abstract void handleInventoryMouseClick(MultiPlayerGameMode inventory, int containerId, int slot, int button, ClickType clickType, Player player);
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatApi.java
deleted file mode 100644
index 3cd8abc2..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatApi.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.parser;
-
-import net.minecraft.world.item.ItemStack;
-
-public abstract class ItemStackCompatApi {
- protected static ItemStackCompatApi INSTANCE;
-
- public static ItemStackCompatApi getInstance() {
- return INSTANCE;
- }
-
- public abstract ItemStack toItemStack(String string);
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatApi.java
deleted file mode 100644
index c08dbb0e..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatApi.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.render;
-
-import com.mojang.blaze3d.vertex.BufferBuilder;
-
-public abstract class BufferBuilderCompatApi {
- protected static BufferBuilderCompatApi INSTANCE;
-
- public static BufferBuilderCompatApi getInstance() {
- return INSTANCE;
- }
-
- public abstract void beginGLLines(BufferBuilder bufferBuilder);
-
- public abstract void compat_1_17_above();
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenApi.java
deleted file mode 100644
index 9cd7a8e9..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenApi.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.client.multiplayer.ServerData;
-
-public abstract class ConnectionCompatScreenApi {
- protected static ConnectionCompatScreenApi INSTANCE;
-
- public static ConnectionCompatScreenApi getInstance() {
- return INSTANCE;
- }
-
- public abstract void startConnect(Screen parent, Minecraft minecraft, ServerData serverData);
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatApi.java b/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatApi.java
deleted file mode 100644
index fbf11f7c..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatApi.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-
-public abstract class ScreenCompatApi {
- protected static ScreenCompatApi INSTANCE;
-
- public static ScreenCompatApi getInstance() {
- return INSTANCE;
- }
-
- public abstract Button addButton(Screen screen, Button button);
-
- public abstract Button createButton(int x, int y, int width, int height, String message, Button.OnPress onPress);
-
- public abstract void setButtonMessage(Button button, String message);
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/config/ConfigHandler.java b/src/main/java/top/hendrixshen/tweakmyclient/config/ConfigHandler.java
new file mode 100644
index 00000000..fc4778ee
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/config/ConfigHandler.java
@@ -0,0 +1,19 @@
+package top.hendrixshen.tweakmyclient.config;
+
+import top.hendrixshen.magiclib.config.ConfigManager;
+import top.hendrixshen.tweakmyclient.helper.ListCache;
+import top.hendrixshen.tweakmyclient.util.StringUtil;
+
+public class ConfigHandler extends top.hendrixshen.magiclib.config.ConfigHandler {
+ public ConfigHandler(String modId, ConfigManager configManager, int configVersion) {
+ super(modId, configManager, configVersion);
+ }
+
+ @Override
+ public void load() {
+ super.load();
+ ListCache.itemAutoDropBlackList = StringUtil.getItemStackSets(Configs.listAutoDropBlackList);
+ ListCache.itemAutoDropWhiteList = StringUtil.getItemStackSets(Configs.listAutoDropWhiteList);
+ ListCache.itemGlowingBlacklist = StringUtil.getItemStackSets(Configs.listItemGlowingBlacklist);
+ }
+}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/config/Configs.java b/src/main/java/top/hendrixshen/tweakmyclient/config/Configs.java
index 7bd2cfc9..e95f6f31 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/config/Configs.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/config/Configs.java
@@ -1,7 +1,6 @@
package top.hendrixshen.tweakmyclient.config;
import com.google.common.collect.Lists;
-import fi.dy.masa.malilib.config.IConfigOptionListEntry;
import fi.dy.masa.malilib.config.options.ConfigHotkey;
import fi.dy.masa.malilib.util.Color4f;
import fi.dy.masa.malilib.util.StringUtils;
@@ -42,7 +41,7 @@ public class Configs {
public static int daylightOverrideTime = 6000;
@Config(category = ConfigCategory.GENERIC)
- public static IConfigOptionListEntry enderPortalRenderMode = EnderPortalRenderMode.ACTUAL;
+ public static EnderPortalRenderMode enderPortalRenderMode = EnderPortalRenderMode.ACTUAL;
@Hotkey()
@Config(category = ConfigCategory.GENERIC)
@@ -76,7 +75,7 @@ public class Configs {
public static String targetBlockPositionFormat = "I'm looking at [x: {X},y: {Y}, z: {Z}]";
@Config(category = ConfigCategory.GENERIC)
- public static IConfigOptionListEntry targetBlockPositionPrintMode = TargetBlockPositionPrintMode.PRIVATE;
+ public static TargetBlockPositionPrintMode targetBlockPositionPrintMode = TargetBlockPositionPrintMode.PRIVATE;
// Patch configs
@Config(category = ConfigCategory.PATCH, dependencies = @Dependencies(and = @Dependency(value = "litematica"), not = @Dependency(value = "ommc", versionPredicate = ">=2.0.6")))
@@ -96,7 +95,7 @@ public class Configs {
public static ArrayList listAutoDropBlackList = Lists.newArrayList("minecraft:bow", "minecraft:crossbow", "minecraft:diamond_axe", "minecraft:diamond_boots", "minecraft:diamond_chestplate", "minecraft:diamond_helmet", "minecraft:diamond_hoe", "minecraft:diamond_leggings", "minecraft:diamond_pickaxe", "minecraft:diamond_shovel", "minecraft:diamond_sword", "minecraft:elytra", "minecraft:enchanted_golden_apple", "minecraft:flint_and_steel", "minecraft:fishing_rod", "minecraft:golden_apple", "minecraft:golden_axe", "minecraft:golden_boots", "minecraft:golden_chestplate", "minecraft:golden_helmet", "minecraft:golden_hoe", "minecraft:golden_leggings", "minecraft:golden_pickaxe", "minecraft:golden_shovel", "minecraft:golden_sword", "minecraft:iron_axe", "minecraft:iron_boots", "minecraft:iron_chestplate", "minecraft:iron_helmet", "minecraft:iron_hoe", "minecraft:iron_leggings", "minecraft:iron_pickaxe", "minecraft:iron_shovel", "minecraft:iron_sword", "minecraft:netherite_axe", "minecraft:netherite_boots", "minecraft:netherite_chestplate", "minecraft:netherite_helmet", "minecraft:netherite_hoe", "minecraft:netherite_leggings", "minecraft:netherite_pickaxe", "minecraft:netherite_shovel", "minecraft:netherite_sword", "minecraft:shears", "minecraft:shield", "minecraft:totem_of_undying", "minecraft:trident", "minecraft:turtle_helmet");
@Config(category = ConfigCategory.LIST)
- public static IConfigOptionListEntry listAutoDropType = AutoDropListType.WHITELIST;
+ public static AutoDropListType listAutoDropType = AutoDropListType.WHITELIST;
@Config(category = ConfigCategory.LIST)
public static ArrayList listAutoDropWhiteList = Lists.newArrayList("minecraft:stone", "minecraft:dirt", "minecraft:cobblestone", "minecraft:gravel", "minecraft:rotten_flesh");
@@ -280,7 +279,7 @@ public class Configs {
public static void initCallbacks(ConfigManager cm) {
// Set callback for all BooleanHotkeyed config.
/* TODO
- Old MagicLib impl
+ Legacy MagicLib impl
cm.forEach(
iConfigBase -> {
if (iConfigBase instanceof ConfigBooleanHotkeyed) {
@@ -296,16 +295,12 @@ public static void initCallbacks(ConfigManager cm) {
syncInventory.getKeybind().setCallback(CallBacks::syncInventoryCallback);
syncBlocks.getKeybind().setCallback(CallBacks::syncBlocksCallback);
syncBlocks.getKeybind().setCallback(CallBacks::syncBlocksCallback);
+
cm.setValueChangeCallback("customWindowTitle", CallBacks::featureCustomWindowTitleCallback);
cm.setValueChangeCallback("customWindowTitleWithActivity", CallBacks::featureCustomWindowTitleCallback);
- // List config callbacks.
- cm.setValueChangeCallback("listAutoDropBlackList", CallBacks::listAutoDropBlackListCallback);
- cm.setValueChangeCallback("listAutoDropWhiteList", CallBacks::listAutoDropWhiteListCallback);
- cm.setValueChangeCallback("listItemGlowingBlacklist", CallBacks::listItemGlowingBlacklistCallback);
-
// Feature config callbacks. customWindowTitleWithActivity
- cm.setValueChangeCallback("featureCustomWindowIcon", option -> CustomWindowUtil.updateIcon(((IMinecraft) TweakMyClient.getMinecraftClient()).getWindow()));
+ cm.setValueChangeCallback("featureCustomWindowIcon", option -> CustomWindowUtil.updateIcon(((IMinecraft) TweakMyClient.getMinecraftClient()).tmc$getWindow()));
cm.setValueChangeCallback("featureCustomWindowTitle", CallBacks::featureCustomWindowTitleCallback);
// Disable config callbacks.
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/event/CallBacks.java b/src/main/java/top/hendrixshen/tweakmyclient/event/CallBacks.java
index bf1c1b7f..9c7e78f1 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/event/CallBacks.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/event/CallBacks.java
@@ -1,5 +1,6 @@
package top.hendrixshen.tweakmyclient.event;
+import fi.dy.masa.malilib.config.options.ConfigStringList;
import fi.dy.masa.malilib.gui.GuiBase;
import fi.dy.masa.malilib.hotkeys.IKeybind;
import fi.dy.masa.malilib.hotkeys.KeyAction;
@@ -42,12 +43,16 @@ public static boolean getTargetBlockPositionCallback(KeyAction keyAction, IKeybi
str = str.replace("{Y}", String.format("%d", blockPos.getY()));
str = str.replace("{Z}", String.format("%d", blockPos.getZ()));
if (minecraft.player != null) {
- switch ((TargetBlockPositionPrintMode) Configs.targetBlockPositionPrintMode) {
+ switch (Configs.targetBlockPositionPrintMode) {
case PUBLIC:
minecraft.player.chat(str);
break;
case PRIVATE:
+ //#if MC >= 11600
minecraft.player.connection.handleChat(new ClientboundChatPacket(new TextComponent(str), ChatType.CHAT, minecraft.player.getUUID()));
+ //#else
+ //$$ minecraft.player.connection.handleChat(new ClientboundChatPacket(new TextComponent(str), ChatType.CHAT));
+ //#endif
break;
}
}
@@ -129,20 +134,9 @@ public static void featureCustomWindowTitleCallback(Option option) {
}
public static boolean openConfigGuiCallback(KeyAction keyAction, IKeybind keybind) {
- GuiBase.openGui(TweakMyClientConfigGui.getInstance());
+ TweakMyClientConfigGui tweakMyClientConfigGui = TweakMyClientConfigGui.getInstance();
+ tweakMyClientConfigGui.setParentGui(TweakMyClient.getMinecraftClient().screen);
+ TweakMyClient.getMinecraftClient().setScreen(tweakMyClientConfigGui);
return true;
}
-
- public static void listAutoDropBlackListCallback(Option option) {
- ListCache.itemAutoDropBlackList = StringUtil.getItemStackSets(Configs.listAutoDropBlackList);
- }
-
- public static void listAutoDropWhiteListCallback(Option option) {
- ListCache.itemAutoDropWhiteList = StringUtil.getItemStackSets(Configs.listAutoDropWhiteList);
- }
-
- public static void listItemGlowingBlacklistCallback(Option option) {
- ListCache.itemGlowingBlacklist = StringUtil.getItemStackSets(Configs.listItemGlowingBlacklist);
-
- }
}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java b/src/main/java/top/hendrixshen/tweakmyclient/event/RenderHandler.java
similarity index 68%
rename from tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
rename to src/main/java/top/hendrixshen/tweakmyclient/event/RenderHandler.java
index 0b020d94..9628ec63 100644
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/event/RenderHandler.java
@@ -1,13 +1,18 @@
-package top.hendrixshen.tweakmyclient.compat.event;
+package top.hendrixshen.tweakmyclient.event;
+//#if MC >= 11600
import com.mojang.blaze3d.vertex.PoseStack;
+//#if MC > 11600
import com.mojang.math.Matrix4f;
+//#endif
import fi.dy.masa.malilib.interfaces.IRenderer;
import net.minecraft.client.Minecraft;
import top.hendrixshen.tweakmyclient.TweakMyClient;
import top.hendrixshen.tweakmyclient.config.Configs;
import top.hendrixshen.tweakmyclient.util.render.OverlayRenderer;
+//#endif
+//#if MC >= 11600
public class RenderHandler implements IRenderer {
private static final RenderHandler INSTANCE = new RenderHandler();
private final Minecraft minecraft;
@@ -21,9 +26,16 @@ public static RenderHandler getInstance() {
}
@Override
- public void onRenderWorldLast(PoseStack matrixStack, Matrix4f projMatrix) {
+ //#if MC >= 11700
+ public void onRenderWorldLast(PoseStack poseStack, Matrix4f matrix4f) {
+ //#else
+ //$$ public void onRenderWorldLast(float partialTicks, PoseStack poseStack) {
+ //#endif
if (Configs.featureOpenWaterHelper) {
OverlayRenderer.getInstance().renderOpenWater(minecraft);
}
}
+//#else
+//$$ public class RenderHandler {
+//#endif
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IMinecraft.java b/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IMinecraft.java
index 7f6e8a1d..86a0f02c 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IMinecraft.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IMinecraft.java
@@ -3,5 +3,5 @@
import com.mojang.blaze3d.platform.Window;
public interface IMinecraft {
- Window getWindow();
+ Window tmc$getWindow();
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IScreen.java b/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IScreen.java
index d5db488b..c9ef0880 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IScreen.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/fakeInterface/IScreen.java
@@ -3,5 +3,5 @@
import net.minecraft.client.gui.components.Button;
public interface IScreen {
- Button addButtonEx(Button button);
+ Button tmc$addButton(Button button);
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/helper/CommonCompatLib.java b/src/main/java/top/hendrixshen/tweakmyclient/helper/CommonCompatLib.java
deleted file mode 100644
index e16b830f..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/helper/CommonCompatLib.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package top.hendrixshen.tweakmyclient.helper;
-
-import net.minecraft.client.player.LocalPlayer;
-import net.minecraft.core.Registry;
-import net.minecraft.world.InteractionHand;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.EntityType;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.phys.EntityHitResult;
-import net.minecraft.world.phys.HitResult;
-import net.minecraft.world.phys.Vec3;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-public class CommonCompatLib {
- public static void disableSlowdown(Entity entity, CallbackInfo ci) {
- if (Configs.disableSlowdown && entity instanceof LocalPlayer) {
- Vec3 vec3 = entity.getDeltaMovement();
- if (vec3.y < 0 && vec3.y > -0.0792) { // Vertical momentum at 2x steady state.
- entity.setDeltaMovement(vec3.x, 0, vec3.z);
- ci.cancel();
- }
- }
- }
-
- public static boolean disableClientEntity(Entity entity) {
- if (Configs.disableClientEntityInListRendering) {
- String entityID = Registry.ENTITY_TYPE.getKey(entity.getType()).toString();
- String entityName = entity.getName().getString();
- if (Configs.listDisableClientEntityRendering.stream().anyMatch(s -> entityID.contains(s) || entityName.contains(s)) && !(entity instanceof Player)) {
- return true;
- }
- }
-
- return (Configs.disableClientEntityTNTUpdates && entity.getType() == EntityType.TNT)
- || (Configs.disableClientEntityWitherUpdates && entity.getType() == EntityType.WITHER)
- || (Configs.disableClientEntityZombieVillagerUpdates && entity.getType() == EntityType.ZOMBIE_VILLAGER);
- }
-
- public static boolean disableAttackEntity(HitResult hitResult, Player player) {
- Entity entity = ((EntityHitResult) hitResult).getEntity();
- String entityID = Registry.ENTITY_TYPE.getKey(entity.getType()).toString();
- String entityName = entity.getName().getString();
- if (Configs.disableAttackEntity && Configs.listDisableAttackEntity.stream().anyMatch(s -> entityID.contains(s) || entityName.contains(s))) {
- player.swing(InteractionHand.MAIN_HAND);
- return true;
- }
- return false;
- }
-}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableAttackEntity/MixinMinecraft.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableAttackEntity/MixinMinecraft.java
index 25cb5e71..e494f56d 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableAttackEntity/MixinMinecraft.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableAttackEntity/MixinMinecraft.java
@@ -2,18 +2,23 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
+import net.minecraft.core.Registry;
+import net.minecraft.world.InteractionHand;
+import net.minecraft.world.entity.Entity;
+import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.HitResult;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
+//#if MC >= 11800
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
+//#else
+//$$ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+//#endif
+import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(not = @Dependency(value = "minecraft", versionPredicate = ">1.18"))
@Mixin(Minecraft.class)
public class MixinMinecraft {
@Shadow
@@ -32,9 +37,19 @@ public class MixinMinecraft {
),
cancellable = true
)
- private void onAttack(CallbackInfo ci) {
- if (CommonCompatLib.disableAttackEntity(this.hitResult, this.player)) {
- ci.cancel();
+ //#if MC >= 11800
+ private void onStartAttack(CallbackInfoReturnable cir) {
+ //#else
+ //$$ private void onStartAttack(CallbackInfo cir) {
+ //#endif
+ if (this.hitResult != null && this.player != null) {
+ Entity entity = ((EntityHitResult) hitResult).getEntity();
+ String entityID = Registry.ENTITY_TYPE.getKey(entity.getType()).toString();
+ String entityName = entity.getName().getString();
+ if (Configs.disableAttackEntity && Configs.listDisableAttackEntity.stream().anyMatch(s -> entityID.contains(s) || entityName.contains(s))) {
+ player.swing(InteractionHand.MAIN_HAND);
+ cir.cancel();
+ }
}
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientBlockEvents/MixinClientPacketListener.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientBlockEvents/MixinClientPacketListener.java
index a12fb9fe..21a287e7 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientBlockEvents/MixinClientPacketListener.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientBlockEvents/MixinClientPacketListener.java
@@ -17,7 +17,7 @@ public class MixinClientPacketListener {
),
cancellable = true
)
- private void onBlockEvents(ClientboundBlockEventPacket clientboundBlockEventPacket, CallbackInfo ci) {
+ private void onHandleBlockEvent(ClientboundBlockEventPacket clientboundBlockEventPacket, CallbackInfo ci) {
if (Configs.disableClientBlockEvents) {
ci.cancel();
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityRendering/MixinEntityRenderDispatcher.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityRendering/MixinEntityRenderDispatcher.java
index 71f572bf..8d3052c2 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityRendering/MixinEntityRenderDispatcher.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityRendering/MixinEntityRenderDispatcher.java
@@ -1,17 +1,21 @@
package top.hendrixshen.tweakmyclient.mixin.disable.disableClientEntityRendering;
+//#if MC >= 11500
import net.minecraft.client.renderer.culling.Frustum;
+//#else
+//$$ import net.minecraft.client.renderer.culling.Culler;
+//#endif
import net.minecraft.client.renderer.entity.EntityRenderDispatcher;
+import net.minecraft.core.Registry;
import net.minecraft.world.entity.Entity;
+import net.minecraft.world.entity.EntityType;
+import net.minecraft.world.entity.player.Player;
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.CallbackInfoReturnable;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
+import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.15"))
@Mixin(EntityRenderDispatcher.class)
public abstract class MixinEntityRenderDispatcher {
@Inject(
@@ -21,8 +25,22 @@ public abstract class MixinEntityRenderDispatcher {
),
cancellable = true
)
+ //#if MC >= 11500
private void onShouldRender(Entity entity, Frustum frustum, double d, double e, double f, CallbackInfoReturnable cir) {
- if (CommonCompatLib.disableClientEntity(entity)) {
+ //#else
+ //$$ private void onShouldRender(Entity entity, Culler culler, double d, double e, double f, CallbackInfoReturnable cir) {
+ //#endif
+ if (Configs.disableClientEntityInListRendering) {
+ String entityID = Registry.ENTITY_TYPE.getKey(entity.getType()).toString();
+ String entityName = entity.getName().getString();
+ if (Configs.listDisableClientEntityRendering.stream().anyMatch(s -> entityID.contains(s) || entityName.contains(s)) && !(entity instanceof Player)) {
+ cir.cancel();
+ }
+ }
+
+ if ((Configs.disableClientEntityTNTUpdates && entity.getType() == EntityType.TNT)
+ || (Configs.disableClientEntityWitherUpdates && entity.getType() == EntityType.WITHER)
+ || (Configs.disableClientEntityZombieVillagerUpdates && entity.getType() == EntityType.ZOMBIE_VILLAGER)) {
cir.cancel();
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityUpdates/MixinLevel.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityUpdates/MixinLevel.java
index 8acef9e1..04cebadb 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityUpdates/MixinLevel.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableClientEntityUpdates/MixinLevel.java
@@ -22,21 +22,19 @@ public class MixinLevel {
),
cancellable = true
)
- private void onTickEntity(Consumer consumer, Entity entity, CallbackInfo ci) {
+ private void onGuardEntityTick(Consumer consumer, Entity entity, CallbackInfo ci) {
if (Configs.disableClientEntityInListUpdates) {
String entityID = Registry.ENTITY_TYPE.getKey(entity.getType()).toString();
String entityName = entity.getName().getString();
- if (Configs.listDisableClientEntityUpdates.stream().anyMatch(s -> entityID.contains(s) || entityName.contains(s)) && !(entity instanceof Player)) {
+ if (Configs.listDisableClientEntityUpdates.stream().anyMatch(s -> entityID.contains(s) ||
+ entityName.contains(s)) && !(entity instanceof Player)) {
ci.cancel();
}
}
- if (Configs.disableClientEntityTNTRendering && entity.getType() == EntityType.TNT) {
- ci.cancel();
- }
- if (Configs.disableClientEntityWitherRendering && entity.getType() == EntityType.WITHER) {
- ci.cancel();
- }
- if (Configs.disableClientEntityZombieVillagerRendering && entity.getType() == EntityType.ZOMBIE_VILLAGER) {
+ if ((Configs.disableClientEntityTNTRendering && entity.getType() == EntityType.TNT) ||
+ (Configs.disableClientEntityWitherRendering && entity.getType() == EntityType.WITHER) ||
+ (Configs.disableClientEntityZombieVillagerRendering && entity.getType() == EntityType.ZOMBIE_VILLAGER)
+ ) {
ci.cancel();
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableGuiShadowLayer/MixinScreen.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableGuiShadowLayer/MixinScreen.java
index bf648b88..a74eb7a2 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableGuiShadowLayer/MixinScreen.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableGuiShadowLayer/MixinScreen.java
@@ -1,28 +1,39 @@
package top.hendrixshen.tweakmyclient.mixin.disable.disableGuiShadowLayer;
+//#if MC >= 11600
import com.mojang.blaze3d.vertex.PoseStack;
+//#endif
import net.minecraft.client.gui.components.events.AbstractContainerEventHandler;
import net.minecraft.client.gui.screens.Screen;
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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
@Mixin(Screen.class)
public abstract class MixinScreen extends AbstractContainerEventHandler {
@Inject(
+ //#if MC >= 11600
method = "renderBackground(Lcom/mojang/blaze3d/vertex/PoseStack;I)V",
+ //#else
+ //$$ method = "renderBackground(I)V",
+ //#endif
at = @At(
value = "INVOKE",
+ //#if MC >= 11600
target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(Lcom/mojang/blaze3d/vertex/PoseStack;IIIIII)V"
+ //#else
+ //$$ target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(IIIIII)V"
+ //#endif
),
cancellable = true
)
+ //#if MC >= 11600
private void onFillGradient(PoseStack poseStack, int i, CallbackInfo ci) {
+ //#else
+ //$$ private void onFillGradient(int i, CallbackInfo ci) {
+ //#endif
if (Configs.disableGuiShadowLayer) {
ci.cancel();
}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
similarity index 79%
rename from tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
rename to src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
index 26bbafac..77c86292 100644
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
@@ -1,6 +1,8 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderBossBar;
+package top.hendrixshen.tweakmyclient.mixin.disable.disableRenderBossBar;
+//#if MC >= 11600
import com.mojang.blaze3d.vertex.PoseStack;
+//#endif
import net.minecraft.client.gui.components.BossHealthOverlay;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -17,7 +19,11 @@ public class MixinBossHealthOverlay {
),
cancellable = true
)
+ //#if MC >= 11600
private void onRender(PoseStack poseStack, CallbackInfo ci) {
+ //#else
+ //$$ private void onRender(CallbackInfo ci) {
+ //#endif
if (Configs.disableRenderBossBar) {
ci.cancel();
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayFire/MixinItemInHandRenderer.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayFire/MixinItemInHandRenderer.java
new file mode 100644
index 00000000..a1a57fd7
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayFire/MixinItemInHandRenderer.java
@@ -0,0 +1,36 @@
+package top.hendrixshen.tweakmyclient.mixin.disable.disableRenderOverlayFire;
+
+//#if MC >= 11500
+import net.minecraft.client.Minecraft;
+//#else
+//$$ import net.minecraft.client.renderer.ItemInHandRenderer;
+//#endif
+import org.spongepowered.asm.mixin.Mixin;
+//#if MC < 11500
+//$$ import org.spongepowered.asm.mixin.injection.At;
+//$$ import org.spongepowered.asm.mixin.injection.Inject;
+//$$ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+//$$ import top.hendrixshen.tweakmyclient.config.Configs;
+//#endif
+
+//#if MC >= 11500
+@Mixin(Minecraft.class)
+//#else
+//$$ @Mixin(ItemInHandRenderer.class)
+//#endif
+public class MixinItemInHandRenderer {
+ //#if MC < 11500
+ //$$ @Inject(
+ //$$ method = "renderFire",
+ //$$ at = @At(
+ //$$ value = "HEAD"
+ //$$ ),
+ //$$ cancellable = true
+ //$$ )
+ //$$ private void onRenderFireOverlay(CallbackInfo ci) {
+ //$$ if (Configs.disableRenderOverlayFire) {
+ //$$ ci.cancel();
+ //$$ }
+ //$$ }
+ //#endif
+}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayFire/MixinScreenEffectRenderer.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayFire/MixinScreenEffectRenderer.java
index cebab364..efea02dc 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayFire/MixinScreenEffectRenderer.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayFire/MixinScreenEffectRenderer.java
@@ -1,19 +1,25 @@
package top.hendrixshen.tweakmyclient.mixin.disable.disableRenderOverlayFire;
+//#if MC >= 11500
import com.mojang.blaze3d.vertex.PoseStack;
+//#endif
import net.minecraft.client.Minecraft;
+//#if MC >= 11500
import net.minecraft.client.renderer.ScreenEffectRenderer;
+//#endif
import org.spongepowered.asm.mixin.Mixin;
+//#if MC >= 11500
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
@Mixin(ScreenEffectRenderer.class)
+//#else
+//$$ @Mixin(Minecraft.class)
+//#endif
public abstract class MixinScreenEffectRenderer {
+ //#if MC >= 11500
@Inject(
method = "renderFire",
at = @At(
@@ -21,9 +27,10 @@ public abstract class MixinScreenEffectRenderer {
),
cancellable = true
)
- private static void onRenderFireOverlay(Minecraft minecraft, PoseStack poseStack, CallbackInfo ci) {
+ private static void onRenderFire(Minecraft minecraft, PoseStack poseStack, CallbackInfo ci) {
if (Configs.disableRenderOverlayFire) {
ci.cancel();
}
}
+ //#endif
}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
similarity index 78%
rename from tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
rename to src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
index 0138e155..f6b13b8b 100644
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
@@ -1,9 +1,15 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayPowderSnow;
+package top.hendrixshen.tweakmyclient.mixin.disable.disableRenderOverlayPowderSnow;
+//#if MC < 11700
+//$$ import net.minecraft.client.Minecraft;
+//#endif
+//#if MC >= 11700
import net.minecraft.client.gui.Gui;
import net.minecraft.resources.ResourceLocation;
import org.spongepowered.asm.mixin.Final;
+//#endif
import org.spongepowered.asm.mixin.Mixin;
+//#if MC >= 11700
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@@ -11,7 +17,11 @@
import top.hendrixshen.tweakmyclient.config.Configs;
@Mixin(Gui.class)
+//#else
+//$$ @Mixin(Minecraft.class)
+//#endif
public abstract class MixinGui {
+ //#if MC >= 11700
@Shadow
@Final
private static ResourceLocation POWDER_SNOW_OUTLINE_LOCATION;
@@ -28,4 +38,5 @@ private void onRenderPowderSnowOverlay(ResourceLocation resourceLocation, float
ci.cancel();
}
}
+ //#endif
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
index f343ad51..32f4f8d1 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
@@ -1,26 +1,37 @@
package top.hendrixshen.tweakmyclient.mixin.disable.disableRenderOverlayPumpkin;
import net.minecraft.client.gui.Gui;
+import net.minecraft.resources.ResourceLocation;
+import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = "<1.17"))
@Mixin(Gui.class)
public abstract class MixinGui {
+ @Shadow @Final private static ResourceLocation PUMPKIN_BLUR_LOCATION;
+
@Inject(
- method = "renderPumpkin",
+ //#if MC > 11700
+ method = "renderTextureOverlay",
+ //#else
+ //$$ method = "renderPumpkin",
+ //#endif
at = @At(
value = "HEAD"
),
cancellable = true
)
- private void onRenderPumpkinOverlay(CallbackInfo ci) {
- if (Configs.disableRenderOverlayPumpkin) {
+ //#if MC > 11700
+ private void onRenderTextureOverlay(ResourceLocation resourceLocation, float f, CallbackInfo ci) {
+ if (Configs.disableRenderOverlayPumpkin && resourceLocation == PUMPKIN_BLUR_LOCATION) {
+ //#else
+ //$$ private void onRenderPumpkinOverlay(CallbackInfo ci) {
+ //$$ if (Configs.disableRenderOverlayPumpkin) {
+ //#endif
ci.cancel();
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderScoreboard/MixinGui.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderScoreboard/MixinGui.java
index c34e089f..f10ed62f 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderScoreboard/MixinGui.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableRenderScoreboard/MixinGui.java
@@ -1,17 +1,16 @@
package top.hendrixshen.tweakmyclient.mixin.disable.disableRenderScoreboard;
+//#if MC >= 11600
import com.mojang.blaze3d.vertex.PoseStack;
+//#endif
import net.minecraft.client.gui.Gui;
import net.minecraft.world.scores.Objective;
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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
@Mixin(Gui.class)
public abstract class MixinGui {
@Inject(
@@ -21,7 +20,11 @@ public abstract class MixinGui {
),
cancellable = true
)
+ //#if MC >= 11600
private void onRenderScoreboardSidebar(PoseStack poseStack, Objective objective, CallbackInfo ci) {
+ //#else
+ //$$ private void onRenderScoreboardSidebar(Objective objective, CallbackInfo ci) {
+ //#endif
if (Configs.disableRenderScoreboard) {
ci.cancel();
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinBlock.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinBlock.java
deleted file mode 100644
index 80cd8cda..00000000
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinBlock.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package top.hendrixshen.tweakmyclient.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.level.block.Block;
-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.CallbackInfoReturnable;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.15"))
-@Mixin(Block.class)
-public class MixinBlock {
- @Inject(
- method = "getSpeedFactor",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onGetVelocityMultiplier(CallbackInfoReturnable cir) {
- if (Configs.disableSlowdown && cir.getReturnValueF() < 1.0F) {
- cir.setReturnValue(1.0F);
- }
- }
-
- @Inject(
- method = "getFriction",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onGetFriction(CallbackInfoReturnable cir) {
- if (Configs.disableSlowdown && cir.getReturnValueF() < 0.6F) {
- cir.setReturnValue(0.6F);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinEntity.java
similarity index 51%
rename from tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java
rename to src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinEntity.java
index 3d87bcc8..dd94f8c6 100644
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinEntity.java
@@ -1,17 +1,37 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
+package top.hendrixshen.tweakmyclient.mixin.disable.disableSlowdown;
+//#if MC < 11500
+//$$ import net.minecraft.client.Minecraft;
+//#else
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.world.entity.Entity;
+//#endif
+//#if MC >= 11700
import net.minecraft.world.phys.Vec3;
import org.objectweb.asm.Opcodes;
+//#endif
+
import org.spongepowered.asm.mixin.Mixin;
+//#if MC >= 11500
+//#if MC >= 11700
import org.spongepowered.asm.mixin.Shadow;
+//#endif
import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+//#if MC >= 11700
import org.spongepowered.asm.mixin.injection.Redirect;
+//#endif
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import top.hendrixshen.tweakmyclient.config.Configs;
+//#endif
+//#if MC >= 11500
@Mixin(Entity.class)
+//#else
+//$$ @Mixin(Minecraft.class)
+//#endif
public class MixinEntity {
+ //#if MC >= 11700
@Shadow
protected Vec3 stuckSpeedMultiplier;
@@ -27,4 +47,21 @@ public class MixinEntity {
private Vec3 onGetStuckSpeedMultiplier(Entity instance) {
return Configs.disableSlowdown && instance instanceof LocalPlayer ? Vec3.ZERO : this.stuckSpeedMultiplier;
}
+ //#endif
+
+ //#if MC >= 11500
+ @Inject(
+ method = "getBlockSpeedFactor",
+ at = @At(
+ value = "RETURN",
+ ordinal = 1
+ ),
+ cancellable = true
+ )
+ private void onGetBlockSpeedFactor(CallbackInfoReturnable cir) {
+ if (Configs.disableSlowdown && (Object) this instanceof LocalPlayer && cir.getReturnValueF() < 1.0F) {
+ cir.setReturnValue(1.0F);
+ }
+ }
+ //#endif
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinLivingEntity.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinLivingEntity.java
new file mode 100644
index 00000000..480d8bac
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinLivingEntity.java
@@ -0,0 +1,46 @@
+package top.hendrixshen.tweakmyclient.mixin.disable.disableSlowdown;
+
+import net.minecraft.client.player.LocalPlayer;
+import net.minecraft.world.entity.LivingEntity;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.ModifyVariable;
+import org.spongepowered.asm.mixin.injection.Slice;
+import top.hendrixshen.tweakmyclient.config.Configs;
+
+@Mixin(LivingEntity.class)
+public class MixinLivingEntity {
+ @ModifyVariable(
+ method = "travel",
+ at = @At(
+ value = "STORE"
+ ),
+ slice = @Slice(
+ from = @At(
+ value = "INVOKE",
+ //#if MC >= 11600
+ target = "Lnet/minecraft/world/entity/LivingEntity;getBlockPosBelowThatAffectsMyMovement()Lnet/minecraft/core/BlockPos;"
+ //#elseif MC >= 11500
+ //$$ target = "Lnet/minecraft/world/entity/LivingEntity;getBlockPosBelowThatAffectsMyMovement()Lnet/minecraft/core/BlockPos;"
+ //#else
+ //$$ target = "Lnet/minecraft/world/entity/LivingEntity;getBoundingBox()Lnet/minecraft/world/phys/AABB;"
+ //#endif
+ ),
+ to = @At(
+ value = "INVOKE",
+ //#if MC >= 11600
+ target = "Lnet/minecraft/world/entity/LivingEntity;handleRelativeFrictionAndCalculateMovement(Lnet/minecraft/world/phys/Vec3;F)Lnet/minecraft/world/phys/Vec3;"
+ //#else
+ //$$ target = "Lnet/minecraft/world/entity/LivingEntity;getFrictionInfluencedSpeed(F)F"
+ //#endif
+ )
+ ),
+ ordinal = 0
+ )
+ private float onGetFriction(float f) {
+ if (Configs.disableSlowdown && (Object) this instanceof LocalPlayer && f > 0.6F) {
+ return 0.6F;
+ }
+ return f;
+ }
+}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinLocalPlayer.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinLocalPlayer.java
index 9fe28b5c..6e4fbce1 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinLocalPlayer.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinLocalPlayer.java
@@ -23,7 +23,7 @@ protected MixinLocalPlayer(EntityType extends LivingEntity> entityType, Level
method = "aiStep",
at = @At(
value = "INVOKE",
- target = "net/minecraft/client/player/LocalPlayer.isUsingItem ()Z",
+ target = "Lnet/minecraft/client/player/LocalPlayer;isUsingItem ()Z",
ordinal = 0
)
)
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinSlimeBlock.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinSlimeBlock.java
new file mode 100644
index 00000000..e5451b35
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinSlimeBlock.java
@@ -0,0 +1,48 @@
+package top.hendrixshen.tweakmyclient.mixin.disable.disableSlowdown;
+
+import net.minecraft.client.player.LocalPlayer;
+import net.minecraft.world.entity.Entity;
+//#if MC < 11500
+//$$ import net.minecraft.world.level.BlockGetter;
+//#endif
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.SlimeBlock;
+import net.minecraft.world.phys.Vec3;
+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;
+import top.hendrixshen.tweakmyclient.config.Configs;
+
+@Mixin(SlimeBlock.class)
+public class MixinSlimeBlock extends Block {
+ public MixinSlimeBlock(Properties properties) {
+ super(properties);
+ }
+
+ @Inject(
+ //#if MC >= 11500
+ method = "bounceUp",
+ //#else
+ //$$ method = "updateEntityAfterFallOn",
+ //#endif
+ at = @At(
+ value = "INVOKE",
+ target = "Lnet/minecraft/world/entity/Entity;getDeltaMovement()Lnet/minecraft/world/phys/Vec3;"
+ ),
+ cancellable = true
+ )
+ //#if MC >= 11500
+ private void onBounceUp(Entity entity, CallbackInfo ci) {
+ //#else
+ //$$ private void updateEntityAfterFallOn(BlockGetter blockGetter, Entity entity, CallbackInfo ci) {
+ //#endif
+ if (Configs.disableSlowdown && entity instanceof LocalPlayer) {
+ Vec3 vec3 = entity.getDeltaMovement();
+ if (vec3.y < 0 && vec3.y > -0.0792) { // Vertical momentum at 2x steady state.
+ entity.setDeltaMovement(vec3.x, 0, vec3.z);
+ ci.cancel();
+ }
+ }
+ }
+}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinSoulsandBlock.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinSoulsandBlock.java
new file mode 100644
index 00000000..b6786ea3
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinSoulsandBlock.java
@@ -0,0 +1,39 @@
+package top.hendrixshen.tweakmyclient.mixin.disable.disableSlowdown;
+
+//#if MC >= 11500
+import net.minecraft.client.Minecraft;
+//#else
+//$$ import net.minecraft.client.player.LocalPlayer;
+//$$ import net.minecraft.core.BlockPos;
+//$$ import net.minecraft.world.entity.Entity;
+//$$ import net.minecraft.world.level.Level;
+//$$ import net.minecraft.world.level.block.SoulsandBlock;
+//$$ import net.minecraft.world.level.block.state.BlockState;
+//#endif
+import org.spongepowered.asm.mixin.Mixin;
+//#if MC < 11500
+//$$ import org.spongepowered.asm.mixin.injection.At;
+//$$ import org.spongepowered.asm.mixin.injection.Inject;
+//$$ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+//$$ import top.hendrixshen.tweakmyclient.config.Configs;
+//$$
+//$$ @Mixin(SoulsandBlock.class)
+//#else
+@Mixin(Minecraft.class)
+//#endif
+public class MixinSoulsandBlock {
+ //#if MC < 11500
+ //$$ @Inject(
+ //$$ method = "entityInside",
+ //$$ at = @At(
+ //$$ value = "HEAD"
+ //$$ ),
+ //$$ cancellable = true
+ //$$ )
+ //$$ private void onEntityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity, CallbackInfo ci) {
+ //$$ if (Configs.disableSlowdown && entity instanceof LocalPlayer) {
+ //$$ ci.cancel();
+ //$$ }
+ //$$ }
+ //#endif
+}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinWebBlock.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinWebBlock.java
index 664c51dc..75e7ba09 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinWebBlock.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/MixinWebBlock.java
@@ -1,8 +1,8 @@
package top.hendrixshen.tweakmyclient.mixin.disable.disableSlowdown;
+import net.minecraft.client.player.LocalPlayer;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.WebBlock;
import net.minecraft.world.level.block.state.BlockState;
@@ -23,7 +23,7 @@ public class MixinWebBlock {
cancellable = true
)
private void onWalkInCobWebBlock(BlockState blockState, Level level, BlockPos blockPos, Entity entity, CallbackInfo ci) {
- if ((Configs.disableSlowdown) && entity instanceof Player) {
+ if ((Configs.disableSlowdown) && entity instanceof LocalPlayer) {
ci.cancel();
}
}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
similarity index 77%
rename from tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
rename to src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
index 9e005c6d..d223dd2c 100644
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
@@ -1,5 +1,6 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown.tweakeroo;
+package top.hendrixshen.tweakmyclient.mixin.disable.disableSlowdown.tweakeroo;
+import net.minecraft.client.player.LocalPlayer;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
@@ -28,8 +29,12 @@ public MixinSlimeBlock(Properties properties) {
),
cancellable = true
)
+ //#if MC >= 11700
private void stepOn(Level level, BlockPos blockPos, BlockState blockState, Entity entity, CallbackInfo ci) {
- if (Configs.disableSlowdown) {
+ //#else
+ //$$ private void stepOn(Level level, BlockPos blockPos, Entity entity, CallbackInfo ci) {
+ //#endif
+ if (Configs.disableSlowdown && entity instanceof LocalPlayer) {
ci.cancel();
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoClimb/MixinLocalPlayer.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoClimb/MixinLocalPlayer.java
index 2e6f117e..6f0169ec 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoClimb/MixinLocalPlayer.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoClimb/MixinLocalPlayer.java
@@ -9,7 +9,6 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.EntityCompatApi;
import top.hendrixshen.tweakmyclient.config.Configs;
@Mixin(LocalPlayer.class)
@@ -24,8 +23,16 @@ protected MixinLocalPlayer(EntityType extends LivingEntity> entityType, Level
value = "HEAD"
)
)
- private void onClimbable(CallbackInfo ci) {
- if (Configs.featureAutoClimb && EntityCompatApi.getInstance().onClimbable(this) && EntityCompatApi.getInstance().getXRot(this) <= -50f && !EntityCompatApi.getInstance().isCrouching(this)) {
+ private void onAiStep(CallbackInfo ci) {
+ //#if MC >= 11700
+ if (Configs.featureAutoClimb && this.onClimbable() && this.getXRot() <= -50f && this.isCrouching()) {
+ //#elseif MC >= 11600
+ //$$ if (Configs.featureAutoClimb && this.onClimbable() && this.xRot <= -50f && this.isCrouching()) {
+ //#elseif MC >= 11500
+ //$$ if (Configs.featureAutoClimb && this.onLadder() && this.xRot <= -50f && this.isCrouching()) {
+ //#else
+ //$$ if (Configs.featureAutoClimb && this.onLadder() && this.xRot <= -50f && this.isVisuallySneaking()) {
+ //#endif
Vec3 vec3 = this.getDeltaMovement();
this.setDeltaMovement(vec3.x, 0.1176D, vec3.z);
}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
similarity index 85%
rename from tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
rename to src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
index 0319c9e3..9b37bd2d 100644
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
@@ -1,4 +1,4 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
+package top.hendrixshen.tweakmyclient.mixin.feature.featureAutoReconnect;
import net.minecraft.client.gui.screens.DisconnectedScreen;
import net.minecraft.client.gui.screens.Screen;
@@ -36,12 +36,12 @@ protected MixinDisconnectedScreen(Component component) {
cancellable = true
)
private void onInitDisconnectedScreen(CallbackInfo ci) {
- AutoReconnectUtil.getInstance().initDisconnectedScreen(this, parent, width, height, textHeight, reason);
+ AutoReconnectUtil.getInstance().initDisconnectedScreen(this, this.parent, this.width, this.height, this.textHeight, this.reason);
ci.cancel();
}
@Override
public void tick() {
- AutoReconnectUtil.tickAutoReconnectButton(parent);
+ AutoReconnectUtil.tickAutoReconnectButton(this.parent);
}
}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoReconnect/MixinScreen.java
similarity index 50%
rename from tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
rename to src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoReconnect/MixinScreen.java
index 4461dd0d..a0ea2a96 100644
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureAutoReconnect/MixinScreen.java
@@ -1,7 +1,12 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
+package top.hendrixshen.tweakmyclient.mixin.feature.featureAutoReconnect;
+//#if MC < 11700
+//$$ import net.minecraft.client.gui.components.AbstractWidget;
+//#endif
import net.minecraft.client.gui.components.Button;
+//#if MC >= 11700
import net.minecraft.client.gui.components.events.GuiEventListener;
+//#endif
import net.minecraft.client.gui.screens.Screen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -9,12 +14,20 @@
@Mixin(Screen.class)
public abstract class MixinScreen implements IScreen {
- @SuppressWarnings("target")
@Shadow
+ //#if MC >= 11700
+ @SuppressWarnings("target")
protected abstract GuiEventListener addRenderableWidget(GuiEventListener guiEventListener);
+ //#else
+ //$$ protected abstract AbstractWidget addButton(AbstractWidget abstractWidget);
+ //#endif
@Override
- public Button addButtonEx(Button button) {
- return (Button) addRenderableWidget(button);
+ public Button tmc$addButton(Button button) {
+ //#if MC >= 11700
+ return (Button) this.addRenderableWidget(button);
+ //#else
+ //$$ return (Button) this.addButton(button);
+ //#endif
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomBlockOutsideColor/MixinLevelRenderer.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomBlockOutsideColor/MixinLevelRenderer.java
index 3f4921af..3ca923b9 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomBlockOutsideColor/MixinLevelRenderer.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomBlockOutsideColor/MixinLevelRenderer.java
@@ -6,27 +6,35 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArgs;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.15"))
@Mixin(LevelRenderer.class)
public abstract class MixinLevelRenderer {
@ModifyArgs(
method = "renderHitOutline",
at = @At(
value = "INVOKE",
+ //#if MC >= 11500
target = "Lnet/minecraft/client/renderer/LevelRenderer;renderShape(Lcom/mojang/blaze3d/vertex/PoseStack;Lcom/mojang/blaze3d/vertex/VertexConsumer;Lnet/minecraft/world/phys/shapes/VoxelShape;DDDFFFF)V"
+ //#else
+ //$$ target = "Lnet/minecraft/client/renderer/LevelRenderer;renderShape(Lnet/minecraft/world/phys/shapes/VoxelShape;DDDFFFF)V"
+ //#endif
)
)
private void onDrawBlockOutline(Args args) {
if (Configs.featureCustomBlockOutsideColor) {
Color4f color = Configs.colorBlockOutside;
+ //#if MC >= 11500
args.set(6, color.r);
args.set(7, color.g);
args.set(8, color.b);
args.set(9, color.a);
+ //#else
+ //$$ args.set(4, color.r);
+ //$$ args.set(5, color.g);
+ //$$ args.set(6, color.b);
+ //$$ args.set(7, color.a);
+ //#endif
}
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java
index fcd11453..d986ca22 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java
@@ -24,16 +24,29 @@ public abstract class MixinScreen extends AbstractContainerEventHandler {
* 6 – colorEnd
*/
@ModifyArgs(
+ //#if MC >= 11600
method = "renderBackground(Lcom/mojang/blaze3d/vertex/PoseStack;I)V",
+ //#else
+ //$$ method = "renderBackground(I)V",
+ //#endif
at = @At(
value = "INVOKE",
+ //#if MC >= 11600
target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(Lcom/mojang/blaze3d/vertex/PoseStack;IIIIII)V"
+ //#else
+ //$$ target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(IIIIII)V"
+ //#endif
)
)
private void onFillGradient(Args args) {
if (Configs.featureCustomGuiBackgroundColor) {
+ //#if MC >= 11600
args.set(5, Configs.colorGuiStart.intValue);
args.set(6, Configs.colorGuiStop.intValue);
+ //#else
+ //$$ args.set(4, Configs.colorGuiStart.intValue);
+ //$$ args.set(5, Configs.colorGuiStop.intValue);
+ //#endif
}
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java
index 7b6c460d..24dbeb23 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java
@@ -9,20 +9,27 @@
import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
@Mixin(Gui.class)
public abstract class MixinGui {
@ModifyArgs(
method = "displayScoreboardSidebar",
at = @At(
value = "INVOKE",
+ //#if MC >= 11600
target = "Lnet/minecraft/client/gui/Gui;fill(Lcom/mojang/blaze3d/vertex/PoseStack;IIIII)V",
+ //#else
+ //$$ target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
+ //#endif
ordinal = 1
)
)
private void changeSidebarTitleBackgroundColor(Args args) {
if (Configs.featureCustomSidebarBackgroundColor) {
+ //#if MC >= 11600
args.set(5, Configs.colorSidebarTitle.intValue);
+ //#else
+ //$$ args.set(4, Configs.colorSidebarTitle.intValue);
+ //#endif
}
}
@@ -30,13 +37,21 @@ private void changeSidebarTitleBackgroundColor(Args args) {
method = "displayScoreboardSidebar",
at = @At(
value = "INVOKE",
+ //#if MC >= 11600
target = "Lnet/minecraft/client/gui/Gui;fill(Lcom/mojang/blaze3d/vertex/PoseStack;IIIII)V",
+ //#else
+ //$$ target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
+ //#endif
ordinal = 0
)
)
private void changeSidebarContentBackgroundColor_1(Args args) {
if (Configs.featureCustomSidebarBackgroundColor) {
+ //#if MC >= 11600
args.set(5, Configs.colorSidebarContent.intValue);
+ //#else
+ //$$ args.set(4, Configs.colorSidebarContent.intValue);
+ //#endif
}
}
@@ -44,13 +59,21 @@ private void changeSidebarContentBackgroundColor_1(Args args) {
method = "displayScoreboardSidebar",
at = @At(
value = "INVOKE",
+ //#if MC >= 11600
target = "Lnet/minecraft/client/gui/Gui;fill(Lcom/mojang/blaze3d/vertex/PoseStack;IIIII)V",
+ //#else
+ //$$ target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
+ //#endif
ordinal = 2
)
)
private void changeSidebarContentBackgroundColor_2(Args args) {
if (Configs.featureCustomSidebarBackgroundColor) {
+ //#if MC >= 11600
args.set(5, Configs.colorSidebarContent.intValue);
+ //#else
+ //$$ args.set(4, Configs.colorSidebarContent.intValue);
+ //#endif
}
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMain.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMain.java
index 354b0514..5692f261 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMain.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMain.java
@@ -1,27 +1,47 @@
package top.hendrixshen.tweakmyclient.mixin.feature.featureCustomWindowIcon;
+//#if MC < 11500
+//$$ import net.minecraft.client.Minecraft;
+//#else
import net.minecraft.client.main.Main;
+//#endif
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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.TweakMyClient;
import top.hendrixshen.tweakmyclient.util.CustomWindowUtil;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.15"))
+//#if MC >= 11500
@Mixin(Main.class)
+//#else
+//$$ @Mixin(Minecraft.class)
+//#endif
public class MixinMain {
@Inject(
+ //#if MC >= 11500
method = "main",
+ //#else
+ //$$ method = "run",
+ //#endif
at = @At(
value = "INVOKE",
+ //#if MC >= 11500
target = "Lcom/mojang/blaze3d/systems/RenderSystem;finishInitialization()V"
),
remap = false
+ //#else
+ //$$ target = "Lnet/minecraft/client/Minecraft;init()V",
+ //$$ shift = At.Shift.AFTER
+ //$$ )
+ //#endif
)
+ //#if MC >= 11500
private static void finishInitializationRenderSystem(String[] strings, CallbackInfo ci) {
CustomWindowUtil.updateIcon(TweakMyClient.getMinecraftClient().getWindow());
+ //#else
+ //$$ private void afterInit(CallbackInfo ci) {
+ //$$ CustomWindowUtil.updateIcon(TweakMyClient.getMinecraftClient().window);
+ //#endif
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMinecraft.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMinecraft.java
index 1ad3bebe..43443794 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMinecraft.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureCustomWindowIcon/MixinMinecraft.java
@@ -2,7 +2,9 @@
import com.mojang.blaze3d.platform.Window;
import net.minecraft.client.Minecraft;
+//#if MC >= 11500
import org.spongepowered.asm.mixin.Final;
+//#endif
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@@ -15,12 +17,18 @@
@Mixin(Minecraft.class)
public abstract class MixinMinecraft implements IMinecraft {
- @Shadow
+ //#if MC >= 11500
@Final
+ //#endif
+ @Shadow
+ //#if MC >= 11500
private Window window;
+ //#else
+ //$$ public Window window;
+ //#endif
@Inject(
- method = "reloadResourcePacks",
+ method = "reloadResourcePacks()Ljava/util/concurrent/CompletableFuture;",
at = @At(
value = "RETURN"
)
@@ -30,11 +38,11 @@ private void afterReloadResourcePacks(CallbackInfoReturnable= 11500
@Inject(
method = "createTitle",
at = @At(
@@ -34,6 +29,21 @@ private void onCreateTitle(CallbackInfoReturnable cir) {
cir.setReturnValue(CustomWindowUtil.getWindowTitle());
}
}
+ //#else
+ //$$ @Inject(
+ //$$ method = "run",
+ //$$ at = @At(
+ //$$ value = "INVOKE",
+ //$$ target = "Lnet/minecraft/client/Minecraft;init()V",
+ //$$ shift = At.Shift.AFTER
+ //$$ )
+ //$$ )
+ //$$ private void afterInit(CallbackInfo ci) {
+ //$$ if (Configs.featureCustomWindowTitle) {
+ //$$ CustomWindowUtil.updateTitle();
+ //$$ }
+ //$$ }
+ //#endif
@Inject(
method = "run",
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinClientLevelClientLevelData.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinClientLevelClientLevelData.java
index 24b37a29..4b1a220f 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinClientLevelClientLevelData.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinClientLevelClientLevelData.java
@@ -1,17 +1,23 @@
package top.hendrixshen.tweakmyclient.mixin.feature.featureDaylightOverride;
+//#if MC < 11600
+//$$ import net.minecraft.client.Minecraft;
+//#else
import net.minecraft.client.multiplayer.ClientLevel;
+//#endif
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.CallbackInfoReturnable;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
+//#if MC >=11600
@Mixin(ClientLevel.ClientLevelData.class)
+//#else
+//$$ @Mixin(Minecraft.class)
+//#endif
public class MixinClientLevelClientLevelData {
+ //#if MC >=11600
@Inject(
method = "getDayTime",
at = @At(
@@ -24,4 +30,5 @@ private void onGetTimeOfDay(CallbackInfoReturnable cir) {
cir.setReturnValue((long) Configs.daylightOverrideTime);
}
}
+ //#endif
}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureDaylightOverride/MixinLevel.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinLevel.java
similarity index 74%
rename from tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureDaylightOverride/MixinLevel.java
rename to src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinLevel.java
index e9f84dbf..003f4c2d 100644
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureDaylightOverride/MixinLevel.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinLevel.java
@@ -1,14 +1,23 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureDaylightOverride;
+package top.hendrixshen.tweakmyclient.mixin.feature.featureDaylightOverride;
+//#if MC < 11500
+//$$ import net.minecraft.client.Minecraft;
+//#else
import net.minecraft.world.level.Level;
+//#endif
import org.spongepowered.asm.mixin.Mixin;
+//#if MC >= 11500
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import top.hendrixshen.tweakmyclient.config.Configs;
@Mixin(Level.class)
+//#else
+//$$ @Mixin(Minecraft.class)
+//#endif
public class MixinLevel {
+ //#if MC >= 11500
@Inject(
method = "getDayTime",
at = @At(
@@ -21,4 +30,5 @@ private void onGetTimeOfDay(CallbackInfoReturnable cir) {
cir.setReturnValue((long) Configs.daylightOverrideTime);
}
}
+ //#endif
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinLevelRenderer.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinLevelRenderer.java
new file mode 100644
index 00000000..5d327e86
--- /dev/null
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureDaylightOverride/MixinLevelRenderer.java
@@ -0,0 +1,71 @@
+package top.hendrixshen.tweakmyclient.mixin.feature.featureDaylightOverride;
+
+import com.mojang.math.Quaternion;
+import com.mojang.math.Vector3f;
+//#if MC >= 11500
+import net.minecraft.client.multiplayer.ClientLevel;
+//#else
+//$$ import net.minecraft.client.multiplayer.MultiPlayerLevel;
+//#endif
+import net.minecraft.client.renderer.LevelRenderer;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.ModifyArg;
+import top.hendrixshen.tweakmyclient.config.Configs;
+
+@Mixin(LevelRenderer.class)
+public class MixinLevelRenderer {
+ //#if MC >= 11500
+ @Shadow
+ private ClientLevel level;
+ //#else
+ //$$ @Shadow
+ //$$ private MultiPlayerLevel level;
+ //#endif
+
+ @ModifyArg(
+ method = "renderSky",
+ at = @At(
+ value = "INVOKE",
+ //#if MC >= 11600
+ target = "Lnet/minecraft/client/renderer/DimensionSpecialEffects;getSunriseColor(FF)[F"
+ //#else
+ //$$ target = "Lnet/minecraft/world/level/dimension/Dimension;getSunriseColor(FF)[F"
+ //#endif
+ ),
+ index = 0
+ )
+ private float onGetSunriseColor(float i) {
+ //#if MC >= 11600
+ return Configs.featureDaylightOverride ? this.level.dimensionType().timeOfDay(Configs.daylightOverrideTime) : i;
+ //#else
+ //$$ return Configs.featureDaylightOverride ? this.level.getTimeOfDay(Configs.daylightOverrideTime) : i;
+ //#endif
+ }
+
+ @ModifyArg(
+ method = "renderSky",
+ at = @At(
+ value = "INVOKE",
+ //#if MC >= 11500
+ target = "Lcom/mojang/blaze3d/vertex/PoseStack;mulPose(Lcom/mojang/math/Quaternion;)V",
+ //#else
+ //$$ target = "Lcom/mojang/blaze3d/platform/GlStateManager;rotatef(FFFF)V",
+ //#endif
+ ordinal = 4
+ ),
+ index = 0
+ )
+ //#if MC >= 11600
+ private Quaternion modifyDayTime(Quaternion i) {
+ return Configs.featureDaylightOverride ? Vector3f.XP.rotationDegrees(this.level.dimensionType().timeOfDay(Configs.daylightOverrideTime) * 360.0F) : i;
+ //#elseif MC >= 11500
+ //$$ private Quaternion modifyDayTime(Quaternion i) {
+ //$$ return Configs.featureDaylightOverride ? Vector3f.XP.rotationDegrees(this.level.getTimeOfDay(Configs.daylightOverrideTime) * 360.0F) : i;
+ //#else
+ //$$ private float modifyDayTime(float i) {
+ //$$ return Configs.featureDaylightOverride ? this.level.getTimeOfDay(Configs.daylightOverrideTime) * 360.0F : i;
+ //#endif
+ }
+}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureOpenWaterHelper/MixinFishingHook.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureOpenWaterHelper/MixinFishingHook.java
index 6f25dd2c..40b28639 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureOpenWaterHelper/MixinFishingHook.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/feature/featureOpenWaterHelper/MixinFishingHook.java
@@ -1,16 +1,23 @@
package top.hendrixshen.tweakmyclient.mixin.feature.featureOpenWaterHelper;
+//#if MC < 11600
+//$$ import net.minecraft.client.Minecraft;
+//#else
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.projectile.FishingHook;
+//#endif
import org.spongepowered.asm.mixin.Mixin;
+//#if MC >= 11600
import org.spongepowered.asm.mixin.Shadow;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.fakeInterface.IFishingHookEntity;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
@Mixin(FishingHook.class)
public class MixinFishingHook implements IFishingHookEntity {
+//#else
+//$$ @Mixin(Minecraft.class)
+//$$ public class MixinFishingHook {
+//#endif
+ //#if MC >= 11600
@Override
public boolean checkOpenWaterAround(BlockPos pos) {
return calculateOpenWater(pos);
@@ -20,4 +27,5 @@ public boolean checkOpenWaterAround(BlockPos pos) {
private boolean calculateOpenWater(BlockPos pos) {
return false;
}
+ //#endif
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/disableLitematicaEasyPlaceFailTip/litematica/MixinWorldUtils.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/disableLitematicaEasyPlaceFailTip/litematica/MixinWorldUtils.java
index e823c0ac..156b872f 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/disableLitematicaEasyPlaceFailTip/litematica/MixinWorldUtils.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/disableLitematicaEasyPlaceFailTip/litematica/MixinWorldUtils.java
@@ -10,7 +10,7 @@
import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "litematica", versionPredicate = "*"), not = @Dependency(value = "ommc", versionPredicate = ">=2.0.6"))
+@Dependencies(and = @Dependency(value = "litematica"), not = @Dependency(value = "ommc", versionPredicate = ">=2.0.6"))
@Mixin(WorldUtils.class)
public class MixinWorldUtils {
@Redirect(
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
index c64efd60..7bd217a7 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
@@ -23,9 +23,15 @@ public class MixinTheEndPortalBlockEntity {
)
private void shouldRenderFace(Direction direction, CallbackInfoReturnable cir) {
if (Configs.endPortalRendererFix) {
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.MODERN) {
- cir.setReturnValue(direction.getAxis() == Direction.Axis.Y);
- } else if (Configs.enderPortalRenderMode != EnderPortalRenderMode.LEGACY) {
+ //#if MC >= 11700
+ if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
+ cir.setReturnValue(direction == Direction.UP);
+ } else if (Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
+ //#else
+ //$$ if (Configs.enderPortalRenderMode == EnderPortalRenderMode.MODERN) {
+ //$$ cir.setReturnValue(direction.getAxis() == Direction.Axis.Y);
+ //$$ } else if (Configs.enderPortalRenderMode != EnderPortalRenderMode.LEGACY) {
+ //#endif
cir.setReturnValue(true);
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
index 8315f752..0dba7323 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
@@ -1,65 +1,289 @@
package top.hendrixshen.tweakmyclient.mixin.patch.endPortalRendererFix;
+//#if MC < 11500
+//$$ import com.mojang.blaze3d.platform.GlStateManager;
+//$$ import com.mojang.blaze3d.vertex.BufferBuilder;
+//$$ import com.mojang.blaze3d.vertex.DefaultVertexFormat;
+//$$ import com.mojang.blaze3d.vertex.Tesselator;
+//#else
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Matrix4f;
+//#endif
+//#if MC < 11500
+//$$ import net.minecraft.Util;
+//$$ import net.minecraft.client.Minecraft;
+//$$ import net.minecraft.client.renderer.GameRenderer;
+//$$ import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
+//#endif
import net.minecraft.client.renderer.blockentity.TheEndPortalRenderer;
import net.minecraft.core.Direction;
+//#if MC < 11500
+//$$ import net.minecraft.resources.ResourceLocation;
+//#endif
import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
+//#if MC < 11500
+//$$ import org.spongepowered.asm.mixin.Final;
+//#endif
import org.spongepowered.asm.mixin.Mixin;
+//#if MC < 11500
+//$$ import org.spongepowered.asm.mixin.Overwrite;
+//#endif
import org.spongepowered.asm.mixin.Shadow;
+//#if MC >= 11500
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
+//#endif
import top.hendrixshen.tweakmyclient.config.Configs;
import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-@Dependencies(and = {@Dependency(value = "minecraft", versionPredicate = ">=1.15"), @Dependency(value = "minecraft", versionPredicate = "<1.17")})
+//#if MC < 11500
+//$$ import java.nio.FloatBuffer;
+//$$ import java.util.Random;
+//#endif
+
@Mixin(TheEndPortalRenderer.class)
+//#if MC >= 11500
public abstract class MixinTheEndPortalRenderer {
+//#else
+//$$ public abstract class MixinTheEndPortalRenderer extends BlockEntityRenderer {
+//#endif
+ //#if MC >= 11700
@Shadow
- protected abstract void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, float n, float o, float p, Direction direction);
+ protected abstract void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, Direction direction);
+ //#elseif MC >= 11500
+ //$$ @Shadow
+ //$$ protected abstract void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, float n, float o, float p, Direction direction);
+ //#else
+ //$$ @Shadow
+ //$$ @Final
+ //$$ private static ResourceLocation END_SKY_LOCATION;
+ //$$
+ //$$ @Shadow
+ //$$ @Final
+ //$$ private static Random RANDOM;
+ //$$
+ //$$ @Shadow
+ //$$ @Final
+ //$$ private static ResourceLocation END_PORTAL_LOCATION;
+ //$$
+ //$$ @Shadow
+ //$$ protected abstract FloatBuffer getBuffer(float par1, float par2, float par3, float par4);
+ //$$
+ //$$ @Shadow
+ //$$ @Final
+ //$$ private static FloatBuffer MODELVIEW;
+ //$$
+ //$$ @Shadow
+ //$$ @Final
+ //$$ private static FloatBuffer PROJECTION;
+ //$$
+ //$$ @Shadow
+ //$$ protected abstract int getPasses(double d);
+ //$$
+ //$$ @Shadow
+ //$$ protected abstract float getOffset();
+ //$$
+ //$$ private void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, BufferBuilder bufferBuilder, double f, double g, double h, double i, double j, double k,
+ //$$ double l, double m, float n, float o, float p, Direction direction) {
+ //$$ if (theEndPortalBlockEntity.shouldRenderFace(direction)) {
+ //$$ bufferBuilder.vertex(f, h, j).color(n, o, p, 1.0F).endVertex();
+ //$$ bufferBuilder.vertex(g, h, k).color(n, o, p, 1.0F).endVertex();
+ //$$ bufferBuilder.vertex(g, i, l).color(n, o, p, 1.0F).endVertex();
+ //$$ bufferBuilder.vertex(f, i, m).color(n, o, p, 1.0F).endVertex();
+ //$$ }
+ //$$ }
+ //#endif
+ //#if MC >= 11500
@Inject(
method = "renderCube",
at = @At(
value = "INVOKE",
- target = "Lnet/minecraft/client/renderer/blockentity/TheEndPortalRenderer;renderFace(Lnet/minecraft/world/level/block/entity/TheEndPortalBlockEntity;Lcom/mojang/math/Matrix4f;Lcom/mojang/blaze3d/vertex/VertexConsumer;FFFFFFFFFFFLnet/minecraft/core/Direction;)V",
+ //#if MC >= 11700
+ target = "Lnet/minecraft/client/renderer/blockentity/TheEndPortalRenderer;renderFace(Lnet/minecraft/world/level/block/entity/TheEndPortalBlockEntity;Lcom/mojang/math/Matrix4f;Lcom/mojang/blaze3d/vertex/VertexConsumer;FFFFFFFFLnet/minecraft/core/Direction;)V",
+ //#else
+ //$$ target = "Lnet/minecraft/client/renderer/blockentity/TheEndPortalRenderer;renderFace(Lnet/minecraft/world/level/block/entity/TheEndPortalBlockEntity;Lcom/mojang/math/Matrix4f;Lcom/mojang/blaze3d/vertex/VertexConsumer;FFFFFFFFFFFLnet/minecraft/core/Direction;)V",
+ //#endif
ordinal = 0
),
locals = LocalCapture.CAPTURE_FAILHARD,
cancellable = true
)
- private void onRenderCube(TheEndPortalBlockEntity theEndPortalBlockEntity, float f, float g, Matrix4f matrix4f, VertexConsumer vertexConsumer, CallbackInfo ci, float h, float i, float j) {
- if (Configs.endPortalRendererFix && Configs.enderPortalRenderMode != EnderPortalRenderMode.LEGACY) {
+ //#endif
+ //#if MC >= 11700
+ private void onRenderCube(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, CallbackInfo ci, float f, float g) {
+ if (Configs.endPortalRendererFix && Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
if (Configs.enderPortalRenderMode == EnderPortalRenderMode.ACTUAL) {
- // Rendering the ender portal using its hit box.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, f, 1.0F, 1.0F, 1.0F, 1.0F, h, i, j, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, h, i, j, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, f, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, f, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, h, i, j, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 1.0F, 1.0F, 0.0F, 0.0F, h, i, j, Direction.UP);
+ // Render the ender portal using its hit box.
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, g, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, f, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, g, f, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, f, g, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
} else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.FULL) {
- // Rendering the end portal as a full block.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, h, i, j, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, h, i, j, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, h, i, j, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, h, i, j, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.MODERN) {
- // Rendering the end portal with Minecraft 21w13a and above.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, h, i, j, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, h, i, j, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.375F, 0.375F, 0.0F, 0.0F, 1.0F, 1.0F, h, i, j, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 1.0F, 1.0F, 0.0F, 0.0F, h, i, j, Direction.UP);
+ // Render the end portal as a full block.
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
+ } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
+ // Minecraft 21w13a below.
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
+ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
}
ci.cancel();
}
}
+ //#elseif MC >= 11500
+ //$$ private void onRenderCube(TheEndPortalBlockEntity theEndPortalBlockEntity, float f, float g, Matrix4f matrix4f, VertexConsumer vertexConsumer, CallbackInfo ci, float h, float i, float j) {
+ //$$ if (Configs.enderPortalRenderMode == EnderPortalRenderMode.ACTUAL) {
+ //$$ // Rendering the ender portal using its hit box.
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, f, 1.0F, 1.0F, 1.0F, 1.0F, h, i, j, Direction.SOUTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, h, i, j, Direction.NORTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, f, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.EAST);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, f, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.WEST);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, h, i, j, Direction.DOWN);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 1.0F, 1.0F, 0.0F, 0.0F, h, i, j, Direction.UP);
+ //$$ } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.FULL) {
+ //$$ // Rendering the end portal as a full block.
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, h, i, j, Direction.SOUTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, h, i, j, Direction.NORTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.EAST);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.WEST);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, h, i, j, Direction.DOWN);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, h, i, j, Direction.UP);
+ //$$ } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.MODERN) {
+ //$$ // Rendering the end portal with Minecraft 21w13a and above.
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, h, i, j, Direction.SOUTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, h, i, j, Direction.NORTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.EAST);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, h, i, j, Direction.WEST);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.375F, 0.375F, 0.0F, 0.0F, 1.0F, 1.0F, h, i, j, Direction.DOWN);
+ //$$ this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 1.0F, 1.0F, 0.0F, 0.0F, h, i, j, Direction.UP);
+ //$$ }
+ //$$ ci.cancel();
+ //$$ }
+ //#else
+ //$$ /**
+ //$$ * @author Hendrix-Shen
+ //$$ * @reason Fix endPortalBlockEntity renderer.
+ //$$ */
+ //$$ @Overwrite
+ //$$ public void render(TheEndPortalBlockEntity theEndPortalBlockEntity, double d, double e, double f, float g, int i) {
+ //$$ GlStateManager.disableLighting();
+ //$$ RANDOM.setSeed(31100L);
+ //$$ GlStateManager.getMatrix(2982, MODELVIEW);
+ //$$ GlStateManager.getMatrix(2983, PROJECTION);
+ //$$ double h = d * d + e * e + f * f;
+ //$$ int j = this.getPasses(h);
+ //$$ float k = this.getOffset();
+ //$$ boolean bl = false;
+ //$$ GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
+
+ //$$ for (int l = 0; l < j; ++l) {
+ //$$ GlStateManager.pushMatrix();
+ //$$ float m = 2.0F / (float) (18 - l);
+ //$$ if (l == 0) {
+ //$$ this.bindTexture(END_SKY_LOCATION);
+ //$$ m = 0.15F;
+ //$$ GlStateManager.enableBlend();
+ //$$ GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
+ //$$ }
+
+ //$$ if (l >= 1) {
+ //$$ this.bindTexture(END_PORTAL_LOCATION);
+ //$$ bl = true;
+ //$$ gameRenderer.resetFogColor(true);
+ //$$ }
+
+ //$$ if (l == 1) {
+ //$$ GlStateManager.enableBlend();
+ //$$ GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
+ //$$ }
+
+ //$$ GlStateManager.texGenMode(GlStateManager.TexGen.S, 9216);
+ //$$ GlStateManager.texGenMode(GlStateManager.TexGen.T, 9216);
+ //$$ GlStateManager.texGenMode(GlStateManager.TexGen.R, 9216);
+ //$$ GlStateManager.texGenParam(GlStateManager.TexGen.S, 9474, this.getBuffer(1.0F, 0.0F, 0.0F, 0.0F));
+ //$$ GlStateManager.texGenParam(GlStateManager.TexGen.T, 9474, this.getBuffer(0.0F, 1.0F, 0.0F, 0.0F));
+ //$$ GlStateManager.texGenParam(GlStateManager.TexGen.R, 9474, this.getBuffer(0.0F, 0.0F, 1.0F, 0.0F));
+ //$$ GlStateManager.enableTexGen(GlStateManager.TexGen.S);
+ //$$ GlStateManager.enableTexGen(GlStateManager.TexGen.T);
+ //$$ GlStateManager.enableTexGen(GlStateManager.TexGen.R);
+ //$$ GlStateManager.popMatrix();
+ //$$ GlStateManager.matrixMode(5890);
+ //$$ GlStateManager.pushMatrix();
+ //$$ GlStateManager.loadIdentity();
+ //$$ GlStateManager.translatef(0.5F, 0.5F, 0.0F);
+ //$$ GlStateManager.scalef(0.5F, 0.5F, 1.0F);
+ //$$ float n = (float) (l + 1);
+ //$$ GlStateManager.translatef(17.0F / n, (2.0F + n / 1.5F) * ((float) (Util.getMillis() % 800000L) / 800000.0F), 0.0F);
+ //$$ GlStateManager.rotatef((n * n * 4321.0F + n * 9.0F) * 2.0F, 0.0F, 0.0F, 1.0F);
+ //$$ GlStateManager.scalef(4.5F - n / 4.0F, 4.5F - n / 4.0F, 1.0F);
+ //$$ GlStateManager.multMatrix(PROJECTION);
+ //$$ GlStateManager.multMatrix(MODELVIEW);
+ //$$ Tesselator tesselator = Tesselator.getInstance();
+ //$$ BufferBuilder bufferBuilder = tesselator.getBuilder();
+ //$$ bufferBuilder.begin(7, DefaultVertexFormat.POSITION_COLOR);
+ //$$ float o = (RANDOM.nextFloat() * 0.5F + 0.1F) * m;
+ //$$ float p = (RANDOM.nextFloat() * 0.5F + 0.4F) * m;
+ //$$ float q = (RANDOM.nextFloat() * 0.5F + 0.5F) * m;
+ //$$ if (Configs.enderPortalRenderMode == EnderPortalRenderMode.ACTUAL) {
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 0.75, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.75, e, f, f, f, f, o, p, q, Direction.NORTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 0.75, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 0.75, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.75, e + 0.75, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
+ //$$ } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.FULL) {
+ //$$ // Rendering the end portal as a full block.
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e, f, f, f, f, o, p, q, Direction.NORTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 1.0F, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 1.0F, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e + 1.0F, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
+ //$$ } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.MODERN) {
+ //$$ // Rendering the end portal with Minecraft 21w13a and above.
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e, f, f, f, f, o, p, q, Direction.NORTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 1.0F, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 1.0F, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.375F, e + 0.375F, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e + 1.0F, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
+ //$$ } else {
+ //$$ // Rendering the end portal with Minecraft 21w13a below.
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e, f, f, f, f, o, p, q, Direction.NORTH);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 1.0F, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 1.0F, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
+ //$$ this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.375F, e + 0.375F, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
+ //$$ }
+ //$$ tesselator.end();
+ //$$ GlStateManager.popMatrix();
+ //$$ GlStateManager.matrixMode(5888);
+ //$$ this.bindTexture(END_SKY_LOCATION);
+ //$$ }
+ //$$
+ //$$ GlStateManager.disableBlend();
+ //$$ GlStateManager.disableTexGen(GlStateManager.TexGen.S);
+ //$$ GlStateManager.disableTexGen(GlStateManager.TexGen.T);
+ //$$ GlStateManager.disableTexGen(GlStateManager.TexGen.R);
+ //$$ GlStateManager.enableLighting();
+ //$$ if (bl) {
+ //$$ gameRenderer.resetFogColor(false);
+ //$$ }
+ //$$ }
+ //#endif
+
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/forcePistonWithoutAffectByTool/MixinMiningToolItem.java b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/forcePistonWithoutAffectByTool/MixinMiningToolItem.java
index bcdd859f..7d3e2d37 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/forcePistonWithoutAffectByTool/MixinMiningToolItem.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/mixin/patch/forcePistonWithoutAffectByTool/MixinMiningToolItem.java
@@ -1,22 +1,28 @@
package top.hendrixshen.tweakmyclient.mixin.patch.forcePistonWithoutAffectByTool;
+//#if MC < 11600
+//$$ import net.minecraft.client.Minecraft;
+//#else
import net.minecraft.world.item.DiggerItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.piston.MovingPistonBlock;
import net.minecraft.world.level.block.piston.PistonBaseBlock;
import net.minecraft.world.level.block.piston.PistonHeadBlock;
import net.minecraft.world.level.block.state.BlockState;
+//#endif
import org.spongepowered.asm.mixin.Mixin;
+//#if MC >= 11600
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
import top.hendrixshen.tweakmyclient.config.Configs;
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
@Mixin(DiggerItem.class)
+//#else
+//$$ @Mixin(Minecraft.class)
+//#endif
public class MixinMiningToolItem {
+ //#if MC >= 11600
@Inject(
method = "getDestroySpeed",
at = @At(
@@ -29,4 +35,5 @@ private void onGetMiningSpeedMultiplier(ItemStack itemStack, BlockState blockSta
cir.setReturnValue(1.0F);
}
}
+ //#endif
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/util/AutoReconnectUtil.java b/src/main/java/top/hendrixshen/tweakmyclient/util/AutoReconnectUtil.java
index 7f5de4a8..d0525914 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/util/AutoReconnectUtil.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/util/AutoReconnectUtil.java
@@ -1,17 +1,20 @@
package top.hendrixshen.tweakmyclient.util;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.Maps;
-import fi.dy.masa.malilib.util.StringUtils;
+import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.components.Button;
+import net.minecraft.client.gui.screens.ConnectScreen;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.multiplayer.ServerData;
+import net.minecraft.client.multiplayer.resolver.ServerAddress;
import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import top.hendrixshen.tweakmyclient.TweakMyClient;
import top.hendrixshen.tweakmyclient.TweakMyClientReference;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ConnectionCompatScreenApi;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ScreenCompatApi;
import top.hendrixshen.tweakmyclient.config.Configs;
+import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
import java.lang.reflect.InvocationTargetException;
import java.util.LinkedHashMap;
@@ -23,31 +26,31 @@ public class AutoReconnectUtil {
private static boolean initialized = false;
private static ServerData lastServer;
private static Button autoReconnectButton;
- private static AutoReconnectUtil INSTANCE;
+ private final static AutoReconnectUtil INSTANCE = new AutoReconnectUtil();
public static AutoReconnectUtil getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new AutoReconnectUtil();
- }
- return INSTANCE;
+ return AutoReconnectUtil.INSTANCE;
}
private static int compatReAuthenticateMods = 0;
- private static final LinkedHashMap modHashMap = Maps.newLinkedHashMap();
+ private static final LinkedHashMap modHashMap = Maps.newLinkedHashMap();
private void init(Screen parent) {
if (TweakMyClientReference.isAuthMeLoaded) {
Screen screen = null;
try {
- screen = (Screen) Class.forName("me.axieum.mcmod.authme.impl.gui.AuthMethodScreen").getDeclaredConstructor(Screen.class).newInstance(parent); // 2.2.0
+ // AuthMe 2.2.0
+ screen = (Screen) Class.forName("me.axieum.mcmod.authme.impl.gui.AuthMethodScreen").getDeclaredConstructor(Screen.class).newInstance(parent);
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | ClassNotFoundException e) {
try {
+ // AuthMe 2.1.0
screen = (Screen) Class.forName("me.axieum.mcmod.authme.impl.AuthMe").getDeclaredConstructor().newInstance(); // 2.1.0
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | ClassNotFoundException ex) {
try {
- screen = (Screen) Class.forName("me.axieum.mcmod.authme.gui.AuthScreen").getDeclaredConstructor(Screen.class).newInstance(parent); // For MC 1.14
+ // AuthMe for mc 114
+ screen = (Screen) Class.forName("me.axieum.mcmod.authme.gui.AuthScreen").getDeclaredConstructor(Screen.class).newInstance(parent);
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | ClassNotFoundException exc) {
TweakMyClient.getLogger().error("Can't invoke Authme Screen");
}
@@ -55,10 +58,9 @@ private void init(Screen parent) {
}
if (screen != null) {
- compatReAuthenticateMods++;
+ AutoReconnectUtil.modHashMap.put("authme", screen);
+ AutoReconnectUtil.compatReAuthenticateMods++;
}
-
- modHashMap.put("authme", new ReAuthenticateMod(screen, screen == null));
}
if (TweakMyClientReference.isInGameAccountSwitcherLoaded) {
@@ -71,30 +73,30 @@ private void init(Screen parent) {
}
if (screen != null) {
- compatReAuthenticateMods++;
+ AutoReconnectUtil.modHashMap.put("ias", screen);
+ AutoReconnectUtil.compatReAuthenticateMods++;
}
-
- modHashMap.put("ias", new ReAuthenticateMod(screen, screen == null));
}
if (TweakMyClientReference.isOauthLoaded) {
Screen screen = null;
- try { // LoginTypeScreen
- screen = (Screen) Class.forName("com.sintinium.oauthfabric.gui.profile.ProfileSelectionScreen").getDeclaredConstructor().newInstance(); // For MC 1.16 & 1.18
+ try {
+ // For MC 1.17
+ screen = (Screen) Class.forName("com.sintinium.oauthfabric.gui.profile.ProfileSelectionScreen").getDeclaredConstructor().newInstance();
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
try {
- screen = (Screen) Class.forName("com.sintinium.oauth.oauthfabric.gui.LoginTypeScreen").getDeclaredConstructor(Screen.class).newInstance(parent); // For MC 1.17
+ // For MC 1.16 & 1.18
+ screen = (Screen) Class.forName("com.sintinium.oauth.oauthfabric.gui.LoginTypeScreen").getDeclaredConstructor(Screen.class).newInstance(parent);
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException ex) {
TweakMyClient.getLogger().error("Can't invoke OAuth Screen");
}
}
if (screen != null) {
- compatReAuthenticateMods++;
+ AutoReconnectUtil.modHashMap.put("oauth", screen);
+ AutoReconnectUtil.compatReAuthenticateMods++;
}
-
- modHashMap.put("oauth", new ReAuthenticateMod(screen, screen == null));
}
if (TweakMyClientReference.isReAuthLoaded) {
@@ -107,26 +109,31 @@ private void init(Screen parent) {
}
if (screen != null) {
- compatReAuthenticateMods++;
+ AutoReconnectUtil.modHashMap.put("reauth", screen);
+ AutoReconnectUtil.compatReAuthenticateMods++;
}
-
- modHashMap.put("reauth", new ReAuthenticateMod(screen, screen == null));
}
- initialized = true;
+
+ AutoReconnectUtil.initialized = true;
}
public static ServerData getLastServer() {
- return lastServer;
+ return AutoReconnectUtil.lastServer;
}
public static void setLastServer(ServerData serverInfo) {
- lastServer = serverInfo;
+ AutoReconnectUtil.lastServer = serverInfo;
}
public static void reconnect(Screen screen) {
+ Minecraft minecraft = TweakMyClient.getMinecraftClient();
ServerData serverInfo = AutoReconnectUtil.getLastServer();
- if (lastServer != null) {
- ConnectionCompatScreenApi.getInstance().startConnect(screen, TweakMyClient.getMinecraftClient(), serverInfo);
+ if (AutoReconnectUtil.lastServer != null) {
+ //#if MC >= 11700
+ ConnectScreen.startConnecting(screen, minecraft, ServerAddress.parseString(serverInfo.ip), serverInfo);
+ //#else
+ //$$ minecraft.setScreen(new ConnectScreen(screen, minecraft, serverInfo));
+ //#endif
}
}
@@ -135,7 +142,7 @@ public static String getTranslationKey(Component component) {
}
public void initDisconnectedScreen(Screen current, Screen parent, int width, int height, int textHeight, Component reason) {
- if (!initialized) {
+ if (!AutoReconnectUtil.initialized) {
this.init(parent);
}
@@ -145,37 +152,47 @@ public void initDisconnectedScreen(Screen current, Screen parent, int width, int
int backButtonX = width / 2 - 100;
int backButtonY = Math.min(height / 2 + textHeight / 2 + 9, height - 30);
- ScreenCompatApi.getInstance().addButton(current, ScreenCompatApi.getInstance().createButton(backButtonX, backButtonY + 24, 98, 20,
- StringUtils.translate("tweakmyclient.message.autoReconnect.static"), b -> AutoReconnectUtil.reconnect(parent)));
-
- autoReconnectButton = ScreenCompatApi.getInstance().addButton(current, ScreenCompatApi.getInstance().createButton(backButtonX + 102, backButtonY + 24, 98, 20,
- StringUtils.translate("tweakmyclient.message.autoReconnect.toggle"), AutoReconnectUtil::onPressAutoReconnect));
- reAuthenticateButtonOffsetY = 0;
-
- if (reason == null || getTranslationKey(reason).startsWith("disconnect.loginFailed")) {
+ //#if MC >= 11600
+ ((IScreen) current).tmc$addButton(new Button(backButtonX, backButtonY + 24, 98, 20,
+ new TextComponent(StringUtil.tr("message.autoReconnect.static")), button -> AutoReconnectUtil.reconnect(parent)));
+ AutoReconnectUtil.autoReconnectButton = ((IScreen) current).tmc$addButton(new Button(backButtonX + 102, backButtonY + 24, 98, 20,
+ new TextComponent(StringUtil.tr("message.autoReconnect.toggle")), AutoReconnectUtil::onPressAutoReconnect));
+ //#else
+ //$$ ((IScreen) current).tmc$addButton(new Button(backButtonX, backButtonY + 24, 98, 20,
+ //$$ StringUtil.tr("message.autoReconnect.static"), button -> AutoReconnectUtil.reconnect(parent)));
+ //$$ AutoReconnectUtil.autoReconnectButton = ((IScreen) current).tmc$addButton(new Button(backButtonX + 102, backButtonY + 24, 98, 20,
+ //$$ StringUtil.tr("message.autoReconnect.toggle"), AutoReconnectUtil::onPressAutoReconnect));
+ //#endif
+
+ AutoReconnectUtil.reAuthenticateButtonOffsetY = 0;
+
+ if (reason == null || AutoReconnectUtil.getTranslationKey(reason).startsWith("disconnect.loginFailed")) {
// Auto disable autoReconnect
- Configs.featureAutoReconnect = false;
+ TweakMyClientReference.getConfigHandler().configManager.setValue("featureAutoReconnect", false);
AtomicInteger offsetX = new AtomicInteger();
- modHashMap.forEach(
- (id, reAuthenticateMod) -> {
- if (!reAuthenticateMod.imCompat) {
- ScreenCompatApi.getInstance().addButton(current,
- ScreenCompatApi.getInstance().createButton(backButtonX + offsetX.get(),
- 48 + backButtonY,
- (200 / compatReAuthenticateMods) - (compatReAuthenticateMods > 1 ? 2 : 0),
- 20,
- StringUtils.translate(String.format("tweakmyclient.message.autoReconnect.authenticate.%s", id)),
- b -> TweakMyClient.getMinecraftClient().setScreen(reAuthenticateMod.authScreen)));
- offsetX.addAndGet((200 / compatReAuthenticateMods + 1));
- }
+ int buttonWidth = (200 - 4 * (AutoReconnectUtil.compatReAuthenticateMods - 1)) / AutoReconnectUtil.compatReAuthenticateMods;
+
+ AutoReconnectUtil.modHashMap.forEach(
+ (modId, screen) -> {
+ ((IScreen) current).tmc$addButton(new Button(backButtonX + offsetX.intValue(),
+ 48 + backButtonY,
+ buttonWidth,
+ 20,
+ //#if MC >= 11600
+ new TextComponent(StringUtil.tr(String.format("message.autoReconnect.authenticate.%s", modId))),
+ //#else
+ //$$ StringUtil.tr(String.format("message.autoReconnect.authenticate.%s", modId)),
+ //#endif
+ b -> TweakMyClient.getMinecraftClient().setScreen(screen)));
+ offsetX.getAndAdd(buttonWidth + 4);
}
);
}
}
private static void onPressAutoReconnect(Button button) {
- Configs.featureAutoReconnect = !Configs.featureAutoReconnect;
+ TweakMyClientReference.getConfigHandler().configManager.setValue("featureAutoReconnect", !Configs.featureAutoReconnect);
if (Configs.featureAutoReconnect) {
AutoReconnectUtil.ReconnectTimer = Configs.autoReconnectTimer * 20;
@@ -184,25 +201,25 @@ private static void onPressAutoReconnect(Button button) {
public static void tickAutoReconnectButton(Screen parent) {
if (!Configs.featureAutoReconnect) {
- ScreenCompatApi.getInstance().setButtonMessage(autoReconnectButton, StringUtils.translate("tweakmyclient.message.autoReconnect.toggle"));
+ //#if MC >= 11600
+ AutoReconnectUtil.autoReconnectButton.setMessage(new TextComponent(StringUtil.tr("message.autoReconnect.toggle")));
+ //#else
+ //$$ AutoReconnectUtil.autoReconnectButton.setMessage(StringUtil.tr("message.autoReconnect.toggle"));
+ //#endif
return;
}
- ScreenCompatApi.getInstance().setButtonMessage(autoReconnectButton, StringUtils.translate("tweakmyclient.message.autoReconnect.timer", (int) Math.ceil(AutoReconnectUtil.ReconnectTimer / 20.0)));
+
+ //#if MC >= 11600
+ AutoReconnectUtil.autoReconnectButton.setMessage(new TextComponent(StringUtil.tr("message.autoReconnect.timer", (int) Math.ceil(AutoReconnectUtil.ReconnectTimer / 20.0))));
+ //#else
+ //$$ AutoReconnectUtil.autoReconnectButton.setMessage(StringUtil.tr("message.autoReconnect.timer", (int) Math.ceil(AutoReconnectUtil.ReconnectTimer / 20.0)));
+ //#endif
if (AutoReconnectUtil.ReconnectTimer > 0) {
AutoReconnectUtil.ReconnectTimer--;
return;
}
- AutoReconnectUtil.reconnect(parent);
- }
- public class ReAuthenticateMod {
- public Screen authScreen;
- public boolean imCompat;
-
- public ReAuthenticateMod(Screen screen, boolean imCompat) {
- this.authScreen = screen;
- this.imCompat = imCompat;
- }
+ AutoReconnectUtil.reconnect(parent);
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/util/CustomWindowUtil.java b/src/main/java/top/hendrixshen/tweakmyclient/util/CustomWindowUtil.java
index 264a470b..8c6fcfa5 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/util/CustomWindowUtil.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/util/CustomWindowUtil.java
@@ -5,15 +5,15 @@
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import net.fabricmc.loader.impl.FabricLoaderImpl;
+import net.minecraft.SharedConstants;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.client.resources.language.I18n;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.PackType;
+import org.lwjgl.glfw.GLFW;
import top.hendrixshen.tweakmyclient.TweakMyClient;
import top.hendrixshen.tweakmyclient.TweakMyClientReference;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.SharedConstantCompatApi;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.WindowCompatApi;
import top.hendrixshen.tweakmyclient.config.Configs;
import java.io.IOException;
@@ -34,15 +34,19 @@ public class CustomWindowUtil {
// These data should not be changed
static {
- PLACEHOLDER_STATIC_MAP.put("{fabric_loader_version}", FabricLoaderImpl.VERSION);
- PLACEHOLDER_STATIC_MAP.put("{fabric_loader_asm_version}", String.valueOf(FabricLoaderImpl.ASM_VERSION));
- PLACEHOLDER_STATIC_MAP.put("{mc_protocol_version}", Integer.toString(SharedConstantCompatApi.getInstance().getProtocolVersion()));
- PLACEHOLDER_STATIC_MAP.put("{mc_version}", SharedConstantCompatApi.getInstance().getCurrentVersionName());
- PLACEHOLDER_STATIC_MAP.put("{tmc_version}", TweakMyClientReference.getModVersion());
- PLACEHOLDER_STATIC_MAP.put("{tmc_version_type}", TweakMyClientReference.getModVersionType());
+ CustomWindowUtil.PLACEHOLDER_STATIC_MAP.put("{fabric_loader_version}", FabricLoaderImpl.VERSION);
+ CustomWindowUtil.PLACEHOLDER_STATIC_MAP.put("{fabric_loader_asm_version}", String.valueOf(FabricLoaderImpl.ASM_VERSION));
+ //#if MC >= 11600
+ CustomWindowUtil.PLACEHOLDER_STATIC_MAP.put("{mc_protocol_version}", Integer.toString(SharedConstants.getProtocolVersion()));
+ //#else
+ //$$ CustomWindowUtil.PLACEHOLDER_STATIC_MAP.put("{mc_protocol_version}", Integer.toString(SharedConstants.getCurrentVersion().getProtocolVersion()));
+ //#endif
+ CustomWindowUtil.PLACEHOLDER_STATIC_MAP.put("{mc_version}", SharedConstants.getCurrentVersion().getName());
+ CustomWindowUtil.PLACEHOLDER_STATIC_MAP.put("{tmc_version}", TweakMyClientReference.getModVersion());
+ CustomWindowUtil.PLACEHOLDER_STATIC_MAP.put("{tmc_version_type}", TweakMyClientReference.getModVersionType());
if (Configs.featureCustomWindowTitle) {
- rebuildCache(TitleType.TITLE);
- rebuildCache(TitleType.TITLE_WITH_ACTIVITY);
+ CustomWindowUtil.rebuildCache(TitleType.TITLE);
+ CustomWindowUtil.rebuildCache(TitleType.TITLE_WITH_ACTIVITY);
}
}
@@ -54,7 +58,7 @@ public static String replacePlaceholders(HashMap map, String str
}
public static String getWindowTitle() {
- return replacePlaceholders(PLACEHOLDER_MAP, (hasActivity() ? TITLE_CACHE_WITH_ACTIVITY : TITLE_CACHE));
+ return CustomWindowUtil.replacePlaceholders(PLACEHOLDER_MAP, (hasActivity() ? TITLE_CACHE_WITH_ACTIVITY : TITLE_CACHE));
}
public static String getActivity() {
@@ -76,22 +80,22 @@ public static boolean hasActivity() {
public static void updatePlaceholders() {
// Maybe changed by other mods.
- PLACEHOLDER_MAP.put("{mc_username}", TweakMyClient.getMinecraftClient().getUser().getName());
+ CustomWindowUtil.PLACEHOLDER_MAP.put("{mc_username}", TweakMyClient.getMinecraftClient().getUser().getName());
// Activity data.
- PLACEHOLDER_MAP.put("{mc_activity}", hasActivity() ? getActivity() : "Null");
+ CustomWindowUtil.PLACEHOLDER_MAP.put("{mc_activity}", hasActivity() ? getActivity() : "Null");
}
public static void updateFPS(int fps) {
- PLACEHOLDER_MAP.put("{mc_fps}", String.valueOf(fps));
+ CustomWindowUtil.PLACEHOLDER_MAP.put("{mc_fps}", String.valueOf(fps));
}
public static void rebuildCache(TitleType type) {
if (type == TitleType.TITLE) {
- TITLE_CACHE = replacePlaceholders(PLACEHOLDER_STATIC_MAP, Configs.customWindowTitle);
- TITLE_CACHE = replaceModVersion(TITLE_CACHE);
+ TITLE_CACHE = CustomWindowUtil.replacePlaceholders(PLACEHOLDER_STATIC_MAP, Configs.customWindowTitle);
+ TITLE_CACHE = CustomWindowUtil.replaceModVersion(TITLE_CACHE);
} else if (type == TitleType.TITLE_WITH_ACTIVITY) {
- TITLE_CACHE_WITH_ACTIVITY = replacePlaceholders(PLACEHOLDER_STATIC_MAP, Configs.customWindowTitleWithActivity);
- TITLE_CACHE_WITH_ACTIVITY = replaceModVersion(TITLE_CACHE_WITH_ACTIVITY);
+ TITLE_CACHE_WITH_ACTIVITY = CustomWindowUtil.replacePlaceholders(PLACEHOLDER_STATIC_MAP, Configs.customWindowTitleWithActivity);
+ TITLE_CACHE_WITH_ACTIVITY = CustomWindowUtil.replaceModVersion(TITLE_CACHE_WITH_ACTIVITY);
}
}
@@ -111,12 +115,20 @@ public enum TitleType {
}
public static void reSetTitle() {
- WindowCompatApi.getInstance().resetTitle();
+ //#if MC >= 11500
+ GLFW.glfwSetWindowTitle(TweakMyClient.getMinecraftClient().getWindow().getWindow(), "Minecraft " + SharedConstants.getCurrentVersion().getName());
+ //#else
+ //$$ GLFW.glfwSetWindowTitle(TweakMyClient.getMinecraftClient().window.getWindow(), "Minecraft " + SharedConstants.getCurrentVersion().getName());
+ //#endif
}
public static void updateTitle() {
updatePlaceholders();
- WindowCompatApi.getInstance().setTitle(WindowCompatApi.getInstance().getWindow().getWindow(), getWindowTitle());
+ //#if MC >= 11500
+ GLFW.glfwSetWindowTitle(TweakMyClient.getMinecraftClient().getWindow().getWindow(), CustomWindowUtil.getWindowTitle());
+ //#else
+ //$$ GLFW.glfwSetWindowTitle(TweakMyClient.getMinecraftClient().window.getWindow(), CustomWindowUtil.getWindowTitle());
+ //#endif
}
public static void updateIcon(Window window) {
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/util/InventoryUtil.java b/src/main/java/top/hendrixshen/tweakmyclient/util/InventoryUtil.java
index d5df662a..3f76512d 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/util/InventoryUtil.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/util/InventoryUtil.java
@@ -1,8 +1,12 @@
package top.hendrixshen.tweakmyclient.util;
+//#if MC >= 11700
+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
+//#endif
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.gui.screens.inventory.InventoryScreen;
+import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.client.multiplayer.MultiPlayerGameMode;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.network.protocol.game.ServerboundContainerClickPacket;
@@ -10,57 +14,66 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.PlayerCompatApi;
import top.hendrixshen.tweakmyclient.config.Configs;
import top.hendrixshen.tweakmyclient.helper.AutoDropListType;
import top.hendrixshen.tweakmyclient.helper.ListCache;
-import java.util.Objects;
-
public class InventoryUtil {
public static void doDrop() {
Minecraft minecraftClient = TweakMyClient.getMinecraftClient();
MultiPlayerGameMode interactionManager = minecraftClient.gameMode;
+ LocalPlayer localPlayer = minecraftClient.player;
if (minecraftClient.screen instanceof AbstractContainerScreen && !(minecraftClient.screen instanceof InventoryScreen)) {
return;
}
- for (int slot = 9; slot < 45; slot++) {
- int adjustedSlot = slot;
- if (adjustedSlot >= 36)
- adjustedSlot -= 36;
- assert minecraftClient.player != null;
- ItemStack stack = PlayerCompatApi.getInstance().getInventory(minecraftClient.player).getItem(adjustedSlot);
+ if (localPlayer != null && interactionManager != null) {
+ for (int slot = 9; slot < 45; slot++) {
+ int adjustedSlot = slot;
+ if (adjustedSlot >= 36)
+ adjustedSlot -= 36;
+ assert minecraftClient.player != null;
+ //#if MC >= 11700
+ ItemStack stack = localPlayer.getInventory().getItem(adjustedSlot);
+ //#else
+ //$$ ItemStack stack = localPlayer.inventory.getItem(adjustedSlot);
+ //#endif
- if (stack.isEmpty())
- continue;
+ if (stack.isEmpty())
+ continue;
- AutoDropListType mode = (AutoDropListType) Configs.listAutoDropType;
- switch (mode) {
- case BLACKLIST:
- if (!ListCache.itemAutoDropBlackList.contains(stack.getItem())) {
- assert interactionManager != null;
- PlayerCompatApi.getInstance().handleInventoryMouseClick(interactionManager, 0, slot, 1, ClickType.THROW, TweakMyClient.getMinecraftClient().player);
- }
- break;
- case WHITELIST:
- if (ListCache.itemAutoDropWhiteList.contains(stack.getItem())) {
- assert interactionManager != null;
- PlayerCompatApi.getInstance().handleInventoryMouseClick(interactionManager, 0, slot, 1, ClickType.THROW, TweakMyClient.getMinecraftClient().player);
- }
- break;
+ AutoDropListType mode = Configs.listAutoDropType;
+ switch (mode) {
+ case BLACKLIST:
+ if (!ListCache.itemAutoDropBlackList.contains(stack.getItem())) {
+ //handleInventoryMouseClick(MultiPlayerGameMode interactionManager, int containerId, int slot, int button, ClickType clickType, Player player)
+ interactionManager.handleInventoryMouseClick(0, slot, 1, ClickType.THROW, localPlayer);
+ }
+ break;
+ case WHITELIST:
+ if (ListCache.itemAutoDropWhiteList.contains(stack.getItem())) {
+ interactionManager.handleInventoryMouseClick(0, slot, 1, ClickType.THROW, localPlayer);
+ }
+ break;
+ }
}
}
}
public static void refreshInventory() {
- LocalPlayer localPlayer = TweakMyClient.getMinecraftClient().player;
- if (localPlayer != null) {
- short playerNextActionId = localPlayer.containerMenu.backup(localPlayer.inventory);
+ Minecraft minecraft = TweakMyClient.getMinecraftClient();
+ LocalPlayer localPlayer = minecraft.player;
+ ClientPacketListener clientPacketListener = minecraft.getConnection();
+ if (localPlayer != null && clientPacketListener != null) {
+ //short playerNextActionId = localPlayer.containerMenu.backup(localPlayer.inventory);
ItemStack itemStack = new ItemStack(Items.BEDROCK);
- Objects.requireNonNull(TweakMyClient.getMinecraftClient().getConnection()).send(
- new ServerboundContainerClickPacket(0, 0, 0, ClickType.QUICK_MOVE, itemStack, playerNextActionId)
- );
+ //#if MC >= 11700
+ Int2ObjectOpenHashMap int2ObjectMap = new Int2ObjectOpenHashMap<>();
+ clientPacketListener.send(new ServerboundContainerClickPacket(0, 0, 0, 0, ClickType.QUICK_MOVE, itemStack, int2ObjectMap));
+ //#else
+ //$$short playerNextActionId = localPlayer.containerMenu.backup(localPlayer.inventory);
+ //$$clientPacketListener.send(new ServerboundContainerClickPacket(0, 0, 0, ClickType.QUICK_MOVE, itemStack, playerNextActionId));
+ //#endif
}
}
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/util/StringUtil.java b/src/main/java/top/hendrixshen/tweakmyclient/util/StringUtil.java
index 873ec5f4..fbb27a1d 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/util/StringUtil.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/util/StringUtil.java
@@ -1,8 +1,13 @@
package top.hendrixshen.tweakmyclient.util;
+import com.mojang.brigadier.StringReader;
+import com.mojang.brigadier.exceptions.CommandSyntaxException;
+import net.minecraft.commands.arguments.item.ItemParser;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.compat.proxy.parser.ItemStackCompatApi;
+import top.hendrixshen.magiclib.language.I18n;
+import top.hendrixshen.tweakmyclient.TweakMyClient;
+import top.hendrixshen.tweakmyclient.TweakMyClientReference;
import java.util.HashSet;
import java.util.List;
@@ -11,7 +16,7 @@ public class StringUtil {
public static HashSet- getItemStackSets(List items) {
HashSet
- itemStackSet = new HashSet<>();
for (String str : items) {
- ItemStack stack = ItemStackCompatApi.getInstance().toItemStack(str);
+ ItemStack stack = StringUtil.toItemStack(str);
if (!stack.isEmpty()) {
itemStackSet.add(stack.getItem());
@@ -19,4 +24,26 @@ public static HashSet
- getItemStackSets(List items) {
}
return itemStackSet;
}
+
+ public static ItemStack toItemStack(String string) {
+ try {
+ ItemParser reader = new ItemParser(new StringReader(string), true);
+ reader.parse();
+ Item item = reader.getItem();
+
+ if (item != null) {
+ ItemStack stack = new ItemStack(item);
+ stack.setTag(reader.getNbt());
+ return stack;
+ }
+ } catch (CommandSyntaxException e) {
+ TweakMyClient.getLogger().debug("Invalid item '{}'", string);
+ }
+
+ return ItemStack.EMPTY;
+ }
+
+ public static String tr(String key, Object... objects) {
+ return I18n.get(String.format("%s.%s", TweakMyClientReference.getModId(), key), objects);
+ }
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/util/render/OverlayRenderer.java b/src/main/java/top/hendrixshen/tweakmyclient/util/render/OverlayRenderer.java
index 9737588b..16c621b3 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/util/render/OverlayRenderer.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/util/render/OverlayRenderer.java
@@ -1,13 +1,16 @@
package top.hendrixshen.tweakmyclient.util.render;
+//#if MC >= 11600
import fi.dy.masa.malilib.util.Color4f;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.projectile.FishingHook;
import top.hendrixshen.tweakmyclient.config.Configs;
import top.hendrixshen.tweakmyclient.fakeInterface.IFishingHookEntity;
+//#endif
public class OverlayRenderer {
+ //#if MC >= 11600
private static final OverlayRenderer INSTANCE = new OverlayRenderer();
public static OverlayRenderer getInstance() {
@@ -29,4 +32,5 @@ public void renderOpenWater(Minecraft minecraft) {
private boolean isInOpenWater(FishingHook fishHook) {
return ((IFishingHookEntity) fishHook).checkOpenWaterAround(fishHook.blockPosition());
}
+ //#endif
}
diff --git a/src/main/java/top/hendrixshen/tweakmyclient/util/render/RenderUtil.java b/src/main/java/top/hendrixshen/tweakmyclient/util/render/RenderUtil.java
index 4dc13b30..98425837 100644
--- a/src/main/java/top/hendrixshen/tweakmyclient/util/render/RenderUtil.java
+++ b/src/main/java/top/hendrixshen/tweakmyclient/util/render/RenderUtil.java
@@ -1,15 +1,27 @@
package top.hendrixshen.tweakmyclient.util.render;
+//#if MC >= 11600
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.BufferBuilder;
+import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.Tesselator;
+//#if MC >= 11700
+import com.mojang.blaze3d.vertex.VertexFormat;
+//#endif
import fi.dy.masa.malilib.util.Color4f;
import net.minecraft.client.Minecraft;
+//#if MC >= 11700
+import net.minecraft.client.renderer.GameRenderer;
+//#endif
import net.minecraft.core.BlockPos;
import net.minecraft.world.phys.Vec3;
-import top.hendrixshen.tweakmyclient.compat.proxy.render.BufferBuilderCompatApi;
+//#if MC < 11700
+import org.lwjgl.opengl.GL11;
+//#endif
+//#endif
public class RenderUtil {
+ //#if MC >= 11600
public static void renderAreaOutline(BlockPos pos1, BlockPos pos2, float lineWidth, Color4f colorX, Color4f colorY, Color4f colorZ, Minecraft minecraft) {
RenderSystem.lineWidth(lineWidth);
@@ -32,8 +44,13 @@ private static void drawBoundingBoxEdges(double minX, double minY, double minZ,
Tesselator tesselator = Tesselator.getInstance();
BufferBuilder bufferbuilder = tesselator.getBuilder();
- BufferBuilderCompatApi.getInstance().compat_1_17_above();
- BufferBuilderCompatApi.getInstance().beginGLLines(bufferbuilder);
+ //#if MC > 11700
+ RenderSystem.setShader(GameRenderer::getPositionColorShader);
+ RenderSystem.applyModelViewMatrix();
+ bufferbuilder.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
+ //#else
+ //$$ bufferbuilder.begin(GL11.GL_LINES, DefaultVertexFormat.POSITION_COLOR);
+ //#endif
drawBoundingBoxLinesX(bufferbuilder, minX, minY, minZ, maxX, maxY, maxZ, colorX);
drawBoundingBoxLinesY(bufferbuilder, minX, minY, minZ, maxX, maxY, maxZ, colorY);
@@ -83,4 +100,5 @@ private static void drawBoundingBoxLinesZ(BufferBuilder buffer, double minX, dou
buffer.vertex(maxX, maxY, minZ).color(color.r, color.g, color.b, color.a).endVertex();
buffer.vertex(maxX, maxY, maxZ).color(color.r, color.g, color.b, color.a).endVertex();
}
+ //#endif
}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 21fc6b0f..167e26c3 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -1,10 +1,10 @@
{
"schemaVersion": 1,
- "id": "tweakmyclient",
- "name": "TweakMyClient",
+ "id": "${mod_id}-${minecraft_version_id}",
"version": "${mod_version}",
- "icon": "assets/tweakmyclient/icon.png",
- "description": "Add something interesting <3",
+ "icon": "assets/${mod_id}/icon.png",
+ "name": "${mod_name} for ${minecraft_version}",
+ "description": "${mod_name} for ${minecraft_version}",
"authors": [
{
"name": "Hendrix_Shen",
@@ -14,14 +14,14 @@
}
],
"contact": {
- "homepage": "https://www.curseforge.com/minecraft/mc-mods/tweakmyclient",
- "issues": "https://github.com/Hendrix-Shen/Tweak-My-Client/issues",
- "sources": "https://github.com/Hendrix-Shen/Tweak-My-Client"
+ "homepage": "${mod_homepage}",
+ "issues": "${mod_sources}/issues",
+ "sources": "${mod_sources}"
},
- "license": "GPLv3",
+ "license": "${mod_license}",
"environment": "client",
"entrypoints": {
- "main": [
+ "client": [
"top.hendrixshen.tweakmyclient.TweakMyClient"
],
"modmenu": [
@@ -29,13 +29,16 @@
]
},
"mixins": [
- "TweakMyClient.mixins.json"
+ "${mod_id}.mixins.json"
],
"depends": {
- "fabricloader": ">=0.9.0",
- "magiclib": ">=0.3.24"
+ "minecraft": "${minecraft_dependency}",
+ "magiclib-${minecraft_version_id}": ">=${magiclib_version}"
},
"custom": {
- "modmenu:clientsideOnly": true
+ "modmenu:parent": "${mod_id}",
+ "modmenu": {
+ "parent": "${mod_id}"
+ }
}
}
diff --git a/src/main/resources/TweakMyClient.mixins.json b/src/main/resources/tweakmyclient.mixins.json
similarity index 76%
rename from src/main/resources/TweakMyClient.mixins.json
rename to src/main/resources/tweakmyclient.mixins.json
index 08514338..4f4cefc3 100644
--- a/src/main/resources/TweakMyClient.mixins.json
+++ b/src/main/resources/tweakmyclient.mixins.json
@@ -1,11 +1,8 @@
{
"required": true,
- "package": "top.hendrixshen.tweakmyclient.mixin",
- "plugin": "top.hendrixshen.tweakmyclient.TweakMyClientMixinPlugin",
"minVersion": "0.8",
+ "package": "top.hendrixshen.tweakmyclient.mixin",
"compatibilityLevel": "JAVA_8",
- "client": [
- ],
"mixins": [
"disable.disableAttackEntity.MixinMinecraft",
"disable.disableClientBlockEvents.MixinClientPacketListener",
@@ -14,16 +11,26 @@
"disable.disableFovAffectedBySpeed.MixinGameRenderer",
"disable.disableGuiShadowLayer.MixinScreen",
"disable.disableItemGlowing.MixinItemStack",
+ "disable.disableRenderBossBar.MixinBossHealthOverlay",
+ "disable.disableRenderOverlayFire.MixinItemInHandRenderer",
"disable.disableRenderOverlayFire.MixinScreenEffectRenderer",
+ "disable.disableRenderOverlayPowderSnow.MixinGui",
"disable.disableRenderOverlayPumpkin.MixinGui",
"disable.disableRenderScoreboard.MixinGui",
"disable.disableRenderToast.MixinToastComponent",
- "disable.disableSlowdown.MixinBlock",
+ "disable.disableSlowdown.MixinEntity",
+ "disable.disableSlowdown.MixinLivingEntity",
"disable.disableSlowdown.MixinLocalPlayer",
+ "disable.disableSlowdown.MixinSlimeBlock",
+ "disable.disableSlowdown.MixinSoulsandBlock",
"disable.disableSlowdown.MixinWebBlock",
+ "disable.disableSlowdown.tweakeroo.MixinSlimeBlock",
"feature.featureAutoClimb.MixinLocalPlayer",
"feature.featureAutoDrop.MixinLocalPlayer",
+ "feature.featureAutoReconnect.MixinDisconnectedScreen",
"feature.featureAutoReconnect.MixinMinecraft",
+ "feature.featureAutoReconnect.MixinScreen",
+ "feature.featureAutoRespawn.MixinDeathScreen",
"feature.featureCustomBlockOutsideColor.MixinLevelRenderer",
"feature.featureCustomGuiBackgroundColor.MixinScreen",
"feature.featureCustomSidebarBackgroundColor.MixinGui",
@@ -31,6 +38,7 @@
"feature.featureCustomWindowIcon.MixinMinecraft",
"feature.featureCustomWindowTitle.MixinMinecraft",
"feature.featureDaylightOverride.MixinClientLevelClientLevelData",
+ "feature.featureDaylightOverride.MixinLevel",
"feature.featureGlobalEventListener.MixinLevelRenderer",
"feature.featureLowHealthWarning.MixinLocalPlayer",
"feature.featureOpenWaterHelper.MixinFishingHook",
@@ -41,6 +49,8 @@
"patch.forceDebugInfoDetailed.MixinPlayer",
"patch.forcePistonWithoutAffectByTool.MixinMiningToolItem"
],
+ "client": [
+ ],
"injectors": {
"defaultRequire": 1
}
diff --git a/tweakmyclient-compat-mc1_14/build.gradle b/tweakmyclient-compat-mc1_14/build.gradle
deleted file mode 100644
index fa4b7fa4..00000000
--- a/tweakmyclient-compat-mc1_14/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-dependencies {
- minecraft("com.mojang:minecraft:${project.minecraft_version}")
-
- modImplementation("curse.maven:malilib-303119:${project.library_malilib_version}")
- modImplementation("curse.maven:modmenu-308702:${project.library_modmenu_version}")
-
- modRuntimeOnly("curse.maven:in-game-account-switcher-232676:${project.library_inGameAccountSwitcher_version}")
- modRuntimeOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modRuntimeOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
-}
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_14/gradle.properties b/tweakmyclient-compat-mc1_14/gradle.properties
deleted file mode 100644
index deb0caf5..00000000
--- a/tweakmyclient-compat-mc1_14/gradle.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Mod reference
-mod_id = tweakmyclient-compat-mc1_14
-
-# Development Environment
-minecraft_version = 1.14.4
-
-# Require Libraries
-# MaLiLib - 0.10.0-dev.20+arne.2
-library_malilib_version = 2876325
-# Mod Menu - 1.7.17
-library_modmenu_version = 3121565
-
-# Compatible Libraries
-# Auth Me - 1.1.2
-library_authme_version = 2990330
-# In-Game Account Switcher - 7.1.3
-library_inGameAccountSwitcher_version = 3493805
-# Litematica - 0.0.0-dev.20191222.014040
-library_litematica_version = 2846571
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
deleted file mode 100644
index 2e254a18..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.api.ModInitializer;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.SharedConstantCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.WindowCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.EntityCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.PlayerCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.parser.ItemStackCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ConnectionCompatScreenImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ScreenCompatImpl;
-
-public class TweakMyClientCompat implements ModInitializer {
- @Override
- public void onInitialize() {
- TweakMyClient.getLogger().info("[{}]: Compat module for {} loaded. Starting compat api...", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getCompatVersion());
-
- SharedConstantCompatImpl.initCompat();
- WindowCompatImpl.initCompat();
-
- EntityCompatImpl.initCompat();
- PlayerCompatImpl.initCompat();
-
- ItemStackCompatImpl.initCompat();
-
- ConnectionCompatScreenImpl.initCompat();
- ScreenCompatImpl.initCompat();
-
- TweakMyClient.getLogger().info("[{}]: Compat initialized - Version: {} ({})", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getModVersion(), TweakMyClientCompatReference.getModVersionType());
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
deleted file mode 100644
index 28e582a0..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.loader.api.FabricLoader;
-import top.hendrixshen.tweakmyclient.util.VersionParser;
-
-public class TweakMyClientCompatReference {
- private static final String MOD_COMPAT_VERSION = "MC 1.14.x";
- private static final String MOD_ID = "tweakmyclient-compat-mc1_14";
- private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
- private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
- private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);
-
- public static String getCompatVersion() {
- return MOD_COMPAT_VERSION;
- }
-
- public static String getModId() {
- return MOD_ID;
- }
-
- public static String getModName() {
- return MOD_NAME;
- }
-
- public static String getModVersion() {
- return MOD_VERSION;
- }
-
- public static String getModVersionType() {
- return MOD_VERSION_TYPE;
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableClientEntityRendering/MixinEntityRenderDispatcher.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableClientEntityRendering/MixinEntityRenderDispatcher.java
deleted file mode 100644
index c7d7ae71..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableClientEntityRendering/MixinEntityRenderDispatcher.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableClientEntityRendering;
-
-import net.minecraft.client.renderer.culling.Culler;
-import net.minecraft.client.renderer.entity.EntityRenderDispatcher;
-import net.minecraft.world.entity.Entity;
-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.CallbackInfoReturnable;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Mixin(EntityRenderDispatcher.class)
-public abstract class MixinEntityRenderDispatcher {
- @Inject(
- method = "shouldRender",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onShouldRender(Entity entity, Culler culler, double d, double e, double f, CallbackInfoReturnable cir) {
- if (CommonCompatLib.disableClientEntity(entity)) {
- cir.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableGuiShadowLayer/MixinScreen.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableGuiShadowLayer/MixinScreen.java
deleted file mode 100644
index 2a019762..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableGuiShadowLayer/MixinScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableGuiShadowLayer;
-
-import net.minecraft.client.gui.components.events.AbstractContainerEventHandler;
-import net.minecraft.client.gui.screens.Screen;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen extends AbstractContainerEventHandler {
- @Inject(
- method = "renderBackground(I)V",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(IIIIII)V"
- ),
- cancellable = true
- )
- private void onFillGradient(int i, CallbackInfo ci) {
- if (Configs.disableGuiShadowLayer) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
deleted file mode 100644
index 6e630c16..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderBossBar;
-
-import net.minecraft.client.gui.components.BossHealthOverlay;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(BossHealthOverlay.class)
-public class MixinBossHealthOverlay {
- @Inject(
- method = "render",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRender(CallbackInfo ci) {
- if (Configs.disableRenderBossBar) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayFire/MixinItemInHandRenderer.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayFire/MixinItemInHandRenderer.java
deleted file mode 100644
index 62c0c3db..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayFire/MixinItemInHandRenderer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayFire;
-
-import net.minecraft.client.renderer.ItemInHandRenderer;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(ItemInHandRenderer.class)
-public abstract class MixinItemInHandRenderer {
- @Inject(
- method = "renderFire",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderFireOverlay(CallbackInfo ci) {
- if (Configs.disableRenderOverlayFire) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderScoreboard/MixinGui.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderScoreboard/MixinGui.java
deleted file mode 100644
index ef516d59..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderScoreboard/MixinGui.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderScoreboard;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.world.scores.Objective;
-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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Dependencies(and = @Dependency(value = "minecraft", versionPredicate = ">=1.16"))
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @Inject(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderScoreboardSidebar(Objective objective, CallbackInfo ci) {
- if (Configs.disableRenderScoreboard) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinBlock.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinBlock.java
deleted file mode 100644
index a706ef7b..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinBlock.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.level.block.Block;
-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.CallbackInfoReturnable;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Block.class)
-public class MixinBlock {
- @Inject(
- method = "getFriction",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onGetFriction(CallbackInfoReturnable cir) {
- if (Configs.disableSlowdown && cir.getReturnValueF() < 0.6F) {
- cir.setReturnValue(0.6F);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
deleted file mode 100644
index de672cba..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.BlockGetter;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "updateEntityAfterFallOn",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/world/entity/Entity;getDeltaMovement()Lnet/minecraft/world/phys/Vec3;"
- ),
- cancellable = true
- )
- private void onbounceUp(BlockGetter blockGetter, Entity entity, CallbackInfo ci) {
- CommonCompatLib.disableSlowdown(entity, ci);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
deleted file mode 100644
index 50126604..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown.tweakeroo;
-
-import net.minecraft.core.BlockPos;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.Level;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Dependencies(not = @Dependency(value = "tweakeroo"))
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "stepOn",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void stepOn(Level level, BlockPos blockPos, Entity entity, CallbackInfo ci) {
- if (Configs.disableSlowdown) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
deleted file mode 100644
index 0319c9e3..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.screens.DisconnectedScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.Component;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.util.AutoReconnectUtil;
-
-@Mixin(value = DisconnectedScreen.class, priority = 900)
-public class MixinDisconnectedScreen extends Screen {
- @Shadow
- @Final
- private Screen parent;
-
- @Shadow
- private int textHeight;
-
- @Shadow
- @Final
- private Component reason;
-
- protected MixinDisconnectedScreen(Component component) {
- super(component);
- }
-
- @Inject(
- method = "init",
- at = @At(
- value = "TAIL"
- ),
- cancellable = true
- )
- private void onInitDisconnectedScreen(CallbackInfo ci) {
- AutoReconnectUtil.getInstance().initDisconnectedScreen(this, parent, width, height, textHeight, reason);
- ci.cancel();
- }
-
- @Override
- public void tick() {
- AutoReconnectUtil.tickAutoReconnectButton(parent);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
deleted file mode 100644
index 422ad1dc..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.components.AbstractWidget;
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen implements IScreen {
- @Shadow
- protected abstract AbstractWidget addButton(AbstractWidget par1);
-
- @Override
- public Button addButtonEx(Button button) {
- return (Button) addButton(button);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
deleted file mode 100644
index a24ca8fb..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoRespawn;
-
-import net.minecraft.client.gui.screens.DeathScreen;
-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;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(DeathScreen.class)
-public class MixinDeathScreen {
- @Inject(
- method = "tick",
- at = @At(
- value = "TAIL"
- )
- )
- private void onTick(CallbackInfo ci) {
- if (Configs.featureAutoRespawn) {
- assert TweakMyClient.getMinecraftClient().player != null;
- TweakMyClient.getMinecraftClient().player.respawn();
- TweakMyClient.getMinecraftClient().setScreen(null);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomBlockOutsideColor/MixinLevelRenderer.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomBlockOutsideColor/MixinLevelRenderer.java
deleted file mode 100644
index 7b97de72..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomBlockOutsideColor/MixinLevelRenderer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureCustomBlockOutsideColor;
-
-import fi.dy.masa.malilib.util.Color4f;
-import net.minecraft.client.renderer.LevelRenderer;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.ModifyArgs;
-import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(LevelRenderer.class)
-public abstract class MixinLevelRenderer {
- @ModifyArgs(
- method = "renderHitOutline",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/renderer/LevelRenderer;renderShape(Lnet/minecraft/world/phys/shapes/VoxelShape;DDDFFFF)V"
- )
- )
- private void onDrawBlockOutline(Args args) {
- if (Configs.featureCustomBlockOutsideColor) {
- Color4f color = Configs.colorBlockOutside;
- args.set(4, color.r);
- args.set(5, color.g);
- args.set(6, color.b);
- args.set(7, color.a);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java
deleted file mode 100644
index a1c340a4..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureCustomGuiBackgroundColor;
-
-import net.minecraft.client.gui.components.events.AbstractContainerEventHandler;
-import net.minecraft.client.gui.screens.Screen;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.ModifyArgs;
-import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen extends AbstractContainerEventHandler {
- /**
- * args
- * 0 – startX
- * 1 – startY
- * 2 – endX
- * 3 – endY
- * 4 – colorStart
- * 5 – colorEnd
- */
- @ModifyArgs(
- method = "renderBackground(I)V",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(IIIIII)V"
- )
- )
- private void onFillGradient(Args args) {
- if (Configs.featureCustomGuiBackgroundColor) {
- args.set(4, Configs.colorGuiStart.intValue);
- args.set(5, Configs.colorGuiStop.intValue);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java
deleted file mode 100644
index af1394d9..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureCustomSidebarBackgroundColor;
-
-import net.minecraft.client.gui.Gui;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.ModifyArgs;
-import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @ModifyArgs(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
- ordinal = 1
- )
- )
- private void changeSidebarTitleBackgroundColor(Args args) {
- if (Configs.featureCustomSidebarBackgroundColor) {
- args.set(4, Configs.colorSidebarTitle.intValue);
- }
- }
-
- @ModifyArgs(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
- ordinal = 0
- )
- )
- private void changeSidebarContentBackgroundColor_1(Args args) {
- if (Configs.featureCustomSidebarBackgroundColor) {
- args.set(4, Configs.colorSidebarContent.intValue);
- }
- }
-
- @ModifyArgs(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
- ordinal = 2
- )
- )
- private void changeSidebarContentBackgroundColor_2(Args args) {
- if (Configs.featureCustomSidebarBackgroundColor) {
- args.set(4, Configs.colorSidebarContent.intValue);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomWindowIcon/MixinMinecraft.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomWindowIcon/MixinMinecraft.java
deleted file mode 100644
index 294f2513..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomWindowIcon/MixinMinecraft.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureCustomWindowIcon;
-
-import com.mojang.blaze3d.platform.Window;
-import net.minecraft.client.Minecraft;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.util.CustomWindowUtil;
-
-@Mixin(Minecraft.class)
-public abstract class MixinMinecraft {
- @Shadow
- public Window window;
-
- @Inject(
- method = "run",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/Minecraft;init()V",
- shift = At.Shift.AFTER
- )
- )
- private void afterInit(CallbackInfo ci) {
- CustomWindowUtil.updateIcon(this.window);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomWindowTitle/MixinMinecraft.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomWindowTitle/MixinMinecraft.java
deleted file mode 100644
index a4177016..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomWindowTitle/MixinMinecraft.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureCustomWindowTitle;
-
-import net.minecraft.client.Minecraft;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.Slice;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.util.CustomWindowUtil;
-
-@Mixin(Minecraft.class)
-public abstract class MixinMinecraft {
- @Shadow
- private static int fps;
-
- @Inject(
- method = "run",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/Minecraft;init()V",
- shift = At.Shift.AFTER
- )
- )
- private void afterInit(CallbackInfo ci) {
- if (Configs.featureCustomWindowTitle) {
- CustomWindowUtil.updateTitle();
- }
- }
-
- @Inject(
- method = "run",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/Minecraft;runTick(Z)V"
- )
- )
- private void onRunTick(CallbackInfo ci) {
- if (Configs.featureCustomWindowTitle) {
- CustomWindowUtil.updateTitle();
- }
- }
-
- // Expose FPS data
- @Inject(
- method = "runTick",
- slice = @Slice(
- from = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/Util;getMillis()J"
- ),
- to = @At(
- value = "INVOKE",
- target = "Ljava/lang/String;format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;",
- remap = false
- )
- ),
- at = @At(
- value = "INVOKE",
- target = "Ljava/lang/String;format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;"
- )
- )
- private void afterCalculateFPS(boolean bl, CallbackInfo ci) {
- CustomWindowUtil.updateFPS(fps);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureDaylightOverride/MixinLevel.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureDaylightOverride/MixinLevel.java
deleted file mode 100644
index e9f84dbf..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureDaylightOverride/MixinLevel.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureDaylightOverride;
-
-import net.minecraft.world.level.Level;
-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.CallbackInfoReturnable;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Level.class)
-public class MixinLevel {
- @Inject(
- method = "getDayTime",
- at = @At(
- value = "RETURN"
- ),
- cancellable = true
- )
- private void onGetTimeOfDay(CallbackInfoReturnable cir) {
- if (Configs.featureDaylightOverride) {
- cir.setReturnValue((long) Configs.daylightOverrideTime);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/misc/MixinI18n.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/misc/MixinI18n.java
deleted file mode 100644
index db55b24b..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/misc/MixinI18n.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.misc;
-
-import net.minecraft.client.resources.language.I18n;
-import net.minecraft.client.resources.language.Locale;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-
-/* Fix the dumb "Caused by: java.lang.NullPointerException: Cannot invoke
- "net.minecraft.client.resources.language.Locale.get(String, Object[])" because
- "net.minecraft.client.resources.language.I18n.locale" is null"
-*/
-@Mixin(I18n.class)
-public class MixinI18n {
- @Shadow
- private static Locale locale;
-
- @Inject(
- method = "get",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private static void get(String string, Object[] objects, CallbackInfoReturnable cir) {
- if (locale == null) {
- cir.setReturnValue(string);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
deleted file mode 100644
index d363ac75..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.patch.endPortalRendererFix;
-
-import com.mojang.blaze3d.platform.GlStateManager;
-import com.mojang.blaze3d.vertex.BufferBuilder;
-import com.mojang.blaze3d.vertex.DefaultVertexFormat;
-import com.mojang.blaze3d.vertex.Tesselator;
-import net.minecraft.Util;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.GameRenderer;
-import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
-import net.minecraft.client.renderer.blockentity.TheEndPortalRenderer;
-import net.minecraft.core.Direction;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Overwrite;
-import org.spongepowered.asm.mixin.Shadow;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-
-import java.nio.FloatBuffer;
-import java.util.Random;
-
-@Mixin(TheEndPortalRenderer.class)
-public abstract class MixinTheEndPortalRenderer extends BlockEntityRenderer {
- @Shadow
- @Final
- private static ResourceLocation END_SKY_LOCATION;
-
- @Shadow
- @Final
- private static Random RANDOM;
-
- @Shadow
- @Final
- private static ResourceLocation END_PORTAL_LOCATION;
-
- @Shadow
- protected abstract FloatBuffer getBuffer(float par1, float par2, float par3, float par4);
-
- @Shadow
- @Final
- private static FloatBuffer MODELVIEW;
-
- @Shadow
- @Final
- private static FloatBuffer PROJECTION;
-
- @Shadow
- protected abstract int getPasses(double d);
-
- @Shadow
- protected abstract float getOffset();
-
- private void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, BufferBuilder bufferBuilder, double f, double g, double h, double i, double j, double k,
- double l, double m, float n, float o, float p, Direction direction) {
- if (theEndPortalBlockEntity.shouldRenderFace(direction)) {
- bufferBuilder.vertex(f, h, j).color(n, o, p, 1.0F).endVertex();
- bufferBuilder.vertex(g, h, k).color(n, o, p, 1.0F).endVertex();
- bufferBuilder.vertex(g, i, l).color(n, o, p, 1.0F).endVertex();
- bufferBuilder.vertex(f, i, m).color(n, o, p, 1.0F).endVertex();
- }
- }
-
- /**
- * @author Hendrix-Shen
- * @reason Fix endPortalBlockEntity renderer.
- */
- @Overwrite
- public void render(TheEndPortalBlockEntity theEndPortalBlockEntity, double d, double e, double f, float g, int i) {
- GlStateManager.disableLighting();
- RANDOM.setSeed(31100L);
- GlStateManager.getMatrix(2982, MODELVIEW);
- GlStateManager.getMatrix(2983, PROJECTION);
- double h = d * d + e * e + f * f;
- int j = this.getPasses(h);
- float k = this.getOffset();
- boolean bl = false;
- GameRenderer gameRenderer = Minecraft.getInstance().gameRenderer;
-
- for (int l = 0; l < j; ++l) {
- GlStateManager.pushMatrix();
- float m = 2.0F / (float) (18 - l);
- if (l == 0) {
- this.bindTexture(END_SKY_LOCATION);
- m = 0.15F;
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
- }
-
- if (l >= 1) {
- this.bindTexture(END_PORTAL_LOCATION);
- bl = true;
- gameRenderer.resetFogColor(true);
- }
-
- if (l == 1) {
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
- }
-
- GlStateManager.texGenMode(GlStateManager.TexGen.S, 9216);
- GlStateManager.texGenMode(GlStateManager.TexGen.T, 9216);
- GlStateManager.texGenMode(GlStateManager.TexGen.R, 9216);
- GlStateManager.texGenParam(GlStateManager.TexGen.S, 9474, this.getBuffer(1.0F, 0.0F, 0.0F, 0.0F));
- GlStateManager.texGenParam(GlStateManager.TexGen.T, 9474, this.getBuffer(0.0F, 1.0F, 0.0F, 0.0F));
- GlStateManager.texGenParam(GlStateManager.TexGen.R, 9474, this.getBuffer(0.0F, 0.0F, 1.0F, 0.0F));
- GlStateManager.enableTexGen(GlStateManager.TexGen.S);
- GlStateManager.enableTexGen(GlStateManager.TexGen.T);
- GlStateManager.enableTexGen(GlStateManager.TexGen.R);
- GlStateManager.popMatrix();
- GlStateManager.matrixMode(5890);
- GlStateManager.pushMatrix();
- GlStateManager.loadIdentity();
- GlStateManager.translatef(0.5F, 0.5F, 0.0F);
- GlStateManager.scalef(0.5F, 0.5F, 1.0F);
- float n = (float) (l + 1);
- GlStateManager.translatef(17.0F / n, (2.0F + n / 1.5F) * ((float) (Util.getMillis() % 800000L) / 800000.0F), 0.0F);
- GlStateManager.rotatef((n * n * 4321.0F + n * 9.0F) * 2.0F, 0.0F, 0.0F, 1.0F);
- GlStateManager.scalef(4.5F - n / 4.0F, 4.5F - n / 4.0F, 1.0F);
- GlStateManager.multMatrix(PROJECTION);
- GlStateManager.multMatrix(MODELVIEW);
- Tesselator tesselator = Tesselator.getInstance();
- BufferBuilder bufferBuilder = tesselator.getBuilder();
- bufferBuilder.begin(7, DefaultVertexFormat.POSITION_COLOR);
- float o = (RANDOM.nextFloat() * 0.5F + 0.1F) * m;
- float p = (RANDOM.nextFloat() * 0.5F + 0.4F) * m;
- float q = (RANDOM.nextFloat() * 0.5F + 0.5F) * m;
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.ACTUAL) {
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 0.75, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.75, e, f, f, f, f, o, p, q, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 0.75, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 0.75, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.75, e + 0.75, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.FULL) {
- // Rendering the end portal as a full block.
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e, f, f, f, f, o, p, q, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 1.0F, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 1.0F, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e + 1.0F, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.MODERN) {
- // Rendering the end portal with Minecraft 21w13a and above.
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e, f, f, f, f, o, p, q, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 1.0F, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 1.0F, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.375F, e + 0.375F, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e + 1.0F, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
- } else {
- // Rendering the end portal with Minecraft 21w13a below.
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, f + 1.0F, o, p, q, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 1.0F, e, f, f, f, f, o, p, q, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d + 1.0F, d + 1.0F, e + 1.0F, e, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d, e, e + 1.0F, f, f + 1.0F, f + 1.0F, f, o, p, q, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e, e, f, f, f + 1.0F, f + 1.0F, o, p, q, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, bufferBuilder, d, d + 1.0F, e + 0.375F, e + 0.375F, f + 1.0F, f + 1.0F, f, f, o, p, q, Direction.UP);
- }
- tesselator.end();
- GlStateManager.popMatrix();
- GlStateManager.matrixMode(5888);
- this.bindTexture(END_SKY_LOCATION);
- }
-
- GlStateManager.disableBlend();
- GlStateManager.disableTexGen(GlStateManager.TexGen.S);
- GlStateManager.disableTexGen(GlStateManager.TexGen.T);
- GlStateManager.disableTexGen(GlStateManager.TexGen.R);
- GlStateManager.enableLighting();
- if (bl) {
- gameRenderer.resetFogColor(false);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
deleted file mode 100644
index 0f02aaaf..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.modmenu;
-
-import io.github.prospector.modmenu.api.ModMenuApi;
-import net.minecraft.client.gui.screens.Screen;
-import top.hendrixshen.tweakmyclient.TweakMyClientConfigGui;
-import top.hendrixshen.tweakmyclient.TweakMyClientReference;
-
-import java.util.function.Function;
-
-public class ModMenuApiImpl implements ModMenuApi {
- @Override
- public String getModId() {
- return TweakMyClientReference.getModId();
- }
-
- @Override
- public Function getConfigScreenFactory() {
- return (screen) -> {
- TweakMyClientConfigGui gui = TweakMyClientConfigGui.getInstance();
- gui.setParent(screen);
- return gui;
- };
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
deleted file mode 100644
index b8d42499..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import net.minecraft.SharedConstants;
-
-public class SharedConstantCompatImpl extends SharedConstantCompatApi {
- public static void initCompat() {
- INSTANCE = new SharedConstantCompatImpl();
- }
-
- @Override
- public int getProtocolVersion() {
- return SharedConstants.getCurrentVersion().getProtocolVersion();
- }
-
- @Override
- public String getCurrentVersionName() {
- return SharedConstants.getCurrentVersion().getName();
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
deleted file mode 100644
index 9fae33ec..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import com.mojang.blaze3d.platform.Window;
-import net.minecraft.SharedConstants;
-import org.lwjgl.glfw.GLFW;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class WindowCompatImpl extends WindowCompatApi {
- public static void initCompat() {
- INSTANCE = new WindowCompatImpl();
- }
-
- @Override
- public void resetTitle() {
- GLFW.glfwSetWindowTitle(this.getWindow().getWindow(), "Minecraft " + SharedConstants.getCurrentVersion().getName());
- }
-
- @Override
- public Window getWindow() {
- return TweakMyClient.getMinecraftClient().window;
- }
-
- @Override
- public void setTitle(long window, String title) {
- GLFW.glfwSetWindowTitle(window, title);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
deleted file mode 100644
index f5e90d3d..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-
-public class EntityCompatImpl extends EntityCompatApi {
- public static void initCompat() {
- INSTANCE = new EntityCompatImpl();
- }
-
- @Override
- public boolean onClimbable(LivingEntity entity) {
- return entity.onLadder();
- }
-
- @Override
- public boolean isCrouching(LivingEntity entity) {
- return entity.isVisuallySneaking();
- }
-
- @Override
- public float getXRot(Entity entity) {
- return entity.xRot;
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
deleted file mode 100644
index 0aa3fa1d..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.client.multiplayer.MultiPlayerGameMode;
-import net.minecraft.world.entity.player.Inventory;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.inventory.ClickType;
-
-public class PlayerCompatImpl extends PlayerCompatApi {
- public static void initCompat() {
- INSTANCE = new PlayerCompatImpl();
- }
-
- @Override
- public Inventory getInventory(Player player) {
- return player.inventory;
- }
-
- @Override
- public void handleInventoryMouseClick(MultiPlayerGameMode interactionManager, int containerId, int slot, int button, ClickType clickType, Player player) {
- interactionManager.handleInventoryMouseClick(containerId, slot, button, clickType, player);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
deleted file mode 100644
index 2d7241e3..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.parser;
-
-import com.mojang.brigadier.StringReader;
-import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.minecraft.commands.arguments.item.ItemParser;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ItemStackCompatImpl extends ItemStackCompatApi {
- public static void initCompat() {
- INSTANCE = new ItemStackCompatImpl();
- }
-
- @Override
- public ItemStack toItemStack(String string) {
- try {
- ItemParser reader = new ItemParser(new StringReader(string), true);
- reader.parse();
- Item item = reader.getItem();
-
- if (item != null) {
- ItemStack stack = new ItemStack(item);
- stack.setTag(reader.getNbt());
- return stack;
- }
- } catch (CommandSyntaxException e) {
- TweakMyClient.getLogger().debug("Invalid item '{}'", string);
- }
-
- return ItemStack.EMPTY;
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
deleted file mode 100644
index f3aa396e..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.ConnectScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.client.multiplayer.ServerData;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ConnectionCompatScreenImpl extends ConnectionCompatScreenApi {
- public static void initCompat() {
- INSTANCE = new ConnectionCompatScreenImpl();
- }
-
- @Override
- public void startConnect(Screen parent, Minecraft minecraft, ServerData serverData) {
- minecraft.setScreen(new ConnectScreen(parent, TweakMyClient.getMinecraftClient(), serverData));
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java b/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
deleted file mode 100644
index 1ff9b300..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-public class ScreenCompatImpl extends ScreenCompatApi {
- public static void initCompat() {
- INSTANCE = new ScreenCompatImpl();
- }
-
- @Override
- public Button addButton(Screen screen, Button button) {
- return ((IScreen) screen).addButtonEx(button);
- }
-
- @Override
- public Button createButton(int x, int y, int width, int height, String message, Button.OnPress onPress) {
- return new Button(x, y, width, height, message, onPress);
- }
-
- @Override
- public void setButtonMessage(Button button, String message) {
- button.setMessage(message);
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/resources/TweakMyClient-Compat.mixins.json b/tweakmyclient-compat-mc1_14/src/main/resources/TweakMyClient-Compat.mixins.json
deleted file mode 100644
index 03fbec0f..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/resources/TweakMyClient-Compat.mixins.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "required": true,
- "package": "top.hendrixshen.tweakmyclient.compat.mixin",
- "plugin": "top.hendrixshen.tweakmyclient.TweakMyClientMixinPlugin",
- "minVersion": "0.8",
- "compatibilityLevel": "JAVA_8",
- "client": [
- ],
- "mixins": [
- "disable.disableClientEntityRendering.MixinEntityRenderDispatcher",
- "disable.disableGuiShadowLayer.MixinScreen",
- "disable.disableRenderBossBar.MixinBossHealthOverlay",
- "disable.disableRenderOverlayFire.MixinItemInHandRenderer",
- "disable.disableRenderScoreboard.MixinGui",
- "disable.disableSlowdown.MixinBlock",
- "disable.disableSlowdown.MixinSlimeBlock",
- "disable.disableSlowdown.tweakeroo.MixinSlimeBlock",
- "feature.featureAutoReconnect.MixinDisconnectedScreen",
- "feature.featureAutoReconnect.MixinScreen",
- "feature.featureAutoRespawn.MixinDeathScreen",
- "feature.featureCustomBlockOutsideColor.MixinLevelRenderer",
- "feature.featureCustomGuiBackgroundColor.MixinScreen",
- "feature.featureCustomSidebarBackgroundColor.MixinGui",
- "feature.featureCustomWindowIcon.MixinMinecraft",
- "feature.featureCustomWindowTitle.MixinMinecraft",
- "feature.featureDaylightOverride.MixinLevel",
- "misc.MixinI18n",
- "patch.endPortalRendererFix.MixinTheEndPortalRenderer"
- ],
- "injectors": {
- "defaultRequire": 0
- }
-}
diff --git a/tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png b/tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png
deleted file mode 100644
index 6a496bd3..00000000
Binary files a/tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png b/tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png
deleted file mode 100644
index 729ecb5d..00000000
Binary files a/tweakmyclient-compat-mc1_14/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_14/src/main/resources/fabric.mod.json b/tweakmyclient-compat-mc1_14/src/main/resources/fabric.mod.json
deleted file mode 100644
index 71737c7a..00000000
--- a/tweakmyclient-compat-mc1_14/src/main/resources/fabric.mod.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "schemaVersion": 1,
- "id": "tweakmyclient-compat-mc1_14",
- "name": "TweakMyClient Compat",
- "version": "${mod_version}",
- "icon": "assets/tweakmyclient/icon.png",
- "description": "TweakMyClient compat for Minecraft 1.14.x",
- "authors": [
- {
- "name": "Hendrix_Shen",
- "contact": {
- "homepage": "https://github.com/Hendrix-Shen"
- }
- }
- ],
- "contact": {
- "homepage": "https://www.curseforge.com/minecraft/mc-mods/tweakmyclient",
- "issues": "https://github.com/Hendrix-Shen/Tweak-My-Client/issues",
- "sources": "https://github.com/Hendrix-Shen/Tweak-My-Client"
- },
- "license": "GPLv3",
- "environment": "client",
- "entrypoints": {
- "main": [
- "top.hendrixshen.tweakmyclient.TweakMyClientCompat"
- ]
- },
- "mixins": [
- "TweakMyClient-Compat.mixins.json"
- ],
- "depends": {
- "minecraft": "1.14.x",
- "tweakmyclient": "*"
- },
- "custom": {
- "modmenu:parent": "tweakmyclient",
- "modmenu:clientsideOnly": true,
- "modmenu": {
- "parent": "tweakmyclient"
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/build.gradle b/tweakmyclient-compat-mc1_15/build.gradle
deleted file mode 100644
index fa4b7fa4..00000000
--- a/tweakmyclient-compat-mc1_15/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-dependencies {
- minecraft("com.mojang:minecraft:${project.minecraft_version}")
-
- modImplementation("curse.maven:malilib-303119:${project.library_malilib_version}")
- modImplementation("curse.maven:modmenu-308702:${project.library_modmenu_version}")
-
- modRuntimeOnly("curse.maven:in-game-account-switcher-232676:${project.library_inGameAccountSwitcher_version}")
- modRuntimeOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modRuntimeOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
-}
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_15/gradle.properties b/tweakmyclient-compat-mc1_15/gradle.properties
deleted file mode 100644
index 947a6ce9..00000000
--- a/tweakmyclient-compat-mc1_15/gradle.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Mod reference
-mod_id = tweakmyclient-compat-mc1_15
-
-# Development Environment
-minecraft_version = 1.15.2
-
-# Require Libraries
-# MaLiLib - 0.10.0-dev.21+arne.2
-library_malilib_version = 2942271
-# Mod Menu - 1.10.6
-library_modmenu_version = 3271693
-
-# Compatible Libraries
-# Auth Me - 1.1.2
-library_authme_version = 2990330
-# In-Game Account Switcher - 7.1.3
-library_inGameAccountSwitcher_version = 3493807
-# Litematica - 0.0.0-dev.20200515.184506
-library_litematica_version = 2957593
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
deleted file mode 100644
index 2e254a18..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.api.ModInitializer;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.SharedConstantCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.WindowCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.EntityCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.PlayerCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.parser.ItemStackCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ConnectionCompatScreenImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ScreenCompatImpl;
-
-public class TweakMyClientCompat implements ModInitializer {
- @Override
- public void onInitialize() {
- TweakMyClient.getLogger().info("[{}]: Compat module for {} loaded. Starting compat api...", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getCompatVersion());
-
- SharedConstantCompatImpl.initCompat();
- WindowCompatImpl.initCompat();
-
- EntityCompatImpl.initCompat();
- PlayerCompatImpl.initCompat();
-
- ItemStackCompatImpl.initCompat();
-
- ConnectionCompatScreenImpl.initCompat();
- ScreenCompatImpl.initCompat();
-
- TweakMyClient.getLogger().info("[{}]: Compat initialized - Version: {} ({})", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getModVersion(), TweakMyClientCompatReference.getModVersionType());
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
deleted file mode 100644
index 2a3b2eec..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.loader.api.FabricLoader;
-import top.hendrixshen.tweakmyclient.util.VersionParser;
-
-public class TweakMyClientCompatReference {
- private static final String MOD_COMPAT_VERSION = "MC 1.15.x";
- private static final String MOD_ID = "tweakmyclient-compat-mc1_15";
- private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
- private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
- private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);
-
- public static String getCompatVersion() {
- return MOD_COMPAT_VERSION;
- }
-
- public static String getModId() {
- return MOD_ID;
- }
-
- public static String getModName() {
- return MOD_NAME;
- }
-
- public static String getModVersion() {
- return MOD_VERSION;
- }
-
- public static String getModVersionType() {
- return MOD_VERSION_TYPE;
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableGuiShadowLayer/MixinScreen.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableGuiShadowLayer/MixinScreen.java
deleted file mode 100644
index 2a019762..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableGuiShadowLayer/MixinScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableGuiShadowLayer;
-
-import net.minecraft.client.gui.components.events.AbstractContainerEventHandler;
-import net.minecraft.client.gui.screens.Screen;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen extends AbstractContainerEventHandler {
- @Inject(
- method = "renderBackground(I)V",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(IIIIII)V"
- ),
- cancellable = true
- )
- private void onFillGradient(int i, CallbackInfo ci) {
- if (Configs.disableGuiShadowLayer) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
deleted file mode 100644
index 6e630c16..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderBossBar;
-
-import net.minecraft.client.gui.components.BossHealthOverlay;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(BossHealthOverlay.class)
-public class MixinBossHealthOverlay {
- @Inject(
- method = "render",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRender(CallbackInfo ci) {
- if (Configs.disableRenderBossBar) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayFire/MixinScreenEffectRenderer.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayFire/MixinScreenEffectRenderer.java
deleted file mode 100644
index c2810e44..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayFire/MixinScreenEffectRenderer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayFire;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.renderer.ScreenEffectRenderer;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(ScreenEffectRenderer.class)
-public abstract class MixinScreenEffectRenderer {
- @Inject(
- method = "renderFire",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private static void onRenderFireOverlay(Minecraft minecraft, PoseStack poseStack, CallbackInfo ci) {
- if (Configs.disableRenderOverlayFire) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderScoreboard/MixinGui.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderScoreboard/MixinGui.java
deleted file mode 100644
index e160158a..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderScoreboard/MixinGui.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderScoreboard;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.world.scores.Objective;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @Inject(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderScoreboardSidebar(Objective objective, CallbackInfo ci) {
- if (Configs.disableRenderScoreboard) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
deleted file mode 100644
index 03b9e693..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "bounceUp",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onbounceUp(Entity entity, CallbackInfo ci) {
- CommonCompatLib.disableSlowdown(entity, ci);
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
deleted file mode 100644
index 50126604..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown.tweakeroo;
-
-import net.minecraft.core.BlockPos;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.Level;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Dependencies(not = @Dependency(value = "tweakeroo"))
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "stepOn",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void stepOn(Level level, BlockPos blockPos, Entity entity, CallbackInfo ci) {
- if (Configs.disableSlowdown) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
deleted file mode 100644
index 422ad1dc..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.components.AbstractWidget;
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen implements IScreen {
- @Shadow
- protected abstract AbstractWidget addButton(AbstractWidget par1);
-
- @Override
- public Button addButtonEx(Button button) {
- return (Button) addButton(button);
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
deleted file mode 100644
index a24ca8fb..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoRespawn;
-
-import net.minecraft.client.gui.screens.DeathScreen;
-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;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(DeathScreen.class)
-public class MixinDeathScreen {
- @Inject(
- method = "tick",
- at = @At(
- value = "TAIL"
- )
- )
- private void onTick(CallbackInfo ci) {
- if (Configs.featureAutoRespawn) {
- assert TweakMyClient.getMinecraftClient().player != null;
- TweakMyClient.getMinecraftClient().player.respawn();
- TweakMyClient.getMinecraftClient().setScreen(null);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java
deleted file mode 100644
index a1c340a4..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomGuiBackgroundColor/MixinScreen.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureCustomGuiBackgroundColor;
-
-import net.minecraft.client.gui.components.events.AbstractContainerEventHandler;
-import net.minecraft.client.gui.screens.Screen;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.ModifyArgs;
-import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen extends AbstractContainerEventHandler {
- /**
- * args
- * 0 – startX
- * 1 – startY
- * 2 – endX
- * 3 – endY
- * 4 – colorStart
- * 5 – colorEnd
- */
- @ModifyArgs(
- method = "renderBackground(I)V",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/screens/Screen;fillGradient(IIIIII)V"
- )
- )
- private void onFillGradient(Args args) {
- if (Configs.featureCustomGuiBackgroundColor) {
- args.set(4, Configs.colorGuiStart.intValue);
- args.set(5, Configs.colorGuiStop.intValue);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java
deleted file mode 100644
index af1394d9..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureCustomSidebarBackgroundColor/MixinGui.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureCustomSidebarBackgroundColor;
-
-import net.minecraft.client.gui.Gui;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.ModifyArgs;
-import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @ModifyArgs(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
- ordinal = 1
- )
- )
- private void changeSidebarTitleBackgroundColor(Args args) {
- if (Configs.featureCustomSidebarBackgroundColor) {
- args.set(4, Configs.colorSidebarTitle.intValue);
- }
- }
-
- @ModifyArgs(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
- ordinal = 0
- )
- )
- private void changeSidebarContentBackgroundColor_1(Args args) {
- if (Configs.featureCustomSidebarBackgroundColor) {
- args.set(4, Configs.colorSidebarContent.intValue);
- }
- }
-
- @ModifyArgs(
- method = "displayScoreboardSidebar",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/gui/Gui;fill(IIIII)V",
- ordinal = 2
- )
- )
- private void changeSidebarContentBackgroundColor_2(Args args) {
- if (Configs.featureCustomSidebarBackgroundColor) {
- args.set(4, Configs.colorSidebarContent.intValue);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/misc/MixinI18n.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/misc/MixinI18n.java
deleted file mode 100644
index db55b24b..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/misc/MixinI18n.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.misc;
-
-import net.minecraft.client.resources.language.I18n;
-import net.minecraft.client.resources.language.Locale;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-
-/* Fix the dumb "Caused by: java.lang.NullPointerException: Cannot invoke
- "net.minecraft.client.resources.language.Locale.get(String, Object[])" because
- "net.minecraft.client.resources.language.I18n.locale" is null"
-*/
-@Mixin(I18n.class)
-public class MixinI18n {
- @Shadow
- private static Locale locale;
-
- @Inject(
- method = "get",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private static void get(String string, Object[] objects, CallbackInfoReturnable cir) {
- if (locale == null) {
- cir.setReturnValue(string);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
deleted file mode 100644
index 7ef48afe..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.modmenu;
-
-import io.github.prospector.modmenu.api.ConfigScreenFactory;
-import io.github.prospector.modmenu.api.ModMenuApi;
-import top.hendrixshen.tweakmyclient.TweakMyClientConfigGui;
-
-public class ModMenuApiImpl implements ModMenuApi {
- @Override
- public ConfigScreenFactory> getModConfigScreenFactory() {
- return (screen) -> {
- TweakMyClientConfigGui gui = TweakMyClientConfigGui.getInstance();
- gui.setParent(screen);
- return gui;
- };
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
deleted file mode 100644
index b8d42499..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import net.minecraft.SharedConstants;
-
-public class SharedConstantCompatImpl extends SharedConstantCompatApi {
- public static void initCompat() {
- INSTANCE = new SharedConstantCompatImpl();
- }
-
- @Override
- public int getProtocolVersion() {
- return SharedConstants.getCurrentVersion().getProtocolVersion();
- }
-
- @Override
- public String getCurrentVersionName() {
- return SharedConstants.getCurrentVersion().getName();
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
deleted file mode 100644
index e21818e9..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import com.mojang.blaze3d.platform.Window;
-import org.lwjgl.glfw.GLFW;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class WindowCompatImpl extends WindowCompatApi {
- public static void initCompat() {
- INSTANCE = new WindowCompatImpl();
- }
-
- @Override
- public void resetTitle() {
- TweakMyClient.getMinecraftClient().updateTitle();
- }
-
- @Override
- public Window getWindow() {
- return TweakMyClient.getMinecraftClient().getWindow();
- }
-
- @Override
- public void setTitle(long window, String title) {
- GLFW.glfwSetWindowTitle(window, title);
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
deleted file mode 100644
index ddd8629f..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-
-public class EntityCompatImpl extends EntityCompatApi {
- public static void initCompat() {
- INSTANCE = new EntityCompatImpl();
- }
-
- @Override
- public boolean onClimbable(LivingEntity entity) {
- return entity.onLadder();
- }
-
- @Override
- public boolean isCrouching(LivingEntity entity) {
- return entity.isCrouching();
- }
-
- @Override
- public float getXRot(Entity entity) {
- return entity.xRot;
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
deleted file mode 100644
index 0aa3fa1d..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.client.multiplayer.MultiPlayerGameMode;
-import net.minecraft.world.entity.player.Inventory;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.inventory.ClickType;
-
-public class PlayerCompatImpl extends PlayerCompatApi {
- public static void initCompat() {
- INSTANCE = new PlayerCompatImpl();
- }
-
- @Override
- public Inventory getInventory(Player player) {
- return player.inventory;
- }
-
- @Override
- public void handleInventoryMouseClick(MultiPlayerGameMode interactionManager, int containerId, int slot, int button, ClickType clickType, Player player) {
- interactionManager.handleInventoryMouseClick(containerId, slot, button, clickType, player);
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
deleted file mode 100644
index 2d7241e3..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.parser;
-
-import com.mojang.brigadier.StringReader;
-import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.minecraft.commands.arguments.item.ItemParser;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ItemStackCompatImpl extends ItemStackCompatApi {
- public static void initCompat() {
- INSTANCE = new ItemStackCompatImpl();
- }
-
- @Override
- public ItemStack toItemStack(String string) {
- try {
- ItemParser reader = new ItemParser(new StringReader(string), true);
- reader.parse();
- Item item = reader.getItem();
-
- if (item != null) {
- ItemStack stack = new ItemStack(item);
- stack.setTag(reader.getNbt());
- return stack;
- }
- } catch (CommandSyntaxException e) {
- TweakMyClient.getLogger().debug("Invalid item '{}'", string);
- }
-
- return ItemStack.EMPTY;
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
deleted file mode 100644
index f3aa396e..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.ConnectScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.client.multiplayer.ServerData;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ConnectionCompatScreenImpl extends ConnectionCompatScreenApi {
- public static void initCompat() {
- INSTANCE = new ConnectionCompatScreenImpl();
- }
-
- @Override
- public void startConnect(Screen parent, Minecraft minecraft, ServerData serverData) {
- minecraft.setScreen(new ConnectScreen(parent, TweakMyClient.getMinecraftClient(), serverData));
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java b/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
deleted file mode 100644
index 1ff9b300..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-public class ScreenCompatImpl extends ScreenCompatApi {
- public static void initCompat() {
- INSTANCE = new ScreenCompatImpl();
- }
-
- @Override
- public Button addButton(Screen screen, Button button) {
- return ((IScreen) screen).addButtonEx(button);
- }
-
- @Override
- public Button createButton(int x, int y, int width, int height, String message, Button.OnPress onPress) {
- return new Button(x, y, width, height, message, onPress);
- }
-
- @Override
- public void setButtonMessage(Button button, String message) {
- button.setMessage(message);
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/resources/TweakMyClient-Compat.mixins.json b/tweakmyclient-compat-mc1_15/src/main/resources/TweakMyClient-Compat.mixins.json
deleted file mode 100644
index 98adcdf5..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/resources/TweakMyClient-Compat.mixins.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "required": true,
- "package": "top.hendrixshen.tweakmyclient.compat.mixin",
- "plugin": "top.hendrixshen.tweakmyclient.TweakMyClientMixinPlugin",
- "minVersion": "0.8",
- "compatibilityLevel": "JAVA_8",
- "client": [
- ],
- "mixins": [
- "disable.disableGuiShadowLayer.MixinScreen",
- "disable.disableRenderBossBar.MixinBossHealthOverlay",
- "disable.disableRenderOverlayFire.MixinScreenEffectRenderer",
- "disable.disableRenderScoreboard.MixinGui",
- "disable.disableSlowdown.MixinSlimeBlock",
- "disable.disableSlowdown.tweakeroo.MixinSlimeBlock",
- "feature.featureAutoReconnect.MixinDisconnectedScreen",
- "feature.featureAutoReconnect.MixinScreen",
- "feature.featureAutoRespawn.MixinDeathScreen",
- "feature.featureCustomGuiBackgroundColor.MixinScreen",
- "feature.featureCustomSidebarBackgroundColor.MixinGui",
- "feature.featureDaylightOverride.MixinLevel",
- "misc.MixinI18n"
- ],
- "injectors": {
- "defaultRequire": 0
- }
-}
diff --git a/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icon.png b/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icon.png
deleted file mode 100644
index ec342689..00000000
Binary files a/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icon.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png b/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png
deleted file mode 100644
index 6a496bd3..00000000
Binary files a/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png b/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png
deleted file mode 100644
index 729ecb5d..00000000
Binary files a/tweakmyclient-compat-mc1_15/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_15/src/main/resources/fabric.mod.json b/tweakmyclient-compat-mc1_15/src/main/resources/fabric.mod.json
deleted file mode 100644
index bbdb6281..00000000
--- a/tweakmyclient-compat-mc1_15/src/main/resources/fabric.mod.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "schemaVersion": 1,
- "id": "tweakmyclient-compat-mc1_15",
- "name": "TweakMyClient Compat",
- "version": "${mod_version}",
- "icon": "assets/tweakmyclient/icon.png",
- "description": "TweakMyClient compat for Minecraft 1.15.x",
- "authors": [
- {
- "name": "Hendrix_Shen",
- "contact": {
- "homepage": "https://github.com/Hendrix-Shen"
- }
- }
- ],
- "contact": {
- "homepage": "https://www.curseforge.com/minecraft/mc-mods/tweakmyclient",
- "issues": "https://github.com/Hendrix-Shen/Tweak-My-Client/issues",
- "sources": "https://github.com/Hendrix-Shen/Tweak-My-Client"
- },
- "license": "GPLv3",
- "environment": "client",
- "entrypoints": {
- "main": [
- "top.hendrixshen.tweakmyclient.TweakMyClientCompat"
- ]
- },
- "mixins": [
- "TweakMyClient-Compat.mixins.json"
- ],
- "depends": {
- "minecraft": "1.15.x",
- "tweakmyclient": "*"
- },
- "custom": {
- "modmenu:parent": "tweakmyclient",
- "modmenu:clientsideOnly": true,
- "modmenu": {
- "parent": "tweakmyclient"
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/build.gradle b/tweakmyclient-compat-mc1_16/build.gradle
deleted file mode 100644
index bc8f9d47..00000000
--- a/tweakmyclient-compat-mc1_16/build.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-dependencies {
- minecraft("com.mojang:minecraft:${project.minecraft_version}")
-
- modImplementation("curse.maven:malilib-303119:${project.library_malilib_version}")
- modImplementation("curse.maven:modmenu-308702:${project.library_modmenu_version}")
-
- modRuntimeOnly("curse.maven:in-game-account-switcher-232676:${project.library_inGameAccountSwitcher_version}")
- modRuntimeOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modRuntimeOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
- modRuntimeOnly("curse.maven:oauth-515054:${project.library_oauth_version}")
- modRuntimeOnly("curse.maven:reauth-403928:${project.library_reauth_version}")
-}
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_16/gradle.properties b/tweakmyclient-compat-mc1_16/gradle.properties
deleted file mode 100644
index eb86976e..00000000
--- a/tweakmyclient-compat-mc1_16/gradle.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Mod reference
-mod_id = tweakmyclient-compat-mc1_16
-
-# Development Environment
-minecraft_version = 1.16.5
-
-# Require Libraries
-# Malilib - 0.10.0-dev.21+arne.8
-library_malilib_version = 3542536
-# Mod Menu - 1.16.22
-library_modmenu_version = 3479748
-
-# Compatible Libraries
-# Auth Me - 2.1.0
-library_authme_version = 3554693
-# In-Game Account Switcher - 7.1.3
-library_inGameAccountSwitcher_version = 3493810
-# Litematica - 0.0.0-dev.20210612.170003
-library_litematica_version = 3349118
-# Oauth - 1.0
-library_oauth_version=3453291
-# ReAuth - 3.9.3
-library_reauth_version = 3105780
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
deleted file mode 100644
index 3338d63d..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import fi.dy.masa.malilib.event.RenderEventHandler;
-import net.fabricmc.api.ModInitializer;
-import top.hendrixshen.tweakmyclient.compat.event.RenderHandler;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.SharedConstantCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.WindowCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.EntityCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.PlayerCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.parser.ItemStackCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.render.BufferBuilderCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ConnectionCompatScreenImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ScreenCompatImpl;
-
-public class TweakMyClientCompat implements ModInitializer {
- @Override
- public void onInitialize() {
- TweakMyClient.getLogger().info("[{}]: Compat module for {} loaded. Starting compat api...", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getCompatVersion());
-
- SharedConstantCompatImpl.initCompat();
- WindowCompatImpl.initCompat();
-
- EntityCompatImpl.initCompat();
- PlayerCompatImpl.initCompat();
-
- ItemStackCompatImpl.initCompat();
-
- BufferBuilderCompatImpl.initCompat();
-
- ConnectionCompatScreenImpl.initCompat();
- ScreenCompatImpl.initCompat();
-
- RenderEventHandler.getInstance().registerWorldLastRenderer(RenderHandler.getInstance());
-
- TweakMyClient.getLogger().info("[{}]: Compat initialized - Version: {} ({})", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getModVersion(), TweakMyClientCompatReference.getModVersionType());
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
deleted file mode 100644
index e9215c99..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.loader.api.FabricLoader;
-import top.hendrixshen.tweakmyclient.util.VersionParser;
-
-public class TweakMyClientCompatReference {
- private static final String MOD_COMPAT_VERSION = "MC 1.16.x";
- private static final String MOD_ID = "tweakmyclient-compat-mc1_16";
- private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
- private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
- private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);
-
- public static String getCompatVersion() {
- return MOD_COMPAT_VERSION;
- }
-
- public static String getModId() {
- return MOD_ID;
- }
-
- public static String getModName() {
- return MOD_NAME;
- }
-
- public static String getModVersion() {
- return MOD_VERSION;
- }
-
- public static String getModVersionType() {
- return MOD_VERSION_TYPE;
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
deleted file mode 100644
index 021d643e..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.event;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import fi.dy.masa.malilib.interfaces.IRenderer;
-import net.minecraft.client.Minecraft;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.util.render.OverlayRenderer;
-
-public class RenderHandler implements IRenderer {
- private static final RenderHandler INSTANCE = new RenderHandler();
- private final Minecraft minecraft;
-
- public RenderHandler() {
- this.minecraft = TweakMyClient.getMinecraftClient();
- }
-
- public static RenderHandler getInstance() {
- return INSTANCE;
- }
-
- @Override
- public void onRenderWorldLast(float partialTicks, PoseStack matrixStack) {
- if (Configs.featureOpenWaterHelper) {
- OverlayRenderer.getInstance().renderOpenWater(minecraft);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
deleted file mode 100644
index 03b9e693..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "bounceUp",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onbounceUp(Entity entity, CallbackInfo ci) {
- CommonCompatLib.disableSlowdown(entity, ci);
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
deleted file mode 100644
index 50126604..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown.tweakeroo;
-
-import net.minecraft.core.BlockPos;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.Level;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Dependencies(not = @Dependency(value = "tweakeroo"))
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "stepOn",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void stepOn(Level level, BlockPos blockPos, Entity entity, CallbackInfo ci) {
- if (Configs.disableSlowdown) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
deleted file mode 100644
index 0319c9e3..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.screens.DisconnectedScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.Component;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.util.AutoReconnectUtil;
-
-@Mixin(value = DisconnectedScreen.class, priority = 900)
-public class MixinDisconnectedScreen extends Screen {
- @Shadow
- @Final
- private Screen parent;
-
- @Shadow
- private int textHeight;
-
- @Shadow
- @Final
- private Component reason;
-
- protected MixinDisconnectedScreen(Component component) {
- super(component);
- }
-
- @Inject(
- method = "init",
- at = @At(
- value = "TAIL"
- ),
- cancellable = true
- )
- private void onInitDisconnectedScreen(CallbackInfo ci) {
- AutoReconnectUtil.getInstance().initDisconnectedScreen(this, parent, width, height, textHeight, reason);
- ci.cancel();
- }
-
- @Override
- public void tick() {
- AutoReconnectUtil.tickAutoReconnectButton(parent);
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
deleted file mode 100644
index 422ad1dc..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.components.AbstractWidget;
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen implements IScreen {
- @Shadow
- protected abstract AbstractWidget addButton(AbstractWidget par1);
-
- @Override
- public Button addButtonEx(Button button) {
- return (Button) addButton(button);
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
deleted file mode 100644
index a24ca8fb..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoRespawn;
-
-import net.minecraft.client.gui.screens.DeathScreen;
-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;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(DeathScreen.class)
-public class MixinDeathScreen {
- @Inject(
- method = "tick",
- at = @At(
- value = "TAIL"
- )
- )
- private void onTick(CallbackInfo ci) {
- if (Configs.featureAutoRespawn) {
- assert TweakMyClient.getMinecraftClient().player != null;
- TweakMyClient.getMinecraftClient().player.respawn();
- TweakMyClient.getMinecraftClient().setScreen(null);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
deleted file mode 100644
index 445fb864..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.modmenu;
-
-import com.terraformersmc.modmenu.api.ConfigScreenFactory;
-import com.terraformersmc.modmenu.api.ModMenuApi;
-import top.hendrixshen.tweakmyclient.TweakMyClientConfigGui;
-
-public class ModMenuApiImpl implements ModMenuApi {
- @Override
- public ConfigScreenFactory> getModConfigScreenFactory() {
- return (screen) -> {
- TweakMyClientConfigGui gui = TweakMyClientConfigGui.getInstance();
- gui.setParent(screen);
- return gui;
- };
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
deleted file mode 100644
index e6c41b19..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import net.minecraft.SharedConstants;
-
-public class SharedConstantCompatImpl extends SharedConstantCompatApi {
- public static void initCompat() {
- INSTANCE = new SharedConstantCompatImpl();
- }
-
- @Override
- public int getProtocolVersion() {
- return SharedConstants.getProtocolVersion();
- }
-
- @Override
- public String getCurrentVersionName() {
- return SharedConstants.getCurrentVersion().getName();
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
deleted file mode 100644
index e21818e9..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import com.mojang.blaze3d.platform.Window;
-import org.lwjgl.glfw.GLFW;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class WindowCompatImpl extends WindowCompatApi {
- public static void initCompat() {
- INSTANCE = new WindowCompatImpl();
- }
-
- @Override
- public void resetTitle() {
- TweakMyClient.getMinecraftClient().updateTitle();
- }
-
- @Override
- public Window getWindow() {
- return TweakMyClient.getMinecraftClient().getWindow();
- }
-
- @Override
- public void setTitle(long window, String title) {
- GLFW.glfwSetWindowTitle(window, title);
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
deleted file mode 100644
index 1b2713bb..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-
-public class EntityCompatImpl extends EntityCompatApi {
- public static void initCompat() {
- INSTANCE = new EntityCompatImpl();
- }
-
- @Override
- public boolean onClimbable(LivingEntity entity) {
- return entity.onClimbable();
- }
-
- @Override
- public boolean isCrouching(LivingEntity entity) {
- return entity.isCrouching();
- }
-
- @Override
- public float getXRot(Entity entity) {
- return entity.xRot;
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
deleted file mode 100644
index 0aa3fa1d..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.client.multiplayer.MultiPlayerGameMode;
-import net.minecraft.world.entity.player.Inventory;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.inventory.ClickType;
-
-public class PlayerCompatImpl extends PlayerCompatApi {
- public static void initCompat() {
- INSTANCE = new PlayerCompatImpl();
- }
-
- @Override
- public Inventory getInventory(Player player) {
- return player.inventory;
- }
-
- @Override
- public void handleInventoryMouseClick(MultiPlayerGameMode interactionManager, int containerId, int slot, int button, ClickType clickType, Player player) {
- interactionManager.handleInventoryMouseClick(containerId, slot, button, clickType, player);
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
deleted file mode 100644
index 2d7241e3..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.parser;
-
-import com.mojang.brigadier.StringReader;
-import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.minecraft.commands.arguments.item.ItemParser;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ItemStackCompatImpl extends ItemStackCompatApi {
- public static void initCompat() {
- INSTANCE = new ItemStackCompatImpl();
- }
-
- @Override
- public ItemStack toItemStack(String string) {
- try {
- ItemParser reader = new ItemParser(new StringReader(string), true);
- reader.parse();
- Item item = reader.getItem();
-
- if (item != null) {
- ItemStack stack = new ItemStack(item);
- stack.setTag(reader.getNbt());
- return stack;
- }
- } catch (CommandSyntaxException e) {
- TweakMyClient.getLogger().debug("Invalid item '{}'", string);
- }
-
- return ItemStack.EMPTY;
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
deleted file mode 100644
index 8e0442dc..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.render;
-
-import com.mojang.blaze3d.vertex.BufferBuilder;
-import com.mojang.blaze3d.vertex.DefaultVertexFormat;
-import org.lwjgl.opengl.GL11;
-
-public class BufferBuilderCompatImpl extends BufferBuilderCompatApi {
- public static void initCompat() {
- INSTANCE = new BufferBuilderCompatImpl();
- }
-
- @Override
- public void beginGLLines(BufferBuilder bufferBuilder) {
- bufferBuilder.begin(GL11.GL_LINES, DefaultVertexFormat.POSITION_COLOR);
- }
-
- @Override
- public void compat_1_17_above() {
-
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
deleted file mode 100644
index f3aa396e..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.ConnectScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.client.multiplayer.ServerData;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ConnectionCompatScreenImpl extends ConnectionCompatScreenApi {
- public static void initCompat() {
- INSTANCE = new ConnectionCompatScreenImpl();
- }
-
- @Override
- public void startConnect(Screen parent, Minecraft minecraft, ServerData serverData) {
- minecraft.setScreen(new ConnectScreen(parent, TweakMyClient.getMinecraftClient(), serverData));
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java b/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
deleted file mode 100644
index c8502df2..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.TextComponent;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-public class ScreenCompatImpl extends ScreenCompatApi {
- public static void initCompat() {
- INSTANCE = new ScreenCompatImpl();
- }
-
- @Override
- public Button addButton(Screen screen, Button button) {
- return ((IScreen) screen).addButtonEx(button);
- }
-
- @Override
- public Button createButton(int x, int y, int width, int height, String message, Button.OnPress onPress) {
- return new Button(x, y, width, height, new TextComponent(message), onPress);
- }
-
- @Override
- public void setButtonMessage(Button button, String message) {
- button.setMessage(new TextComponent(message));
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/resources/TweakMyClient-Compat.mixins.json b/tweakmyclient-compat-mc1_16/src/main/resources/TweakMyClient-Compat.mixins.json
deleted file mode 100644
index 0329a99e..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/resources/TweakMyClient-Compat.mixins.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "required": true,
- "package": "top.hendrixshen.tweakmyclient.compat.mixin",
- "plugin": "top.hendrixshen.tweakmyclient.TweakMyClientMixinPlugin",
- "minVersion": "0.8",
- "compatibilityLevel": "JAVA_8",
- "client": [
- ],
- "mixins": [
- "disable.disableRenderBossBar.MixinBossHealthOverlay",
- "disable.disableSlowdown.MixinSlimeBlock",
- "disable.disableSlowdown.tweakeroo.MixinSlimeBlock",
- "feature.featureAutoReconnect.MixinDisconnectedScreen",
- "feature.featureAutoReconnect.MixinScreen",
- "feature.featureAutoRespawn.MixinDeathScreen"
- ],
- "injectors": {
- "defaultRequire": 0
- }
-}
diff --git a/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icon.png b/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icon.png
deleted file mode 100644
index ec342689..00000000
Binary files a/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icon.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png b/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png
deleted file mode 100644
index 6a496bd3..00000000
Binary files a/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png b/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png
deleted file mode 100644
index 729ecb5d..00000000
Binary files a/tweakmyclient-compat-mc1_16/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_16/src/main/resources/fabric.mod.json b/tweakmyclient-compat-mc1_16/src/main/resources/fabric.mod.json
deleted file mode 100644
index ebbca26b..00000000
--- a/tweakmyclient-compat-mc1_16/src/main/resources/fabric.mod.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "schemaVersion": 1,
- "id": "tweakmyclient-compat-mc1_16",
- "name": "TweakMyClient Compat",
- "version": "${mod_version}",
- "icon": "assets/tweakmyclient/icon.png",
- "description": "TweakMyClient compat for Minecraft 1.16.x",
- "authors": [
- {
- "name": "Hendrix_Shen",
- "contact": {
- "homepage": "https://github.com/Hendrix-Shen"
- }
- }
- ],
- "contact": {
- "homepage": "https://www.curseforge.com/minecraft/mc-mods/tweakmyclient",
- "issues": "https://github.com/Hendrix-Shen/Tweak-My-Client/issues",
- "sources": "https://github.com/Hendrix-Shen/Tweak-My-Client"
- },
- "license": "GPLv3",
- "environment": "client",
- "entrypoints": {
- "main": [
- "top.hendrixshen.tweakmyclient.TweakMyClientCompat"
- ]
- },
- "mixins": [
- "TweakMyClient-Compat.mixins.json"
- ],
- "depends": {
- "minecraft": "1.16.x",
- "tweakmyclient": "*"
- },
- "custom": {
- "modmenu:parent": "tweakmyclient",
- "modmenu:clientsideOnly": true,
- "modmenu": {
- "parent": "tweakmyclient"
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/build.gradle b/tweakmyclient-compat-mc1_17/build.gradle
deleted file mode 100644
index d87e3545..00000000
--- a/tweakmyclient-compat-mc1_17/build.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-dependencies {
- minecraft("com.mojang:minecraft:${project.minecraft_version}")
-
- modImplementation("curse.maven:malilib-303119:${project.library_malilib_version}")
- modImplementation("curse.maven:modmenu-308702:${project.library_modmenu_version}")
-
- modRuntimeOnly("curse.maven:in-game-account-switcher-232676:${project.library_inGameAccountSwitcher_version}")
- modRuntimeOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modRuntimeOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
- modRuntimeOnly("curse.maven:oauth-515054:${project.library_oauth_version}")
- modCompileOnly("curse.maven:reauth-403928:${project.library_reauth_version}")
-}
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_17/gradle.properties b/tweakmyclient-compat-mc1_17/gradle.properties
deleted file mode 100644
index 901d59ce..00000000
--- a/tweakmyclient-compat-mc1_17/gradle.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Mod reference
-mod_id = tweakmyclient-compat-mc1_17
-
-# Development Environment
-minecraft_version = 1.17.1
-
-# Require Libraries
-# MaLiLib - 0.10.0-dev.26
-library_malilib_version = 3498871
-# Mod Menu - 2.0.14
-library_modmenu_version = 3479750
-
-# Compatible Libraries
-# Auth Me - 2.1.0
-library_authme_version = 3554686
-# In-Game Account Switcher - 7.1.3
-library_inGameAccountSwitcher_version = 3493811
-# Litematica - 0.9.0
-library_litematica_version = 3580241
-# Oauth - 1.0
-library_oauth_version=3424374
-# ReAuth - 3.9.3
-library_reauth_version = 3105780
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
deleted file mode 100644
index 3338d63d..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import fi.dy.masa.malilib.event.RenderEventHandler;
-import net.fabricmc.api.ModInitializer;
-import top.hendrixshen.tweakmyclient.compat.event.RenderHandler;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.SharedConstantCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.WindowCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.EntityCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.PlayerCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.parser.ItemStackCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.render.BufferBuilderCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ConnectionCompatScreenImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ScreenCompatImpl;
-
-public class TweakMyClientCompat implements ModInitializer {
- @Override
- public void onInitialize() {
- TweakMyClient.getLogger().info("[{}]: Compat module for {} loaded. Starting compat api...", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getCompatVersion());
-
- SharedConstantCompatImpl.initCompat();
- WindowCompatImpl.initCompat();
-
- EntityCompatImpl.initCompat();
- PlayerCompatImpl.initCompat();
-
- ItemStackCompatImpl.initCompat();
-
- BufferBuilderCompatImpl.initCompat();
-
- ConnectionCompatScreenImpl.initCompat();
- ScreenCompatImpl.initCompat();
-
- RenderEventHandler.getInstance().registerWorldLastRenderer(RenderHandler.getInstance());
-
- TweakMyClient.getLogger().info("[{}]: Compat initialized - Version: {} ({})", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getModVersion(), TweakMyClientCompatReference.getModVersionType());
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
deleted file mode 100644
index 3939d12f..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.loader.api.FabricLoader;
-import top.hendrixshen.tweakmyclient.util.VersionParser;
-
-public class TweakMyClientCompatReference {
- private static final String MOD_COMPAT_VERSION = "MC 1.17.x";
- private static final String MOD_ID = "tweakmyclient-compat-mc1_17";
- private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
- private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
- private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);
-
- public static String getCompatVersion() {
- return MOD_COMPAT_VERSION;
- }
-
- public static String getModId() {
- return MOD_ID;
- }
-
- public static String getModName() {
- return MOD_NAME;
- }
-
- public static String getModVersion() {
- return MOD_VERSION;
- }
-
- public static String getModVersionType() {
- return MOD_VERSION_TYPE;
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
deleted file mode 100644
index 26bbafac..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderBossBar;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import net.minecraft.client.gui.components.BossHealthOverlay;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(BossHealthOverlay.class)
-public class MixinBossHealthOverlay {
- @Inject(
- method = "render",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRender(PoseStack poseStack, CallbackInfo ci) {
- if (Configs.disableRenderBossBar) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
deleted file mode 100644
index 0138e155..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayPowderSnow;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.resources.ResourceLocation;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @Shadow
- @Final
- private static ResourceLocation POWDER_SNOW_OUTLINE_LOCATION;
-
- @Inject(
- method = "renderTextureOverlay",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderPowderSnowOverlay(ResourceLocation resourceLocation, float f, CallbackInfo ci) {
- if (Configs.disableRenderOverlayPowderSnow && resourceLocation == POWDER_SNOW_OUTLINE_LOCATION) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
deleted file mode 100644
index 843d4a44..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayPumpkin;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.resources.ResourceLocation;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @Shadow
- @Final
- private static ResourceLocation PUMPKIN_BLUR_LOCATION;
-
- @Inject(
- method = "renderTextureOverlay",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderPumpkinOverlay(ResourceLocation resourceLocation, float f, CallbackInfo ci) {
- if (Configs.disableRenderOverlayPumpkin && resourceLocation == PUMPKIN_BLUR_LOCATION) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
deleted file mode 100644
index 03b9e693..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "bounceUp",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onbounceUp(Entity entity, CallbackInfo ci) {
- CommonCompatLib.disableSlowdown(entity, ci);
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
deleted file mode 100644
index 9e005c6d..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown.tweakeroo;
-
-import net.minecraft.core.BlockPos;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.Level;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-import net.minecraft.world.level.block.state.BlockState;
-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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Dependencies(not = @Dependency(value = "tweakeroo"))
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "stepOn",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void stepOn(Level level, BlockPos blockPos, BlockState blockState, Entity entity, CallbackInfo ci) {
- if (Configs.disableSlowdown) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
deleted file mode 100644
index 0319c9e3..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.screens.DisconnectedScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.Component;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.util.AutoReconnectUtil;
-
-@Mixin(value = DisconnectedScreen.class, priority = 900)
-public class MixinDisconnectedScreen extends Screen {
- @Shadow
- @Final
- private Screen parent;
-
- @Shadow
- private int textHeight;
-
- @Shadow
- @Final
- private Component reason;
-
- protected MixinDisconnectedScreen(Component component) {
- super(component);
- }
-
- @Inject(
- method = "init",
- at = @At(
- value = "TAIL"
- ),
- cancellable = true
- )
- private void onInitDisconnectedScreen(CallbackInfo ci) {
- AutoReconnectUtil.getInstance().initDisconnectedScreen(this, parent, width, height, textHeight, reason);
- ci.cancel();
- }
-
- @Override
- public void tick() {
- AutoReconnectUtil.tickAutoReconnectButton(parent);
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
deleted file mode 100644
index 4461dd0d..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.components.events.GuiEventListener;
-import net.minecraft.client.gui.screens.Screen;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen implements IScreen {
- @SuppressWarnings("target")
- @Shadow
- protected abstract GuiEventListener addRenderableWidget(GuiEventListener guiEventListener);
-
- @Override
- public Button addButtonEx(Button button) {
- return (Button) addRenderableWidget(button);
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
deleted file mode 100644
index a24ca8fb..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoRespawn;
-
-import net.minecraft.client.gui.screens.DeathScreen;
-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;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(DeathScreen.class)
-public class MixinDeathScreen {
- @Inject(
- method = "tick",
- at = @At(
- value = "TAIL"
- )
- )
- private void onTick(CallbackInfo ci) {
- if (Configs.featureAutoRespawn) {
- assert TweakMyClient.getMinecraftClient().player != null;
- TweakMyClient.getMinecraftClient().player.respawn();
- TweakMyClient.getMinecraftClient().setScreen(null);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
deleted file mode 100644
index 93374389..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.patch.endPortalRendererFix;
-
-import net.minecraft.core.Direction;
-import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
-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.CallbackInfoReturnable;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-
-@Mixin(TheEndPortalBlockEntity.class)
-public class MixinTheEndPortalBlockEntity {
- @Inject(
- method = "shouldRenderFace",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void shouldRenderFace(Direction direction, CallbackInfoReturnable cir) {
- if (Configs.endPortalRendererFix) {
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
- cir.setReturnValue(direction == Direction.UP);
- } else if (Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
- cir.setReturnValue(true);
- }
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
deleted file mode 100644
index 31a05165..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.patch.endPortalRendererFix;
-
-import com.mojang.blaze3d.vertex.VertexConsumer;
-import com.mojang.math.Matrix4f;
-import net.minecraft.client.renderer.blockentity.TheEndPortalRenderer;
-import net.minecraft.core.Direction;
-import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-
-@Mixin(TheEndPortalRenderer.class)
-public abstract class MixinTheEndPortalRenderer {
- @Shadow
- protected abstract void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, Direction direction);
-
- @Inject(
- method = "renderCube",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/renderer/blockentity/TheEndPortalRenderer;renderFace(Lnet/minecraft/world/level/block/entity/TheEndPortalBlockEntity;Lcom/mojang/math/Matrix4f;Lcom/mojang/blaze3d/vertex/VertexConsumer;FFFFFFFFLnet/minecraft/core/Direction;)V",
- ordinal = 0
- ),
- locals = LocalCapture.CAPTURE_FAILHARD,
- cancellable = true
- )
- private void onRenderCube(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, CallbackInfo ci, float f, float g) {
- if (Configs.endPortalRendererFix && Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.ACTUAL) {
- // Render the ender portal using its hit box.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, g, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, f, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, g, f, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, f, g, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.FULL) {
- // Render the end portal as a full block.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
- // Minecraft 21w13a below.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- }
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
deleted file mode 100644
index 445fb864..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.modmenu;
-
-import com.terraformersmc.modmenu.api.ConfigScreenFactory;
-import com.terraformersmc.modmenu.api.ModMenuApi;
-import top.hendrixshen.tweakmyclient.TweakMyClientConfigGui;
-
-public class ModMenuApiImpl implements ModMenuApi {
- @Override
- public ConfigScreenFactory> getModConfigScreenFactory() {
- return (screen) -> {
- TweakMyClientConfigGui gui = TweakMyClientConfigGui.getInstance();
- gui.setParent(screen);
- return gui;
- };
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
deleted file mode 100644
index e6c41b19..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import net.minecraft.SharedConstants;
-
-public class SharedConstantCompatImpl extends SharedConstantCompatApi {
- public static void initCompat() {
- INSTANCE = new SharedConstantCompatImpl();
- }
-
- @Override
- public int getProtocolVersion() {
- return SharedConstants.getProtocolVersion();
- }
-
- @Override
- public String getCurrentVersionName() {
- return SharedConstants.getCurrentVersion().getName();
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
deleted file mode 100644
index e21818e9..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import com.mojang.blaze3d.platform.Window;
-import org.lwjgl.glfw.GLFW;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class WindowCompatImpl extends WindowCompatApi {
- public static void initCompat() {
- INSTANCE = new WindowCompatImpl();
- }
-
- @Override
- public void resetTitle() {
- TweakMyClient.getMinecraftClient().updateTitle();
- }
-
- @Override
- public Window getWindow() {
- return TweakMyClient.getMinecraftClient().getWindow();
- }
-
- @Override
- public void setTitle(long window, String title) {
- GLFW.glfwSetWindowTitle(window, title);
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
deleted file mode 100644
index cbba0208..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-
-public class EntityCompatImpl extends EntityCompatApi {
- public static void initCompat() {
- INSTANCE = new EntityCompatImpl();
- }
-
- @Override
- public boolean onClimbable(LivingEntity entity) {
- return entity.onClimbable();
- }
-
- @Override
- public boolean isCrouching(LivingEntity entity) {
- return entity.isCrouching();
- }
-
- @Override
- public float getXRot(Entity entity) {
- return entity.getXRot();
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
deleted file mode 100644
index 7ae063db..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.client.multiplayer.MultiPlayerGameMode;
-import net.minecraft.world.entity.player.Inventory;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.inventory.ClickType;
-
-public class PlayerCompatImpl extends PlayerCompatApi {
- public static void initCompat() {
- INSTANCE = new PlayerCompatImpl();
- }
-
- @Override
- public Inventory getInventory(Player player) {
- return player.getInventory();
- }
-
- @Override
- public void handleInventoryMouseClick(MultiPlayerGameMode interactionManager, int containerId, int slot, int button, ClickType clickType, Player player) {
- interactionManager.handleInventoryMouseClick(containerId, slot, button, clickType, player);
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
deleted file mode 100644
index 2d7241e3..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.parser;
-
-import com.mojang.brigadier.StringReader;
-import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.minecraft.commands.arguments.item.ItemParser;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ItemStackCompatImpl extends ItemStackCompatApi {
- public static void initCompat() {
- INSTANCE = new ItemStackCompatImpl();
- }
-
- @Override
- public ItemStack toItemStack(String string) {
- try {
- ItemParser reader = new ItemParser(new StringReader(string), true);
- reader.parse();
- Item item = reader.getItem();
-
- if (item != null) {
- ItemStack stack = new ItemStack(item);
- stack.setTag(reader.getNbt());
- return stack;
- }
- } catch (CommandSyntaxException e) {
- TweakMyClient.getLogger().debug("Invalid item '{}'", string);
- }
-
- return ItemStack.EMPTY;
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
deleted file mode 100644
index a8b2a56c..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.render;
-
-import com.mojang.blaze3d.systems.RenderSystem;
-import com.mojang.blaze3d.vertex.BufferBuilder;
-import com.mojang.blaze3d.vertex.DefaultVertexFormat;
-import com.mojang.blaze3d.vertex.VertexFormat;
-import net.minecraft.client.renderer.GameRenderer;
-
-public class BufferBuilderCompatImpl extends BufferBuilderCompatApi {
- public static void initCompat() {
- INSTANCE = new BufferBuilderCompatImpl();
- }
-
- @Override
- public void beginGLLines(BufferBuilder bufferBuilder) {
- bufferBuilder.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
- }
-
- @Override
- public void compat_1_17_above() {
- RenderSystem.setShader(GameRenderer::getPositionColorShader);
- RenderSystem.applyModelViewMatrix();
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
deleted file mode 100644
index 7e61f012..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.ConnectScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.client.multiplayer.ServerData;
-import net.minecraft.client.multiplayer.resolver.ServerAddress;
-
-public class ConnectionCompatScreenImpl extends ConnectionCompatScreenApi {
- public static void initCompat() {
- INSTANCE = new ConnectionCompatScreenImpl();
- }
-
- @Override
- public void startConnect(Screen parent, Minecraft minecraft, ServerData serverData) {
- ConnectScreen.startConnecting(parent, minecraft, ServerAddress.parseString(serverData.ip), serverData);
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java b/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
deleted file mode 100644
index c8502df2..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.TextComponent;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-public class ScreenCompatImpl extends ScreenCompatApi {
- public static void initCompat() {
- INSTANCE = new ScreenCompatImpl();
- }
-
- @Override
- public Button addButton(Screen screen, Button button) {
- return ((IScreen) screen).addButtonEx(button);
- }
-
- @Override
- public Button createButton(int x, int y, int width, int height, String message, Button.OnPress onPress) {
- return new Button(x, y, width, height, new TextComponent(message), onPress);
- }
-
- @Override
- public void setButtonMessage(Button button, String message) {
- button.setMessage(new TextComponent(message));
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/resources/TweakMyClient-Compat.mixins.json b/tweakmyclient-compat-mc1_17/src/main/resources/TweakMyClient-Compat.mixins.json
deleted file mode 100644
index 04403fb0..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/resources/TweakMyClient-Compat.mixins.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "required": true,
- "package": "top.hendrixshen.tweakmyclient.compat.mixin",
- "plugin": "top.hendrixshen.tweakmyclient.TweakMyClientMixinPlugin",
- "minVersion": "0.8",
- "compatibilityLevel": "JAVA_8",
- "client": [
- ],
- "mixins": [
- "disable.disableRenderBossBar.MixinBossHealthOverlay",
- "disable.disableRenderOverlayPowderSnow.MixinGui",
- "disable.disableRenderOverlayPumpkin.MixinGui",
- "disable.disableSlowdown.MixinEntity",
- "disable.disableSlowdown.MixinSlimeBlock",
- "disable.disableSlowdown.tweakeroo.MixinSlimeBlock",
- "feature.featureAutoReconnect.MixinDisconnectedScreen",
- "feature.featureAutoReconnect.MixinScreen",
- "feature.featureAutoRespawn.MixinDeathScreen",
- "patch.endPortalRendererFix.MixinTheEndPortalBlockEntity",
- "patch.endPortalRendererFix.MixinTheEndPortalRenderer"
- ],
- "injectors": {
- "defaultRequire": 0
- }
-}
diff --git a/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icon.png b/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icon.png
deleted file mode 100644
index ec342689..00000000
Binary files a/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icon.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png b/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png
deleted file mode 100644
index 6a496bd3..00000000
Binary files a/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png b/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png
deleted file mode 100644
index 729ecb5d..00000000
Binary files a/tweakmyclient-compat-mc1_17/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_17/src/main/resources/fabric.mod.json b/tweakmyclient-compat-mc1_17/src/main/resources/fabric.mod.json
deleted file mode 100644
index 384d8643..00000000
--- a/tweakmyclient-compat-mc1_17/src/main/resources/fabric.mod.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "schemaVersion": 1,
- "id": "tweakmyclient-compat-mc1_17",
- "name": "TweakMyClient Compat",
- "version": "${mod_version}",
- "icon": "assets/tweakmyclient/icon.png",
- "description": "TweakMyClient compat for Minecraft 1.17.x",
- "authors": [
- {
- "name": "Hendrix_Shen",
- "contact": {
- "homepage": "https://github.com/Hendrix-Shen"
- }
- }
- ],
- "contact": {
- "homepage": "https://www.curseforge.com/minecraft/mc-mods/tweakmyclient",
- "issues": "https://github.com/Hendrix-Shen/Tweak-My-Client/issues",
- "sources": "https://github.com/Hendrix-Shen/Tweak-My-Client"
- },
- "license": "GPLv3",
- "environment": "client",
- "entrypoints": {
- "main": [
- "top.hendrixshen.tweakmyclient.TweakMyClientCompat"
- ]
- },
- "mixins": [
- "TweakMyClient-Compat.mixins.json"
- ],
- "depends": {
- "minecraft": "1.17.x",
- "tweakmyclient": "*"
- },
- "custom": {
- "modmenu:parent": "tweakmyclient",
- "modmenu:clientsideOnly": true,
- "modmenu": {
- "parent": "tweakmyclient"
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/build.gradle b/tweakmyclient-compat-mc1_18/build.gradle
deleted file mode 100644
index d87e3545..00000000
--- a/tweakmyclient-compat-mc1_18/build.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-dependencies {
- minecraft("com.mojang:minecraft:${project.minecraft_version}")
-
- modImplementation("curse.maven:malilib-303119:${project.library_malilib_version}")
- modImplementation("curse.maven:modmenu-308702:${project.library_modmenu_version}")
-
- modRuntimeOnly("curse.maven:in-game-account-switcher-232676:${project.library_inGameAccountSwitcher_version}")
- modRuntimeOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modRuntimeOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
- modRuntimeOnly("curse.maven:oauth-515054:${project.library_oauth_version}")
- modCompileOnly("curse.maven:reauth-403928:${project.library_reauth_version}")
-}
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_18/gradle.properties b/tweakmyclient-compat-mc1_18/gradle.properties
deleted file mode 100644
index 37ec9c92..00000000
--- a/tweakmyclient-compat-mc1_18/gradle.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Mod reference
-mod_id = tweakmyclient-compat-mc1_18
-
-# Development Environment
-minecraft_version = 1.18.2
-
-# Require Libraries
-# MaLiLib - 0.12.1
-library_malilib_version = 3692220
-# Mod Menu - 3.1.0
-library_modmenu_version = 3668801
-
-# Compatible Libraries
-# Auth Me - 2.2.0
-library_authme_version = 3569439
-# In-Game Account Switcher - 7.1.3
-library_inGameAccountSwitcher_version = 3545107
-# Litematica - 0.11.0
-library_litematica_version = 3671386
-# Oauth - 1.1.4.1
-library_oauth_version=3566331
-# ReAuth - 3.9.3
-library_reauth_version = 3105780
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
deleted file mode 100644
index 3338d63d..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import fi.dy.masa.malilib.event.RenderEventHandler;
-import net.fabricmc.api.ModInitializer;
-import top.hendrixshen.tweakmyclient.compat.event.RenderHandler;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.SharedConstantCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.WindowCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.EntityCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.PlayerCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.parser.ItemStackCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.render.BufferBuilderCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ConnectionCompatScreenImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ScreenCompatImpl;
-
-public class TweakMyClientCompat implements ModInitializer {
- @Override
- public void onInitialize() {
- TweakMyClient.getLogger().info("[{}]: Compat module for {} loaded. Starting compat api...", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getCompatVersion());
-
- SharedConstantCompatImpl.initCompat();
- WindowCompatImpl.initCompat();
-
- EntityCompatImpl.initCompat();
- PlayerCompatImpl.initCompat();
-
- ItemStackCompatImpl.initCompat();
-
- BufferBuilderCompatImpl.initCompat();
-
- ConnectionCompatScreenImpl.initCompat();
- ScreenCompatImpl.initCompat();
-
- RenderEventHandler.getInstance().registerWorldLastRenderer(RenderHandler.getInstance());
-
- TweakMyClient.getLogger().info("[{}]: Compat initialized - Version: {} ({})", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getModVersion(), TweakMyClientCompatReference.getModVersionType());
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
deleted file mode 100644
index a57c0213..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.loader.api.FabricLoader;
-import top.hendrixshen.tweakmyclient.util.VersionParser;
-
-public class TweakMyClientCompatReference {
- private static final String MOD_COMPAT_VERSION = "MC 1.18.x";
- private static final String MOD_ID = "tweakmyclient-compat-mc1_18";
- private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
- private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
- private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);
-
- public static String getCompatVersion() {
- return MOD_COMPAT_VERSION;
- }
-
- public static String getModId() {
- return MOD_ID;
- }
-
- public static String getModName() {
- return MOD_NAME;
- }
-
- public static String getModVersion() {
- return MOD_VERSION;
- }
-
- public static String getModVersionType() {
- return MOD_VERSION_TYPE;
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
deleted file mode 100644
index 0b020d94..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.event;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import com.mojang.math.Matrix4f;
-import fi.dy.masa.malilib.interfaces.IRenderer;
-import net.minecraft.client.Minecraft;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.util.render.OverlayRenderer;
-
-public class RenderHandler implements IRenderer {
- private static final RenderHandler INSTANCE = new RenderHandler();
- private final Minecraft minecraft;
-
- public RenderHandler() {
- this.minecraft = TweakMyClient.getMinecraftClient();
- }
-
- public static RenderHandler getInstance() {
- return INSTANCE;
- }
-
- @Override
- public void onRenderWorldLast(PoseStack matrixStack, Matrix4f projMatrix) {
- if (Configs.featureOpenWaterHelper) {
- OverlayRenderer.getInstance().renderOpenWater(minecraft);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableAttackEntity/MixinMinecraft.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableAttackEntity/MixinMinecraft.java
deleted file mode 100644
index 5910c588..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableAttackEntity/MixinMinecraft.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableAttackEntity;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.player.LocalPlayer;
-import net.minecraft.world.phys.HitResult;
-import org.jetbrains.annotations.Nullable;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Dependencies(not = @Dependency(value = "minecraft", versionPredicate = "<1.18"))
-@Mixin(Minecraft.class)
-public class MixinMinecraft {
- @Shadow
- @Nullable
- public HitResult hitResult;
-
- @Shadow
- @Nullable
- public LocalPlayer player;
-
- @Inject(
- method = "startAttack",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/multiplayer/MultiPlayerGameMode;attack(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/entity/Entity;)V"
- ),
- cancellable = true
- )
- private void onAttack(CallbackInfoReturnable cir) {
- if (CommonCompatLib.disableAttackEntity(this.hitResult, this.player)) {
- cir.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
deleted file mode 100644
index 26bbafac..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderBossBar;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import net.minecraft.client.gui.components.BossHealthOverlay;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(BossHealthOverlay.class)
-public class MixinBossHealthOverlay {
- @Inject(
- method = "render",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRender(PoseStack poseStack, CallbackInfo ci) {
- if (Configs.disableRenderBossBar) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
deleted file mode 100644
index 843d4a44..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayPumpkin;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.resources.ResourceLocation;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @Shadow
- @Final
- private static ResourceLocation PUMPKIN_BLUR_LOCATION;
-
- @Inject(
- method = "renderTextureOverlay",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderPumpkinOverlay(ResourceLocation resourceLocation, float f, CallbackInfo ci) {
- if (Configs.disableRenderOverlayPumpkin && resourceLocation == PUMPKIN_BLUR_LOCATION) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java
deleted file mode 100644
index 3d87bcc8..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.client.player.LocalPlayer;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.phys.Vec3;
-import org.objectweb.asm.Opcodes;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Redirect;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Entity.class)
-public class MixinEntity {
- @Shadow
- protected Vec3 stuckSpeedMultiplier;
-
- @Redirect(
- method = "move",
- at = @At(
- value = "FIELD",
- target = "Lnet/minecraft/world/entity/Entity;stuckSpeedMultiplier:Lnet/minecraft/world/phys/Vec3;",
- opcode = Opcodes.GETFIELD,
- ordinal = 0
- )
- )
- private Vec3 onGetStuckSpeedMultiplier(Entity instance) {
- return Configs.disableSlowdown && instance instanceof LocalPlayer ? Vec3.ZERO : this.stuckSpeedMultiplier;
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
deleted file mode 100644
index 03b9e693..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "bounceUp",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onbounceUp(Entity entity, CallbackInfo ci) {
- CommonCompatLib.disableSlowdown(entity, ci);
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
deleted file mode 100644
index 0319c9e3..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.screens.DisconnectedScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.Component;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.util.AutoReconnectUtil;
-
-@Mixin(value = DisconnectedScreen.class, priority = 900)
-public class MixinDisconnectedScreen extends Screen {
- @Shadow
- @Final
- private Screen parent;
-
- @Shadow
- private int textHeight;
-
- @Shadow
- @Final
- private Component reason;
-
- protected MixinDisconnectedScreen(Component component) {
- super(component);
- }
-
- @Inject(
- method = "init",
- at = @At(
- value = "TAIL"
- ),
- cancellable = true
- )
- private void onInitDisconnectedScreen(CallbackInfo ci) {
- AutoReconnectUtil.getInstance().initDisconnectedScreen(this, parent, width, height, textHeight, reason);
- ci.cancel();
- }
-
- @Override
- public void tick() {
- AutoReconnectUtil.tickAutoReconnectButton(parent);
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
deleted file mode 100644
index a24ca8fb..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoRespawn;
-
-import net.minecraft.client.gui.screens.DeathScreen;
-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;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(DeathScreen.class)
-public class MixinDeathScreen {
- @Inject(
- method = "tick",
- at = @At(
- value = "TAIL"
- )
- )
- private void onTick(CallbackInfo ci) {
- if (Configs.featureAutoRespawn) {
- assert TweakMyClient.getMinecraftClient().player != null;
- TweakMyClient.getMinecraftClient().player.respawn();
- TweakMyClient.getMinecraftClient().setScreen(null);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
deleted file mode 100644
index 93374389..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.patch.endPortalRendererFix;
-
-import net.minecraft.core.Direction;
-import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
-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.CallbackInfoReturnable;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-
-@Mixin(TheEndPortalBlockEntity.class)
-public class MixinTheEndPortalBlockEntity {
- @Inject(
- method = "shouldRenderFace",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void shouldRenderFace(Direction direction, CallbackInfoReturnable cir) {
- if (Configs.endPortalRendererFix) {
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
- cir.setReturnValue(direction == Direction.UP);
- } else if (Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
- cir.setReturnValue(true);
- }
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
deleted file mode 100644
index 31a05165..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.patch.endPortalRendererFix;
-
-import com.mojang.blaze3d.vertex.VertexConsumer;
-import com.mojang.math.Matrix4f;
-import net.minecraft.client.renderer.blockentity.TheEndPortalRenderer;
-import net.minecraft.core.Direction;
-import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-
-@Mixin(TheEndPortalRenderer.class)
-public abstract class MixinTheEndPortalRenderer {
- @Shadow
- protected abstract void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, Direction direction);
-
- @Inject(
- method = "renderCube",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/renderer/blockentity/TheEndPortalRenderer;renderFace(Lnet/minecraft/world/level/block/entity/TheEndPortalBlockEntity;Lcom/mojang/math/Matrix4f;Lcom/mojang/blaze3d/vertex/VertexConsumer;FFFFFFFFLnet/minecraft/core/Direction;)V",
- ordinal = 0
- ),
- locals = LocalCapture.CAPTURE_FAILHARD,
- cancellable = true
- )
- private void onRenderCube(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, CallbackInfo ci, float f, float g) {
- if (Configs.endPortalRendererFix && Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.ACTUAL) {
- // Render the ender portal using its hit box.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, g, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, f, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, g, f, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, f, g, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.FULL) {
- // Render the end portal as a full block.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
- // Minecraft 21w13a below.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- }
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
deleted file mode 100644
index 445fb864..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.modmenu;
-
-import com.terraformersmc.modmenu.api.ConfigScreenFactory;
-import com.terraformersmc.modmenu.api.ModMenuApi;
-import top.hendrixshen.tweakmyclient.TweakMyClientConfigGui;
-
-public class ModMenuApiImpl implements ModMenuApi {
- @Override
- public ConfigScreenFactory> getModConfigScreenFactory() {
- return (screen) -> {
- TweakMyClientConfigGui gui = TweakMyClientConfigGui.getInstance();
- gui.setParent(screen);
- return gui;
- };
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
deleted file mode 100644
index e6c41b19..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import net.minecraft.SharedConstants;
-
-public class SharedConstantCompatImpl extends SharedConstantCompatApi {
- public static void initCompat() {
- INSTANCE = new SharedConstantCompatImpl();
- }
-
- @Override
- public int getProtocolVersion() {
- return SharedConstants.getProtocolVersion();
- }
-
- @Override
- public String getCurrentVersionName() {
- return SharedConstants.getCurrentVersion().getName();
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
deleted file mode 100644
index e21818e9..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import com.mojang.blaze3d.platform.Window;
-import org.lwjgl.glfw.GLFW;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class WindowCompatImpl extends WindowCompatApi {
- public static void initCompat() {
- INSTANCE = new WindowCompatImpl();
- }
-
- @Override
- public void resetTitle() {
- TweakMyClient.getMinecraftClient().updateTitle();
- }
-
- @Override
- public Window getWindow() {
- return TweakMyClient.getMinecraftClient().getWindow();
- }
-
- @Override
- public void setTitle(long window, String title) {
- GLFW.glfwSetWindowTitle(window, title);
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
deleted file mode 100644
index cbba0208..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-
-public class EntityCompatImpl extends EntityCompatApi {
- public static void initCompat() {
- INSTANCE = new EntityCompatImpl();
- }
-
- @Override
- public boolean onClimbable(LivingEntity entity) {
- return entity.onClimbable();
- }
-
- @Override
- public boolean isCrouching(LivingEntity entity) {
- return entity.isCrouching();
- }
-
- @Override
- public float getXRot(Entity entity) {
- return entity.getXRot();
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
deleted file mode 100644
index 7ae063db..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.client.multiplayer.MultiPlayerGameMode;
-import net.minecraft.world.entity.player.Inventory;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.inventory.ClickType;
-
-public class PlayerCompatImpl extends PlayerCompatApi {
- public static void initCompat() {
- INSTANCE = new PlayerCompatImpl();
- }
-
- @Override
- public Inventory getInventory(Player player) {
- return player.getInventory();
- }
-
- @Override
- public void handleInventoryMouseClick(MultiPlayerGameMode interactionManager, int containerId, int slot, int button, ClickType clickType, Player player) {
- interactionManager.handleInventoryMouseClick(containerId, slot, button, clickType, player);
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
deleted file mode 100644
index 2d7241e3..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.parser;
-
-import com.mojang.brigadier.StringReader;
-import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.minecraft.commands.arguments.item.ItemParser;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ItemStackCompatImpl extends ItemStackCompatApi {
- public static void initCompat() {
- INSTANCE = new ItemStackCompatImpl();
- }
-
- @Override
- public ItemStack toItemStack(String string) {
- try {
- ItemParser reader = new ItemParser(new StringReader(string), true);
- reader.parse();
- Item item = reader.getItem();
-
- if (item != null) {
- ItemStack stack = new ItemStack(item);
- stack.setTag(reader.getNbt());
- return stack;
- }
- } catch (CommandSyntaxException e) {
- TweakMyClient.getLogger().debug("Invalid item '{}'", string);
- }
-
- return ItemStack.EMPTY;
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
deleted file mode 100644
index a8b2a56c..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.render;
-
-import com.mojang.blaze3d.systems.RenderSystem;
-import com.mojang.blaze3d.vertex.BufferBuilder;
-import com.mojang.blaze3d.vertex.DefaultVertexFormat;
-import com.mojang.blaze3d.vertex.VertexFormat;
-import net.minecraft.client.renderer.GameRenderer;
-
-public class BufferBuilderCompatImpl extends BufferBuilderCompatApi {
- public static void initCompat() {
- INSTANCE = new BufferBuilderCompatImpl();
- }
-
- @Override
- public void beginGLLines(BufferBuilder bufferBuilder) {
- bufferBuilder.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
- }
-
- @Override
- public void compat_1_17_above() {
- RenderSystem.setShader(GameRenderer::getPositionColorShader);
- RenderSystem.applyModelViewMatrix();
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
deleted file mode 100644
index 7e61f012..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.ConnectScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.client.multiplayer.ServerData;
-import net.minecraft.client.multiplayer.resolver.ServerAddress;
-
-public class ConnectionCompatScreenImpl extends ConnectionCompatScreenApi {
- public static void initCompat() {
- INSTANCE = new ConnectionCompatScreenImpl();
- }
-
- @Override
- public void startConnect(Screen parent, Minecraft minecraft, ServerData serverData) {
- ConnectScreen.startConnecting(parent, minecraft, ServerAddress.parseString(serverData.ip), serverData);
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java b/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
deleted file mode 100644
index c8502df2..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.TextComponent;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-public class ScreenCompatImpl extends ScreenCompatApi {
- public static void initCompat() {
- INSTANCE = new ScreenCompatImpl();
- }
-
- @Override
- public Button addButton(Screen screen, Button button) {
- return ((IScreen) screen).addButtonEx(button);
- }
-
- @Override
- public Button createButton(int x, int y, int width, int height, String message, Button.OnPress onPress) {
- return new Button(x, y, width, height, new TextComponent(message), onPress);
- }
-
- @Override
- public void setButtonMessage(Button button, String message) {
- button.setMessage(new TextComponent(message));
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/resources/TweakMyClient-Compat.mixins.json b/tweakmyclient-compat-mc1_18/src/main/resources/TweakMyClient-Compat.mixins.json
deleted file mode 100644
index 871078f7..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/resources/TweakMyClient-Compat.mixins.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "required": true,
- "package": "top.hendrixshen.tweakmyclient.compat.mixin",
- "plugin": "top.hendrixshen.tweakmyclient.TweakMyClientMixinPlugin",
- "minVersion": "0.8",
- "compatibilityLevel": "JAVA_8",
- "client": [
- ],
- "mixins": [
- "disable.disableAttackEntity.MixinMinecraft",
- "disable.disableRenderBossBar.MixinBossHealthOverlay",
- "disable.disableRenderOverlayPowderSnow.MixinGui",
- "disable.disableRenderOverlayPumpkin.MixinGui",
- "disable.disableSlowdown.MixinEntity",
- "disable.disableSlowdown.MixinSlimeBlock",
- "disable.disableSlowdown.tweakeroo.MixinSlimeBlock",
- "feature.featureAutoReconnect.MixinDisconnectedScreen",
- "feature.featureAutoReconnect.MixinScreen",
- "feature.featureAutoRespawn.MixinDeathScreen",
- "patch.endPortalRendererFix.MixinTheEndPortalBlockEntity",
- "patch.endPortalRendererFix.MixinTheEndPortalRenderer"
- ],
- "injectors": {
- "defaultRequire": 0
- }
-}
diff --git a/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icon.png b/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icon.png
deleted file mode 100644
index ec342689..00000000
Binary files a/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icon.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png b/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png
deleted file mode 100644
index 6a496bd3..00000000
Binary files a/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png b/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png
deleted file mode 100644
index 729ecb5d..00000000
Binary files a/tweakmyclient-compat-mc1_18/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_18/src/main/resources/fabric.mod.json b/tweakmyclient-compat-mc1_18/src/main/resources/fabric.mod.json
deleted file mode 100644
index ee532f32..00000000
--- a/tweakmyclient-compat-mc1_18/src/main/resources/fabric.mod.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "schemaVersion": 1,
- "id": "tweakmyclient-compat-mc1_18",
- "name": "TweakMyClient Compat",
- "version": "${mod_version}",
- "icon": "assets/tweakmyclient/icon.png",
- "description": "TweakMyClient compat for Minecraft 1.18.x",
- "authors": [
- {
- "name": "Hendrix_Shen",
- "contact": {
- "homepage": "https://github.com/Hendrix-Shen"
- }
- }
- ],
- "contact": {
- "homepage": "https://www.curseforge.com/minecraft/mc-mods/tweakmyclient",
- "issues": "https://github.com/Hendrix-Shen/Tweak-My-Client/issues",
- "sources": "https://github.com/Hendrix-Shen/Tweak-My-Client"
- },
- "license": "GPLv3",
- "environment": "client",
- "entrypoints": {
- "main": [
- "top.hendrixshen.tweakmyclient.TweakMyClientCompat"
- ]
- },
- "mixins": [
- "TweakMyClient-Compat.mixins.json"
- ],
- "depends": {
- "minecraft": "1.18.x",
- "tweakmyclient": "*"
- },
- "custom": {
- "modmenu:parent": "tweakmyclient",
- "modmenu:clientsideOnly": true,
- "modmenu": {
- "parent": "tweakmyclient"
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/build.gradle b/tweakmyclient-compat-mc1_19/build.gradle
deleted file mode 100644
index 9458eef4..00000000
--- a/tweakmyclient-compat-mc1_19/build.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-dependencies {
- minecraft("com.mojang:minecraft:${project.minecraft_version}")
-
- modCompileOnly("curse.maven:malilib-303119:${project.library_malilib_version}")
- modCompileOnly("curse.maven:modmenu-308702:${project.library_modmenu_version}")
-
- modCompileOnly("curse.maven:in-game-account-switcher-232676:${project.library_inGameAccountSwitcher_version}")
- modCompileOnly("curse.maven:authme-356643:${project.library_authme_version}")
- modCompileOnly("curse.maven:litematica-308892:${project.library_litematica_version}")
- modRuntimeOnly("curse.maven:oauth-515054:${project.library_oauth_version}")
- modCompileOnly("curse.maven:reauth-403928:${project.library_reauth_version}")
-}
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_19/gradle.properties b/tweakmyclient-compat-mc1_19/gradle.properties
deleted file mode 100644
index 8e0259c4..00000000
--- a/tweakmyclient-compat-mc1_19/gradle.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Mod reference
-mod_id = tweakmyclient-compat-mc1_19
-
-# Development Environment
-minecraft_version = 22w12a
-
-# Require Libraries
-# MaLiLib - 0.12.1
-library_malilib_version = 3692220
-# Mod Menu - 3.0.1
-library_modmenu_version = 3570652
-
-# Compatible Libraries
-# Auth Me - 2.2.0
-library_authme_version = 3569439
-# In-Game Account Switcher - 7.1.3
-library_inGameAccountSwitcher_version = 3545107
-# Litematica - 0.11.0
-library_litematica_version = 3671386
-# Oauth - 1.1.4.1
-library_oauth_version=3566331
-# ReAuth - 3.9.3
-library_reauth_version = 3105780
\ No newline at end of file
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
deleted file mode 100644
index 3338d63d..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompat.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import fi.dy.masa.malilib.event.RenderEventHandler;
-import net.fabricmc.api.ModInitializer;
-import top.hendrixshen.tweakmyclient.compat.event.RenderHandler;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.SharedConstantCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.client.WindowCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.EntityCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.entity.PlayerCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.parser.ItemStackCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.render.BufferBuilderCompatImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ConnectionCompatScreenImpl;
-import top.hendrixshen.tweakmyclient.compat.proxy.screen.ScreenCompatImpl;
-
-public class TweakMyClientCompat implements ModInitializer {
- @Override
- public void onInitialize() {
- TweakMyClient.getLogger().info("[{}]: Compat module for {} loaded. Starting compat api...", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getCompatVersion());
-
- SharedConstantCompatImpl.initCompat();
- WindowCompatImpl.initCompat();
-
- EntityCompatImpl.initCompat();
- PlayerCompatImpl.initCompat();
-
- ItemStackCompatImpl.initCompat();
-
- BufferBuilderCompatImpl.initCompat();
-
- ConnectionCompatScreenImpl.initCompat();
- ScreenCompatImpl.initCompat();
-
- RenderEventHandler.getInstance().registerWorldLastRenderer(RenderHandler.getInstance());
-
- TweakMyClient.getLogger().info("[{}]: Compat initialized - Version: {} ({})", TweakMyClientCompatReference.getModName(), TweakMyClientCompatReference.getModVersion(), TweakMyClientCompatReference.getModVersionType());
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
deleted file mode 100644
index bae060c4..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/TweakMyClientCompatReference.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package top.hendrixshen.tweakmyclient;
-
-import net.fabricmc.loader.api.FabricLoader;
-import top.hendrixshen.tweakmyclient.util.VersionParser;
-
-public class TweakMyClientCompatReference {
- private static final String MOD_COMPAT_VERSION = "MC 1.19.x";
- private static final String MOD_ID = "tweakmyclient-compat-mc1_19";
- private static final String MOD_NAME = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getName();
- private static final String MOD_VERSION = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(RuntimeException::new).getMetadata().getVersion().getFriendlyString();
- private static final String MOD_VERSION_TYPE = VersionParser.getVersionType(MOD_VERSION);
-
- public static String getCompatVersion() {
- return MOD_COMPAT_VERSION;
- }
-
- public static String getModId() {
- return MOD_ID;
- }
-
- public static String getModName() {
- return MOD_NAME;
- }
-
- public static String getModVersion() {
- return MOD_VERSION;
- }
-
- public static String getModVersionType() {
- return MOD_VERSION_TYPE;
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/StringUtil.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/StringUtil.java
deleted file mode 100644
index b96c7870..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/StringUtil.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat;
-
-import com.mojang.brigadier.StringReader;
-import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.minecraft.commands.arguments.item.ItemParser;
-import net.minecraft.core.HolderLookup;
-import net.minecraft.core.Registry;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-import java.util.HashSet;
-import java.util.List;
-
-public class StringUtil {
- public static ItemStack parseItemFromString(String str) {
- try {
- ItemParser.ItemResult result = ItemParser.parseForItem(new HolderLookup.RegistryLookup<>(Registry.ITEM), new StringReader(str));
-
- Item item = result.item().value();
- if (item != null) {
- ItemStack stack = new ItemStack(item);
- stack.setTag(result.nbt());
- return stack;
- }
- } catch (CommandSyntaxException e) {
- e.printStackTrace();
- TweakMyClient.getLogger().debug("Invalid item '{}'", str);
- }
-
- return ItemStack.EMPTY;
- }
-
- public static HashSet
- getItemStackSets(List items) {
- HashSet
- itemStackSet = new HashSet<>();
- for (String str : items) {
- ItemStack stack = parseItemFromString(str);
-
- if (!stack.isEmpty()) {
- itemStackSet.add(stack.getItem());
- }
- }
- return itemStackSet;
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
deleted file mode 100644
index 0b020d94..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/event/RenderHandler.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.event;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import com.mojang.math.Matrix4f;
-import fi.dy.masa.malilib.interfaces.IRenderer;
-import net.minecraft.client.Minecraft;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.util.render.OverlayRenderer;
-
-public class RenderHandler implements IRenderer {
- private static final RenderHandler INSTANCE = new RenderHandler();
- private final Minecraft minecraft;
-
- public RenderHandler() {
- this.minecraft = TweakMyClient.getMinecraftClient();
- }
-
- public static RenderHandler getInstance() {
- return INSTANCE;
- }
-
- @Override
- public void onRenderWorldLast(PoseStack matrixStack, Matrix4f projMatrix) {
- if (Configs.featureOpenWaterHelper) {
- OverlayRenderer.getInstance().renderOpenWater(minecraft);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
deleted file mode 100644
index 26bbafac..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderBossBar/MixinBossHealthOverlay.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderBossBar;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import net.minecraft.client.gui.components.BossHealthOverlay;
-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;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(BossHealthOverlay.class)
-public class MixinBossHealthOverlay {
- @Inject(
- method = "render",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRender(PoseStack poseStack, CallbackInfo ci) {
- if (Configs.disableRenderBossBar) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
deleted file mode 100644
index 0138e155..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPowderSnow/MixinGui.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayPowderSnow;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.resources.ResourceLocation;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @Shadow
- @Final
- private static ResourceLocation POWDER_SNOW_OUTLINE_LOCATION;
-
- @Inject(
- method = "renderTextureOverlay",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderPowderSnowOverlay(ResourceLocation resourceLocation, float f, CallbackInfo ci) {
- if (Configs.disableRenderOverlayPowderSnow && resourceLocation == POWDER_SNOW_OUTLINE_LOCATION) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
deleted file mode 100644
index 843d4a44..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableRenderOverlayPumpkin/MixinGui.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableRenderOverlayPumpkin;
-
-import net.minecraft.client.gui.Gui;
-import net.minecraft.resources.ResourceLocation;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Gui.class)
-public abstract class MixinGui {
- @Shadow
- @Final
- private static ResourceLocation PUMPKIN_BLUR_LOCATION;
-
- @Inject(
- method = "renderTextureOverlay",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onRenderPumpkinOverlay(ResourceLocation resourceLocation, float f, CallbackInfo ci) {
- if (Configs.disableRenderOverlayPumpkin && resourceLocation == PUMPKIN_BLUR_LOCATION) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java
deleted file mode 100644
index 3d87bcc8..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinEntity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.client.player.LocalPlayer;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.phys.Vec3;
-import org.objectweb.asm.Opcodes;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Redirect;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(Entity.class)
-public class MixinEntity {
- @Shadow
- protected Vec3 stuckSpeedMultiplier;
-
- @Redirect(
- method = "move",
- at = @At(
- value = "FIELD",
- target = "Lnet/minecraft/world/entity/Entity;stuckSpeedMultiplier:Lnet/minecraft/world/phys/Vec3;",
- opcode = Opcodes.GETFIELD,
- ordinal = 0
- )
- )
- private Vec3 onGetStuckSpeedMultiplier(Entity instance) {
- return Configs.disableSlowdown && instance instanceof LocalPlayer ? Vec3.ZERO : this.stuckSpeedMultiplier;
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
deleted file mode 100644
index 03b9e693..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/MixinSlimeBlock.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-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;
-import top.hendrixshen.tweakmyclient.helper.CommonCompatLib;
-
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "bounceUp",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void onbounceUp(Entity entity, CallbackInfo ci) {
- CommonCompatLib.disableSlowdown(entity, ci);
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
deleted file mode 100644
index 9e005c6d..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/disable/disableSlowdown/tweakeroo/MixinSlimeBlock.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.disable.disableSlowdown.tweakeroo;
-
-import net.minecraft.core.BlockPos;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.Level;
-import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.SlimeBlock;
-import net.minecraft.world.level.block.state.BlockState;
-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;
-import top.hendrixshen.magiclib.dependency.annotation.Dependencies;
-import top.hendrixshen.magiclib.dependency.annotation.Dependency;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Dependencies(not = @Dependency(value = "tweakeroo"))
-@Mixin(SlimeBlock.class)
-public class MixinSlimeBlock extends Block {
- public MixinSlimeBlock(Properties properties) {
- super(properties);
- }
-
- @Inject(
- method = "stepOn",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void stepOn(Level level, BlockPos blockPos, BlockState blockState, Entity entity, CallbackInfo ci) {
- if (Configs.disableSlowdown) {
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
deleted file mode 100644
index 0319c9e3..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinDisconnectedScreen.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.screens.DisconnectedScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.Component;
-import org.spongepowered.asm.mixin.Final;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import top.hendrixshen.tweakmyclient.util.AutoReconnectUtil;
-
-@Mixin(value = DisconnectedScreen.class, priority = 900)
-public class MixinDisconnectedScreen extends Screen {
- @Shadow
- @Final
- private Screen parent;
-
- @Shadow
- private int textHeight;
-
- @Shadow
- @Final
- private Component reason;
-
- protected MixinDisconnectedScreen(Component component) {
- super(component);
- }
-
- @Inject(
- method = "init",
- at = @At(
- value = "TAIL"
- ),
- cancellable = true
- )
- private void onInitDisconnectedScreen(CallbackInfo ci) {
- AutoReconnectUtil.getInstance().initDisconnectedScreen(this, parent, width, height, textHeight, reason);
- ci.cancel();
- }
-
- @Override
- public void tick() {
- AutoReconnectUtil.tickAutoReconnectButton(parent);
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
deleted file mode 100644
index 4461dd0d..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoReconnect/MixinScreen.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoReconnect;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.components.events.GuiEventListener;
-import net.minecraft.client.gui.screens.Screen;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-@Mixin(Screen.class)
-public abstract class MixinScreen implements IScreen {
- @SuppressWarnings("target")
- @Shadow
- protected abstract GuiEventListener addRenderableWidget(GuiEventListener guiEventListener);
-
- @Override
- public Button addButtonEx(Button button) {
- return (Button) addRenderableWidget(button);
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
deleted file mode 100644
index a24ca8fb..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/feature/featureAutoRespawn/MixinDeathScreen.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.feature.featureAutoRespawn;
-
-import net.minecraft.client.gui.screens.DeathScreen;
-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;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-import top.hendrixshen.tweakmyclient.config.Configs;
-
-@Mixin(DeathScreen.class)
-public class MixinDeathScreen {
- @Inject(
- method = "tick",
- at = @At(
- value = "TAIL"
- )
- )
- private void onTick(CallbackInfo ci) {
- if (Configs.featureAutoRespawn) {
- assert TweakMyClient.getMinecraftClient().player != null;
- TweakMyClient.getMinecraftClient().player.respawn();
- TweakMyClient.getMinecraftClient().setScreen(null);
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
deleted file mode 100644
index 93374389..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalBlockEntity.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.patch.endPortalRendererFix;
-
-import net.minecraft.core.Direction;
-import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
-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.CallbackInfoReturnable;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-
-@Mixin(TheEndPortalBlockEntity.class)
-public class MixinTheEndPortalBlockEntity {
- @Inject(
- method = "shouldRenderFace",
- at = @At(
- value = "HEAD"
- ),
- cancellable = true
- )
- private void shouldRenderFace(Direction direction, CallbackInfoReturnable cir) {
- if (Configs.endPortalRendererFix) {
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
- cir.setReturnValue(direction == Direction.UP);
- } else if (Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
- cir.setReturnValue(true);
- }
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
deleted file mode 100644
index 31a05165..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/mixin/patch/endPortalRendererFix/MixinTheEndPortalRenderer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.mixin.patch.endPortalRendererFix;
-
-import com.mojang.blaze3d.vertex.VertexConsumer;
-import com.mojang.math.Matrix4f;
-import net.minecraft.client.renderer.blockentity.TheEndPortalRenderer;
-import net.minecraft.core.Direction;
-import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Shadow;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
-import top.hendrixshen.tweakmyclient.config.Configs;
-import top.hendrixshen.tweakmyclient.helper.EnderPortalRenderMode;
-
-@Mixin(TheEndPortalRenderer.class)
-public abstract class MixinTheEndPortalRenderer {
- @Shadow
- protected abstract void renderFace(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, Direction direction);
-
- @Inject(
- method = "renderCube",
- at = @At(
- value = "INVOKE",
- target = "Lnet/minecraft/client/renderer/blockentity/TheEndPortalRenderer;renderFace(Lnet/minecraft/world/level/block/entity/TheEndPortalBlockEntity;Lcom/mojang/math/Matrix4f;Lcom/mojang/blaze3d/vertex/VertexConsumer;FFFFFFFFLnet/minecraft/core/Direction;)V",
- ordinal = 0
- ),
- locals = LocalCapture.CAPTURE_FAILHARD,
- cancellable = true
- )
- private void onRenderCube(TheEndPortalBlockEntity theEndPortalBlockEntity, Matrix4f matrix4f, VertexConsumer vertexConsumer, CallbackInfo ci, float f, float g) {
- if (Configs.endPortalRendererFix && Configs.enderPortalRenderMode != EnderPortalRenderMode.MODERN) {
- if (Configs.enderPortalRenderMode == EnderPortalRenderMode.ACTUAL) {
- // Render the ender portal using its hit box.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, g, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, f, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, g, f, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, f, g, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, f, f, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.FULL) {
- // Render the end portal as a full block.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- } else if (Configs.enderPortalRenderMode == EnderPortalRenderMode.LEGACY) {
- // Minecraft 21w13a below.
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, Direction.SOUTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, Direction.NORTH);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 1.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.EAST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 1.0F, 1.0F, 0.0F, Direction.WEST);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F, 1.0F, Direction.DOWN);
- this.renderFace(theEndPortalBlockEntity, matrix4f, vertexConsumer, 0.0F, 1.0F, g, g, 1.0F, 1.0F, 0.0F, 0.0F, Direction.UP);
- }
- ci.cancel();
- }
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
deleted file mode 100644
index 445fb864..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/modmenu/ModMenuApiImpl.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.modmenu;
-
-import com.terraformersmc.modmenu.api.ConfigScreenFactory;
-import com.terraformersmc.modmenu.api.ModMenuApi;
-import top.hendrixshen.tweakmyclient.TweakMyClientConfigGui;
-
-public class ModMenuApiImpl implements ModMenuApi {
- @Override
- public ConfigScreenFactory> getModConfigScreenFactory() {
- return (screen) -> {
- TweakMyClientConfigGui gui = TweakMyClientConfigGui.getInstance();
- gui.setParent(screen);
- return gui;
- };
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
deleted file mode 100644
index e6c41b19..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/SharedConstantCompatImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import net.minecraft.SharedConstants;
-
-public class SharedConstantCompatImpl extends SharedConstantCompatApi {
- public static void initCompat() {
- INSTANCE = new SharedConstantCompatImpl();
- }
-
- @Override
- public int getProtocolVersion() {
- return SharedConstants.getProtocolVersion();
- }
-
- @Override
- public String getCurrentVersionName() {
- return SharedConstants.getCurrentVersion().getName();
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
deleted file mode 100644
index e21818e9..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/client/WindowCompatImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.client;
-
-import com.mojang.blaze3d.platform.Window;
-import org.lwjgl.glfw.GLFW;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class WindowCompatImpl extends WindowCompatApi {
- public static void initCompat() {
- INSTANCE = new WindowCompatImpl();
- }
-
- @Override
- public void resetTitle() {
- TweakMyClient.getMinecraftClient().updateTitle();
- }
-
- @Override
- public Window getWindow() {
- return TweakMyClient.getMinecraftClient().getWindow();
- }
-
- @Override
- public void setTitle(long window, String title) {
- GLFW.glfwSetWindowTitle(window, title);
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
deleted file mode 100644
index cbba0208..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/EntityCompatImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.LivingEntity;
-
-public class EntityCompatImpl extends EntityCompatApi {
- public static void initCompat() {
- INSTANCE = new EntityCompatImpl();
- }
-
- @Override
- public boolean onClimbable(LivingEntity entity) {
- return entity.onClimbable();
- }
-
- @Override
- public boolean isCrouching(LivingEntity entity) {
- return entity.isCrouching();
- }
-
- @Override
- public float getXRot(Entity entity) {
- return entity.getXRot();
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
deleted file mode 100644
index 7ae063db..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/entity/PlayerCompatImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.entity;
-
-import net.minecraft.client.multiplayer.MultiPlayerGameMode;
-import net.minecraft.world.entity.player.Inventory;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.inventory.ClickType;
-
-public class PlayerCompatImpl extends PlayerCompatApi {
- public static void initCompat() {
- INSTANCE = new PlayerCompatImpl();
- }
-
- @Override
- public Inventory getInventory(Player player) {
- return player.getInventory();
- }
-
- @Override
- public void handleInventoryMouseClick(MultiPlayerGameMode interactionManager, int containerId, int slot, int button, ClickType clickType, Player player) {
- interactionManager.handleInventoryMouseClick(containerId, slot, button, clickType, player);
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
deleted file mode 100644
index 754d01f7..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/parser/ItemStackCompatImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.parser;
-
-import com.mojang.brigadier.StringReader;
-import net.minecraft.commands.arguments.item.ItemParser;
-import net.minecraft.core.HolderLookup;
-import net.minecraft.core.Registry;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import top.hendrixshen.tweakmyclient.TweakMyClient;
-
-public class ItemStackCompatImpl extends ItemStackCompatApi {
- public static void initCompat() {
- INSTANCE = new ItemStackCompatImpl();
- }
-
- @Override
- public ItemStack toItemStack(String string) {
- try {
- ItemParser.ItemResult result = ItemParser.parseForItem(new HolderLookup.RegistryLookup<>(Registry.ITEM), new StringReader(string));
-
- Item item = result.item().value();
- if (item != null) {
- ItemStack stack = new ItemStack(item);
- stack.setTag(result.nbt());
- return stack;
- }
- } catch (Exception e) {
- e.printStackTrace();
- TweakMyClient.getLogger().debug("Invalid item '{}'", string);
- }
-
- return ItemStack.EMPTY;
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
deleted file mode 100644
index a8b2a56c..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/render/BufferBuilderCompatImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.render;
-
-import com.mojang.blaze3d.systems.RenderSystem;
-import com.mojang.blaze3d.vertex.BufferBuilder;
-import com.mojang.blaze3d.vertex.DefaultVertexFormat;
-import com.mojang.blaze3d.vertex.VertexFormat;
-import net.minecraft.client.renderer.GameRenderer;
-
-public class BufferBuilderCompatImpl extends BufferBuilderCompatApi {
- public static void initCompat() {
- INSTANCE = new BufferBuilderCompatImpl();
- }
-
- @Override
- public void beginGLLines(BufferBuilder bufferBuilder) {
- bufferBuilder.begin(VertexFormat.Mode.DEBUG_LINES, DefaultVertexFormat.POSITION_COLOR);
- }
-
- @Override
- public void compat_1_17_above() {
- RenderSystem.setShader(GameRenderer::getPositionColorShader);
- RenderSystem.applyModelViewMatrix();
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
deleted file mode 100644
index 7e61f012..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ConnectionCompatScreenImpl.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.ConnectScreen;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.client.multiplayer.ServerData;
-import net.minecraft.client.multiplayer.resolver.ServerAddress;
-
-public class ConnectionCompatScreenImpl extends ConnectionCompatScreenApi {
- public static void initCompat() {
- INSTANCE = new ConnectionCompatScreenImpl();
- }
-
- @Override
- public void startConnect(Screen parent, Minecraft minecraft, ServerData serverData) {
- ConnectScreen.startConnecting(parent, minecraft, ServerAddress.parseString(serverData.ip), serverData);
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java b/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
deleted file mode 100644
index c8502df2..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/java/top/hendrixshen/tweakmyclient/compat/proxy/screen/ScreenCompatImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package top.hendrixshen.tweakmyclient.compat.proxy.screen;
-
-import net.minecraft.client.gui.components.Button;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.TextComponent;
-import top.hendrixshen.tweakmyclient.fakeInterface.IScreen;
-
-public class ScreenCompatImpl extends ScreenCompatApi {
- public static void initCompat() {
- INSTANCE = new ScreenCompatImpl();
- }
-
- @Override
- public Button addButton(Screen screen, Button button) {
- return ((IScreen) screen).addButtonEx(button);
- }
-
- @Override
- public Button createButton(int x, int y, int width, int height, String message, Button.OnPress onPress) {
- return new Button(x, y, width, height, new TextComponent(message), onPress);
- }
-
- @Override
- public void setButtonMessage(Button button, String message) {
- button.setMessage(new TextComponent(message));
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/resources/TweakMyClient-Compat.mixins.json b/tweakmyclient-compat-mc1_19/src/main/resources/TweakMyClient-Compat.mixins.json
deleted file mode 100644
index 04403fb0..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/resources/TweakMyClient-Compat.mixins.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "required": true,
- "package": "top.hendrixshen.tweakmyclient.compat.mixin",
- "plugin": "top.hendrixshen.tweakmyclient.TweakMyClientMixinPlugin",
- "minVersion": "0.8",
- "compatibilityLevel": "JAVA_8",
- "client": [
- ],
- "mixins": [
- "disable.disableRenderBossBar.MixinBossHealthOverlay",
- "disable.disableRenderOverlayPowderSnow.MixinGui",
- "disable.disableRenderOverlayPumpkin.MixinGui",
- "disable.disableSlowdown.MixinEntity",
- "disable.disableSlowdown.MixinSlimeBlock",
- "disable.disableSlowdown.tweakeroo.MixinSlimeBlock",
- "feature.featureAutoReconnect.MixinDisconnectedScreen",
- "feature.featureAutoReconnect.MixinScreen",
- "feature.featureAutoRespawn.MixinDeathScreen",
- "patch.endPortalRendererFix.MixinTheEndPortalBlockEntity",
- "patch.endPortalRendererFix.MixinTheEndPortalRenderer"
- ],
- "injectors": {
- "defaultRequire": 0
- }
-}
diff --git a/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icon.png b/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icon.png
deleted file mode 100644
index ec342689..00000000
Binary files a/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icon.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png b/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png
deleted file mode 100644
index 6a496bd3..00000000
Binary files a/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icons/icon_16x16.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png b/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png
deleted file mode 100644
index 729ecb5d..00000000
Binary files a/tweakmyclient-compat-mc1_19/src/main/resources/assets/tweakmyclient/icons/icon_32x32.png and /dev/null differ
diff --git a/tweakmyclient-compat-mc1_19/src/main/resources/fabric.mod.json b/tweakmyclient-compat-mc1_19/src/main/resources/fabric.mod.json
deleted file mode 100644
index 5b072bb8..00000000
--- a/tweakmyclient-compat-mc1_19/src/main/resources/fabric.mod.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "schemaVersion": 1,
- "id": "tweakmyclient-compat-mc1_19",
- "name": "TweakMyClient Compat",
- "version": "${mod_version}",
- "icon": "assets/tweakmyclient/icon.png",
- "description": "TweakMyClient compat for Minecraft 1.19.x",
- "authors": [
- {
- "name": "Hendrix_Shen",
- "contact": {
- "homepage": "https://github.com/Hendrix-Shen"
- }
- }
- ],
- "contact": {
- "homepage": "https://www.curseforge.com/minecraft/mc-mods/tweakmyclient",
- "issues": "https://github.com/Hendrix-Shen/Tweak-My-Client/issues",
- "sources": "https://github.com/Hendrix-Shen/Tweak-My-Client"
- },
- "license": "GPLv3",
- "environment": "client",
- "entrypoints": {
- "main": [
- "top.hendrixshen.tweakmyclient.TweakMyClientCompat"
- ],
- "modmenu": [
- "top.hendrixshen.tweakmyclient.compat.modmenu.ModMenuApiImpl"
- ]
- },
- "mixins": [
- "TweakMyClient-Compat.mixins.json"
- ],
- "depends": {
- "minecraft": "1.19.x",
- "tweakmyclient": "*"
- },
- "custom": {
- "modmenu:parent": "tweakmyclient",
- "modmenu:clientsideOnly": true,
- "modmenu": {
- "parent": "tweakmyclient"
- }
- }
-}
diff --git a/versions/1.14.4/gradle.properties b/versions/1.14.4/gradle.properties
new file mode 100644
index 00000000..7311e5c8
--- /dev/null
+++ b/versions/1.14.4/gradle.properties
@@ -0,0 +1,8 @@
+# Independent branch configuration
+# Development Environment
+minecraft_version=1.14.4
+minecraft_dependency=1.14.x
+
+# Compatible Libraries
+# Litematica - 0.0.0-dev.20191222.014040
+litematica_version = 2846571
diff --git a/versions/1.15.2/gradle.properties b/versions/1.15.2/gradle.properties
new file mode 100644
index 00000000..711a71af
--- /dev/null
+++ b/versions/1.15.2/gradle.properties
@@ -0,0 +1,8 @@
+# Independent branch configuration
+# Development Environment
+minecraft_version=1.15.2
+minecraft_dependency=1.15.x
+
+# Compatible Libraries
+# Litematica - 0.0.0-dev.20200515.184506
+litematica_version = 2957593
diff --git a/versions/1.16.5/gradle.properties b/versions/1.16.5/gradle.properties
new file mode 100644
index 00000000..026a026f
--- /dev/null
+++ b/versions/1.16.5/gradle.properties
@@ -0,0 +1,8 @@
+# Independent branch configuration
+# Development Environment
+minecraft_version=1.16.5
+minecraft_dependency=1.16.x
+
+# Compatible Libraries
+# Litematica - 0.0.0-dev.20210612.170003
+litematica_version = 3349118
diff --git a/versions/1.17.1/gradle.properties b/versions/1.17.1/gradle.properties
new file mode 100644
index 00000000..ff55cd90
--- /dev/null
+++ b/versions/1.17.1/gradle.properties
@@ -0,0 +1,8 @@
+# Independent branch configuration
+# Development Environment
+minecraft_version=1.17.1
+minecraft_dependency=1.17.x
+
+# Compatible Libraries
+# Litematica - 0.9.0
+litematica_version = 3580241
diff --git a/versions/1.18.2/gradle.properties b/versions/1.18.2/gradle.properties
new file mode 100644
index 00000000..882ae822
--- /dev/null
+++ b/versions/1.18.2/gradle.properties
@@ -0,0 +1,8 @@
+# Independent branch configuration
+# Development Environment
+minecraft_version=1.18.2
+minecraft_dependency=1.18.x
+
+# Compatible Libraries
+# Litematica - 0.11.2
+litematica_version = 3751645
diff --git a/versions/mainProject b/versions/mainProject
new file mode 100644
index 00000000..753029c3
--- /dev/null
+++ b/versions/mainProject
@@ -0,0 +1 @@
+1.18.2
\ No newline at end of file
diff --git a/versions/snapshot/gradle.properties b/versions/snapshot/gradle.properties
new file mode 100644
index 00000000..021c2ad6
--- /dev/null
+++ b/versions/snapshot/gradle.properties
@@ -0,0 +1,15 @@
+# Fabric Properties
+ # check these on https://fabricmc.net/versions.html
+ minecraft_version=22w15a
+ yarn_mappings=22w15a+build.4
+ loader_version=0.13.3
+
+# Fabric Mod Metadata
+ minecraft_dependency = 1.19.x
+
+# Preprocessor
+ # Use the targeting MC release version
+ minecraft_version_number = 11900
+
+# Dependencies
+ # fabric_api_version=0.51.0+1.19