diff --git a/README.md b/README.md index 5c844b3e3..5a7508639 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ [![Purpur Forks](https://img.shields.io/github/forks/pl3xgaming/Purpur?label=forks&logo=github)](https://github.com/pl3xgaming/Purpur/network/members) [![Purpur Watchers](https://img.shields.io/github/watchers/pl3xgaming/Purpur?label=watchers&logo=github)](https://github.com/pl3xgaming/Purpur/watchers) -Purpur is a drop-in replacement for [Paper](https://github.com/PaperMC/Paper) servers designed for configurability, new fun and exciting gameplay features, and high performance built on top of [Tuinity](https://github.com/Spottedleaf/Tuinity) and [Airplane](https://github.com/TECHNOVE/Airplane). +Purpur is a drop-in replacement for [Paper](https://github.com/PaperMC/Paper) servers designed for configurability, new fun and exciting gameplay features, and high performance built on top of [Tuinity](https://github.com/Spottedleaf/Tuinity). @@ -50,7 +50,7 @@ Downloads API endpoints: All patches are licensed under the MIT license, unless otherwise noted in the patch headers. -See [PaperMC/Paper](https://github.com/PaperMC/Paper), [Spottedleaf/Tuinity](https://github.com/Spottedleaf/Tuinity), [TECHNOVE/Airplane](https://github.com/TECHNOVE/Airplane), and [jpenilla/Toothpick](https://github.com/jpenilla/Toothpick) for the license of material used by this project. +See [PaperMC/Paper](https://github.com/PaperMC/Paper), [Spottedleaf/Tuinity](https://github.com/Spottedleaf/Tuinity), and [jpenilla/Toothpick](https://github.com/jpenilla/Toothpick) for the license of material used by this project. ## bStats diff --git a/patches/api/0002-Airplane-API-Changes.patch b/patches/api/0002-Airplane-API-Changes.patch deleted file mode 100644 index 7052870a4..000000000 --- a/patches/api/0002-Airplane-API-Changes.patch +++ /dev/null @@ -1,639 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Paul Sauve -Date: Sat, 19 Dec 2020 19:06:37 -0600 -Subject: [PATCH] Airplane API Changes - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - -diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 81da90531cc3a7ab13d455860f89411081825949..a20d3ae5cc09732e79fa10f9df76b221aa7eab2d 100644 ---- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -@@ -153,6 +153,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot - throw new ClassNotFoundException(name); - } - -+ public Class _airplane_findClass(@NotNull String name) throws ClassNotFoundException { return this.classes.get(name); } // Airplane - @Override - protected Class findClass(String name) throws ClassNotFoundException { - if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) { diff --git a/patches/api/0003-Purpur-config-files.patch b/patches/api/0002-Purpur-config-files.patch similarity index 100% rename from patches/api/0003-Purpur-config-files.patch rename to patches/api/0002-Purpur-config-files.patch diff --git a/patches/api/0004-Default-permissions.patch b/patches/api/0003-Default-permissions.patch similarity index 100% rename from patches/api/0004-Default-permissions.patch rename to patches/api/0003-Default-permissions.patch diff --git a/patches/api/0005-Allow-inventory-resizing.patch b/patches/api/0004-Allow-inventory-resizing.patch similarity index 100% rename from patches/api/0005-Allow-inventory-resizing.patch rename to patches/api/0004-Allow-inventory-resizing.patch diff --git a/patches/api/0006-Advancement-API.patch b/patches/api/0005-Advancement-API.patch similarity index 100% rename from patches/api/0006-Advancement-API.patch rename to patches/api/0005-Advancement-API.patch diff --git a/patches/api/0007-Llama-API.patch b/patches/api/0006-Llama-API.patch similarity index 100% rename from patches/api/0007-Llama-API.patch rename to patches/api/0006-Llama-API.patch diff --git a/patches/api/0008-AFK-API.patch b/patches/api/0007-AFK-API.patch similarity index 100% rename from patches/api/0008-AFK-API.patch rename to patches/api/0007-AFK-API.patch diff --git a/patches/api/0009-Bring-back-server-name.patch b/patches/api/0008-Bring-back-server-name.patch similarity index 100% rename from patches/api/0009-Bring-back-server-name.patch rename to patches/api/0008-Bring-back-server-name.patch diff --git a/patches/api/0010-ExecuteCommandEvent.patch b/patches/api/0009-ExecuteCommandEvent.patch similarity index 100% rename from patches/api/0010-ExecuteCommandEvent.patch rename to patches/api/0009-ExecuteCommandEvent.patch diff --git a/patches/api/0011-LivingEntity-safeFallDistance.patch b/patches/api/0010-LivingEntity-safeFallDistance.patch similarity index 100% rename from patches/api/0011-LivingEntity-safeFallDistance.patch rename to patches/api/0010-LivingEntity-safeFallDistance.patch diff --git a/patches/api/0012-Lagging-threshold.patch b/patches/api/0011-Lagging-threshold.patch similarity index 100% rename from patches/api/0012-Lagging-threshold.patch rename to patches/api/0011-Lagging-threshold.patch diff --git a/patches/api/0013-ItemFactory-getMonsterEgg.patch b/patches/api/0012-ItemFactory-getMonsterEgg.patch similarity index 100% rename from patches/api/0013-ItemFactory-getMonsterEgg.patch rename to patches/api/0012-ItemFactory-getMonsterEgg.patch diff --git a/patches/api/0014-PlayerSetSpawnerTypeWithEggEvent.patch b/patches/api/0013-PlayerSetSpawnerTypeWithEggEvent.patch similarity index 100% rename from patches/api/0014-PlayerSetSpawnerTypeWithEggEvent.patch rename to patches/api/0013-PlayerSetSpawnerTypeWithEggEvent.patch diff --git a/patches/api/0015-EMC-MonsterEggSpawnEvent.patch b/patches/api/0014-EMC-MonsterEggSpawnEvent.patch similarity index 100% rename from patches/api/0015-EMC-MonsterEggSpawnEvent.patch rename to patches/api/0014-EMC-MonsterEggSpawnEvent.patch diff --git a/patches/api/0016-Villager-resetOffers.patch b/patches/api/0015-Villager-resetOffers.patch similarity index 100% rename from patches/api/0016-Villager-resetOffers.patch rename to patches/api/0015-Villager-resetOffers.patch diff --git a/patches/api/0017-Player-invulnerabilities.patch b/patches/api/0016-Player-invulnerabilities.patch similarity index 100% rename from patches/api/0017-Player-invulnerabilities.patch rename to patches/api/0016-Player-invulnerabilities.patch diff --git a/patches/api/0018-Anvil-API.patch b/patches/api/0017-Anvil-API.patch similarity index 100% rename from patches/api/0018-Anvil-API.patch rename to patches/api/0017-Anvil-API.patch diff --git a/patches/api/0019-ItemStack-convenience-methods.patch b/patches/api/0018-ItemStack-convenience-methods.patch similarity index 100% rename from patches/api/0019-ItemStack-convenience-methods.patch rename to patches/api/0018-ItemStack-convenience-methods.patch diff --git a/patches/api/0020-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch b/patches/api/0019-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch similarity index 100% rename from patches/api/0020-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch rename to patches/api/0019-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch diff --git a/patches/api/0021-ChatColor-conveniences.patch b/patches/api/0020-ChatColor-conveniences.patch similarity index 100% rename from patches/api/0021-ChatColor-conveniences.patch rename to patches/api/0020-ChatColor-conveniences.patch diff --git a/patches/api/0022-Ridables.patch b/patches/api/0021-Ridables.patch similarity index 100% rename from patches/api/0022-Ridables.patch rename to patches/api/0021-Ridables.patch diff --git a/patches/api/0023-Configurable-permission-message-upgrades.patch b/patches/api/0022-Configurable-permission-message-upgrades.patch similarity index 100% rename from patches/api/0023-Configurable-permission-message-upgrades.patch rename to patches/api/0022-Configurable-permission-message-upgrades.patch diff --git a/patches/api/0024-LivingEntity-broadcastItemBreak.patch b/patches/api/0023-LivingEntity-broadcastItemBreak.patch similarity index 100% rename from patches/api/0024-LivingEntity-broadcastItemBreak.patch rename to patches/api/0023-LivingEntity-broadcastItemBreak.patch diff --git a/patches/api/0025-Item-entity-immunities.patch b/patches/api/0024-Item-entity-immunities.patch similarity index 100% rename from patches/api/0025-Item-entity-immunities.patch rename to patches/api/0024-Item-entity-immunities.patch diff --git a/patches/api/0026-Spigot-Improve-output-of-plugins-command.patch b/patches/api/0025-Spigot-Improve-output-of-plugins-command.patch similarity index 100% rename from patches/api/0026-Spigot-Improve-output-of-plugins-command.patch rename to patches/api/0025-Spigot-Improve-output-of-plugins-command.patch diff --git a/patches/api/0027-Add-option-to-disable-zombie-aggressiveness-towards-.patch b/patches/api/0026-Add-option-to-disable-zombie-aggressiveness-towards-.patch similarity index 100% rename from patches/api/0027-Add-option-to-disable-zombie-aggressiveness-towards-.patch rename to patches/api/0026-Add-option-to-disable-zombie-aggressiveness-towards-.patch diff --git a/patches/api/0028-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch b/patches/api/0027-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch similarity index 100% rename from patches/api/0028-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch rename to patches/api/0027-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch diff --git a/patches/api/0029-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch b/patches/api/0028-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch similarity index 100% rename from patches/api/0029-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch rename to patches/api/0028-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch diff --git a/patches/api/0030-Left-handed-API.patch b/patches/api/0029-Left-handed-API.patch similarity index 100% rename from patches/api/0030-Left-handed-API.patch rename to patches/api/0029-Left-handed-API.patch diff --git a/patches/api/0031-Alphabetize-in-game-plugins-list.patch b/patches/api/0030-Alphabetize-in-game-plugins-list.patch similarity index 100% rename from patches/api/0031-Alphabetize-in-game-plugins-list.patch rename to patches/api/0030-Alphabetize-in-game-plugins-list.patch diff --git a/patches/api/0032-Rabid-Wolf-API.patch b/patches/api/0031-Rabid-Wolf-API.patch similarity index 100% rename from patches/api/0032-Rabid-Wolf-API.patch rename to patches/api/0031-Rabid-Wolf-API.patch diff --git a/patches/api/0033-Fix-javadoc-warnings-missing-param-and-return.patch b/patches/api/0032-Fix-javadoc-warnings-missing-param-and-return.patch similarity index 100% rename from patches/api/0033-Fix-javadoc-warnings-missing-param-and-return.patch rename to patches/api/0032-Fix-javadoc-warnings-missing-param-and-return.patch diff --git a/patches/api/0034-PlayerBookTooLargeEvent.patch b/patches/api/0033-PlayerBookTooLargeEvent.patch similarity index 100% rename from patches/api/0034-PlayerBookTooLargeEvent.patch rename to patches/api/0033-PlayerBookTooLargeEvent.patch diff --git a/patches/api/0035-Full-netherite-armor-grants-fire-resistance.patch b/patches/api/0034-Full-netherite-armor-grants-fire-resistance.patch similarity index 100% rename from patches/api/0035-Full-netherite-armor-grants-fire-resistance.patch rename to patches/api/0034-Full-netherite-armor-grants-fire-resistance.patch diff --git a/patches/api/0036-Add-EntityTeleportHinderedEvent.patch b/patches/api/0035-Add-EntityTeleportHinderedEvent.patch similarity index 100% rename from patches/api/0036-Add-EntityTeleportHinderedEvent.patch rename to patches/api/0035-Add-EntityTeleportHinderedEvent.patch diff --git a/patches/api/0037-Add-StructureGenerateEvent.patch b/patches/api/0036-Add-StructureGenerateEvent.patch similarity index 100% rename from patches/api/0037-Add-StructureGenerateEvent.patch rename to patches/api/0036-Add-StructureGenerateEvent.patch diff --git a/patches/api/0038-Add-unsafe-Entity-serialization-API.patch b/patches/api/0037-Add-unsafe-Entity-serialization-API.patch similarity index 100% rename from patches/api/0038-Add-unsafe-Entity-serialization-API.patch rename to patches/api/0037-Add-unsafe-Entity-serialization-API.patch diff --git a/patches/api/0039-Conflict-on-change-for-adventure-deprecations.patch b/patches/api/0038-Conflict-on-change-for-adventure-deprecations.patch similarity index 100% rename from patches/api/0039-Conflict-on-change-for-adventure-deprecations.patch rename to patches/api/0038-Conflict-on-change-for-adventure-deprecations.patch diff --git a/patches/api/0040-Add-enchantment-target-for-bows-and-crossbows.patch b/patches/api/0039-Add-enchantment-target-for-bows-and-crossbows.patch similarity index 100% rename from patches/api/0040-Add-enchantment-target-for-bows-and-crossbows.patch rename to patches/api/0039-Add-enchantment-target-for-bows-and-crossbows.patch diff --git a/patches/api/0041-Iron-golem-poppy-calms-anger.patch b/patches/api/0040-Iron-golem-poppy-calms-anger.patch similarity index 100% rename from patches/api/0041-Iron-golem-poppy-calms-anger.patch rename to patches/api/0040-Iron-golem-poppy-calms-anger.patch diff --git a/patches/api/0042-API-for-any-mob-to-burn-daylight.patch b/patches/api/0041-API-for-any-mob-to-burn-daylight.patch similarity index 100% rename from patches/api/0042-API-for-any-mob-to-burn-daylight.patch rename to patches/api/0041-API-for-any-mob-to-burn-daylight.patch diff --git a/patches/server/0002-Airplane-Server-Changes.patch b/patches/server/0002-Airplane-Server-Changes.patch deleted file mode 100644 index dcbf8c041..000000000 --- a/patches/server/0002-Airplane-Server-Changes.patch +++ /dev/null @@ -1,3975 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Paul Sauve -Date: Sat, 31 Oct 2020 19:21:42 -0500 -Subject: [PATCH] Airplane Server Changes - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - -diff --git a/pom.xml b/pom.xml -index 642ee96ead8176f5c5a811946b050f4fa5dab6e2..efa2ea6b8422f900643eb2f0f65cf067c034cea3 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -39,8 +39,8 @@ - - - -- com.tuinity -- tuinity-api -+ gg.airplane -+ airplane-api - ${project.version} - compile - -@@ -193,6 +193,20 @@ - 1.1.0-SNAPSHOT - compile - -+ -+ -+ com.github.technove -+ AIR -+ fe3dbb4420 -+ compile -+ -+ -+ -+ com.github.technove -+ Flare -+ master-SNAPSHOT -+ compile -+ - - - -diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 52c0ab1ce46e1f3233ef746d9bc699356fa9fae4..b480bd3044370b8eb733166f0c4b737344475993 100644 ---- a/src/main/java/com/destroystokyo/paper/Metrics.java -+++ b/src/main/java/com/destroystokyo/paper/Metrics.java -@@ -593,7 +593,7 @@ public class Metrics { - boolean logFailedRequests = config.getBoolean("logFailedRequests", false); - // Only start Metrics, if it's enabled in the config - if (config.getBoolean("enabled", true)) { -- Metrics metrics = new Metrics("Tuinity", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page -+ Metrics metrics = new Metrics("Airplane", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page // Airplane - - metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { - String minecraftVersion = Bukkit.getVersion(); -@@ -603,7 +603,7 @@ public class Metrics { - - metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size())); - metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() || PaperConfig.isProxyOnlineMode() ? "online" : "offline")); -- metrics.addCustomChart(new Metrics.SimplePie("tuinity_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page -+ metrics.addCustomChart(new Metrics.SimplePie("airplane_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page // Airplane - - metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> { - Map> map = new HashMap<>(); -diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index efc1e42d606e1c9feb1a4871c0714933ae92a1b2..14ac28d4d6b1ab0f0a70dfefc589f7723a1d2e1a 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -202,6 +202,15 @@ public class PaperConfig { - public static String timingsServerName; - private static void timings() { - boolean timings = getBoolean("timings.enabled", true); -+ // Airplane start -+ boolean reallyEnableTimings = getBoolean("timings.really-enabled", false); -+ if (timings && !reallyEnableTimings) { -+ Bukkit.getLogger().log(Level.WARNING, "[Airplane] To improve performance, timings have been disabled by default"); -+ Bukkit.getLogger().log(Level.WARNING, "[Airplane] You can still use timings by using /timings on, but they will not start on server startup unless you set timings.really-enabled to true in paper.yml"); -+ Bukkit.getLogger().log(Level.WARNING, "[Airplane] If you would like to disable this message, either set timings.really-enabled to true or timings.enabled to false."); -+ } -+ timings = reallyEnableTimings; -+ // Airplane end - boolean verboseTimings = getBoolean("timings.verbose", true); - TimingsManager.privacy = getBoolean("timings.server-name-privacy", false); - TimingsManager.hiddenConfigs = getList("timings.hidden-config-entries", Lists.newArrayList("database", "settings.bungeecord-addresses", "settings.velocity-support.secret")); -diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java -index d50b61876f15d95b836b3dd81d9c3492c91a8448..5460f57f0473868b3fb09c526a1767f717a2740e 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java -+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java -@@ -29,8 +29,8 @@ public class PaperVersionFetcher implements VersionFetcher { - @Nonnull - @Override - public Component getVersionMessage(@Nonnull String serverVersion) { -- String[] parts = serverVersion.substring("git-Tuinity-".length()).split("[-\\s]"); // Tuinity -- final Component updateMessage = getUpdateStatusMessage("Spottedleaf/Tuinity", GITHUB_BRANCH_NAME, parts[0]); // Tuinity -+ String[] parts = serverVersion.substring("git-Airplane-".length()).split("[-\\s]"); // Tuinity -+ final Component updateMessage = getUpdateStatusMessage("TECHNOVE/Airplane", GITHUB_BRANCH_NAME, parts[0]); // Tuinity - final Component history = getHistory(); - - return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage; -diff --git a/src/main/java/gg/airplane/AirplaneCommand.java b/src/main/java/gg/airplane/AirplaneCommand.java -new file mode 100644 -index 0000000000000000000000000000000000000000..89c89e633f14b5820147e734b1b7ad8cadfdce80 ---- /dev/null -+++ b/src/main/java/gg/airplane/AirplaneCommand.java -@@ -0,0 +1,65 @@ -+package gg.airplane; -+ -+import net.kyori.adventure.text.Component; -+import net.kyori.adventure.text.format.NamedTextColor; -+import net.md_5.bungee.api.ChatColor; -+import net.minecraft.server.MinecraftServer; -+import org.bukkit.Bukkit; -+import org.bukkit.Location; -+import org.bukkit.command.Command; -+import org.bukkit.command.CommandSender; -+ -+import java.io.IOException; -+import java.util.Collections; -+import java.util.List; -+import java.util.stream.Collectors; -+import java.util.stream.Stream; -+ -+public class AirplaneCommand extends Command { -+ -+ public AirplaneCommand() { -+ super("airplane"); -+ this.description = "Airplane related commands"; -+ this.usageMessage = "/airplane [reload | version]"; -+ this.setPermission("bukkit.command.airplane"); -+ } -+ -+ @Override -+ public List tabComplete(CommandSender sender, String alias, String[] args, Location location) throws IllegalArgumentException { -+ if (args.length == 1) { -+ return Stream.of("reload", "version") -+ .filter(arg -> arg.startsWith(args[0].toLowerCase())) -+ .collect(Collectors.toList()); -+ } -+ return Collections.emptyList(); -+ } -+ -+ @Override -+ public boolean execute(CommandSender sender, String commandLabel, String[] args) { -+ if (!testPermission(sender)) return true; -+ String prefix = ChatColor.of("#6a7eda") + "" + ChatColor.BOLD + "Airplane ✈ " + ChatColor.of("#e8ebf9"); -+ -+ if (args.length != 1) { -+ sender.sendMessage(prefix + "Usage: " + usageMessage); -+ args = new String[]{"version"}; -+ } -+ -+ if (args[0].equalsIgnoreCase("reload")) { -+ MinecraftServer console = MinecraftServer.getServer(); -+ try { -+ AirplaneConfig.load(); -+ } catch (IOException e) { -+ sender.sendMessage(Component.text("Failed to reload.", NamedTextColor.RED)); -+ e.printStackTrace(); -+ return true; -+ } -+ console.server.reloadCount++; -+ -+ Command.broadcastCommandMessage(sender, prefix + "Airplane configuration has been reloaded."); -+ } else if (args[0].equalsIgnoreCase("version")) { -+ Command.broadcastCommandMessage(sender, prefix + "This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")"); -+ } -+ -+ return true; -+ } -+} -diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java -new file mode 100644 -index 0000000000000000000000000000000000000000..65adf3ceda012c8cfdea675c40e2bb27d34ebac7 ---- /dev/null -+++ b/src/main/java/gg/airplane/AirplaneConfig.java -@@ -0,0 +1,123 @@ -+package gg.airplane; -+ -+import co.technove.air.AIR; -+import net.minecraft.server.MinecraftServer; -+import org.apache.logging.log4j.Level; -+ -+import java.io.File; -+import java.io.FileInputStream; -+import java.io.FileOutputStream; -+import java.io.IOException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Modifier; -+ -+public class AirplaneConfig { -+ -+ private static AIR config; -+ -+ public static void load() throws IOException { -+ File configFile = new File("airplane.air"); -+ if (configFile.exists()) { -+ try (FileInputStream inputStream = new FileInputStream(configFile)) { -+ config = new AIR(inputStream); -+ } -+ } else { -+ config = new AIR(); -+ } -+ -+ config.setComment("info", -+ "Airplane Configuration", -+ "Read https://blog.airplane.gg/ to find out more about Airplane", -+ "Join our Discord to receive support & optimization help: https://discord.gg/3gtc45q"); -+ config.getString("info.version", "1.0"); -+ -+ for (Method method : AirplaneConfig.class.getDeclaredMethods()) { -+ if (Modifier.isStatic(method.getModifiers()) && Modifier.isPrivate(method.getModifiers())) { -+ method.setAccessible(true); -+ try { -+ method.invoke(null); -+ } catch (Throwable t) { -+ MinecraftServer.LOGGER.log(Level.WARN, "Failed to load configuration option from " + method.getName(), t); -+ } -+ } -+ } -+ -+ try (FileOutputStream outputStream = new FileOutputStream(configFile)) { -+ config.save(outputStream); -+ } -+ } -+ -+ -+ public static int startDistance; -+ public static int startDistanceSquared; -+ public static int maximumActivationPrio; -+ public static int activationDistanceMod; -+ public static boolean dynamicVillagerBehavior; -+ public static boolean dynamicPiglinBehavior; -+ public static boolean dynamicHoglinBehavior; -+ -+ private static void dynamicActivationRange() { -+ config.setComment("activation-range", "Optimizes how entities act when", "they're far away from the player"); -+ -+ startDistance = config.getInt("activation-range.start-distance", 12, -+ "This value determines how far away an entity has to be", -+ "from the player to start being effected by DEAR."); -+ startDistanceSquared = startDistance * startDistance; -+ maximumActivationPrio = config.getInt("activation-range.max-tick-freq", 20, -+ "This value defines how often in ticks, the furthest entity", -+ "will get their pathfinders and behaviors ticked. 20 = 1s"); -+ activationDistanceMod = config.getInt("activation-range.activation-dist-mod", 8, -+ "This value defines how much distance modifies an entity's", -+ "tick frequency. freq = (distanceToPlayer^2) / (2^value)", -+ "If you want further away entities to tick less often, use 7.", -+ "If you want further away entities to tick more often, try 9."); -+ -+ config.setComment("behavior-activation", "A list of entities to use the dynamic activation range", "to modify how often their behaviors are ticked"); -+ -+ dynamicVillagerBehavior = config.getBoolean("behavior-activation.villager", true); -+ dynamicPiglinBehavior = config.getBoolean("behavior-activation.piglin", true); -+ dynamicHoglinBehavior = config.getBoolean("behavior-activation.hoglin", true); -+ } -+ -+ -+ public static String profileWebUrl; -+ -+ private static void profilerOptions() { -+ config.setComment("flare", "Configures Flare, the built-in profiler"); -+ -+ profileWebUrl = config.getString("flare.url", "https://flare.airplane.gg", "Sets the server to use for profiles."); -+ } -+ -+ -+ public static String accessToken; -+ -+ private static void airplaneWebServices() { -+ config.setComment("web-services", "Options for connecting to Airplane's online utilities"); -+ -+ accessToken = config.getString("web-services.token", ""); -+ // todo lookup token (off-thread) and let users know if their token is valid -+ if (accessToken.length() > 0) { -+ gg.airplane.flare.FlareSetup.init(); // Airplane -+ } -+ } -+ -+ -+ public static byte entityDespawnCheckFrequency; -+ -+ private static void entitySettings() { -+ config.setComment("entities", "Configures settings for generic entities"); -+ -+ entityDespawnCheckFrequency = (byte) Math.max(config.getInt("entities.despawn-check-freq", 8), Byte.MAX_VALUE); -+ } -+ -+ -+ public static boolean disableMethodProfiler; -+ -+ private static void miscSettings() { -+ config.setComment("misc", "Settings for things that don't belong elsewhere"); -+ -+ disableMethodProfiler = config.getBoolean("misc.disable-method-profiler", true); -+ } -+ -+ -+} -diff --git a/src/main/java/gg/airplane/AirplaneLogger.java b/src/main/java/gg/airplane/AirplaneLogger.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1a9d71739019d12772bec6076b195552ff6299f9 ---- /dev/null -+++ b/src/main/java/gg/airplane/AirplaneLogger.java -@@ -0,0 +1,17 @@ -+package gg.airplane; -+ -+import org.bukkit.Bukkit; -+ -+import java.util.logging.Level; -+import java.util.logging.Logger; -+ -+public class AirplaneLogger extends Logger { -+ public static final AirplaneLogger LOGGER = new AirplaneLogger(); -+ -+ private AirplaneLogger() { -+ super("Airplane", null); -+ -+ setParent(Bukkit.getLogger()); -+ setLevel(Level.ALL); -+ } -+} -diff --git a/src/main/java/gg/airplane/commands/AirplaneCommands.java b/src/main/java/gg/airplane/commands/AirplaneCommands.java -new file mode 100644 -index 0000000000000000000000000000000000000000..66b20250a26d005427601b1cdee43bdd9eba70cc ---- /dev/null -+++ b/src/main/java/gg/airplane/commands/AirplaneCommands.java -@@ -0,0 +1,12 @@ -+package gg.airplane.commands; -+ -+import gg.airplane.AirplaneCommand; -+import gg.airplane.flare.FlareCommand; -+import net.minecraft.server.MinecraftServer; -+ -+public class AirplaneCommands { -+ public static void init() { -+ MinecraftServer.getServer().server.getCommandMap().register("airplane", "Airplane", new AirplaneCommand()); -+ MinecraftServer.getServer().server.getCommandMap().register("flare", "Airplane", new FlareCommand()); -+ } -+} -diff --git a/src/main/java/gg/airplane/compat/ServerConfigurations.java b/src/main/java/gg/airplane/compat/ServerConfigurations.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f4976428bc721319d2926e97cbe0f64c6e9e503c ---- /dev/null -+++ b/src/main/java/gg/airplane/compat/ServerConfigurations.java -@@ -0,0 +1,77 @@ -+package gg.airplane.compat; -+ -+import co.aikar.timings.TimingsManager; -+import com.google.common.io.Files; -+import org.bukkit.configuration.InvalidConfigurationException; -+import org.bukkit.configuration.file.YamlConfiguration; -+ -+import java.io.ByteArrayOutputStream; -+import java.io.File; -+import java.io.FileInputStream; -+import java.io.IOException; -+import java.nio.charset.StandardCharsets; -+import java.util.Arrays; -+import java.util.List; -+import java.util.Properties; -+import java.util.stream.Collectors; -+ -+public class ServerConfigurations { -+ -+ public static final String[] configurationFiles = new String[]{ -+ "server.properties", -+ "bukkit.yml", -+ "spigot.yml", -+ "paper.yml", -+ "tuinity.yml", -+ "airplane.air" -+ }; -+ -+ public static String getCleanCopy(String configName) throws IOException { -+ File file = new File(configName); -+ List hiddenConfigs = TimingsManager.hiddenConfigs; -+ -+ if (configName.equals("airplane.air")) { -+ return Files.readLines(file, StandardCharsets.UTF_8) -+ .stream() -+ .filter(line -> !line.trim().startsWith("#")) -+ .map(line -> line.contains("token") ? " token = **" : line) -+ .collect(Collectors.joining("\n")); -+ } -+ -+ switch (Files.getFileExtension(configName)) { -+ case "properties": { -+ Properties properties = new Properties(); -+ try (FileInputStream inputStream = new FileInputStream(file)) { -+ properties.load(inputStream); -+ } -+ for (String hiddenConfig : hiddenConfigs) { -+ properties.remove(hiddenConfig); -+ } -+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); -+ properties.store(outputStream, ""); -+ return Arrays.stream(outputStream.toString() -+ .split("\n")) -+ .filter(line -> !line.startsWith("#")) -+ .collect(Collectors.joining("\n")); -+ } -+ case "yml": { -+ YamlConfiguration configuration = new YamlConfiguration(); -+ try { -+ configuration.load(file); -+ } catch (InvalidConfigurationException e) { -+ throw new IOException(e); -+ } -+ configuration.options().header(null); -+ for (String key : configuration.getKeys(true)) { -+ if (hiddenConfigs.contains(key)) { -+ configuration.set(key, null); -+ } -+ } -+ return configuration.saveToString(); -+ } -+ default: -+ throw new IllegalArgumentException("Bad file type " + configName); -+ } -+ } -+ -+} -diff --git a/src/main/java/gg/airplane/flare/FlareCommand.java b/src/main/java/gg/airplane/flare/FlareCommand.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ddc90f1589e683f452c5a74d9d2408803edea029 ---- /dev/null -+++ b/src/main/java/gg/airplane/flare/FlareCommand.java -@@ -0,0 +1,149 @@ -+package gg.airplane.flare; -+ -+import com.google.common.collect.ImmutableList; -+import gg.airplane.AirplaneConfig; -+import gg.airplane.flare.exceptions.UserReportableException; -+import gg.airplane.flare.profiling.AsyncProfilerIntegration; -+import net.kyori.adventure.text.Component; -+import net.kyori.adventure.text.event.ClickEvent; -+import net.kyori.adventure.text.format.NamedTextColor; -+import net.kyori.adventure.text.format.TextColor; -+import net.kyori.adventure.text.format.TextDecoration; -+import org.bukkit.Bukkit; -+import org.bukkit.command.Command; -+import org.bukkit.command.CommandSender; -+import org.bukkit.command.ConsoleCommandSender; -+import org.bukkit.craftbukkit.scheduler.MinecraftInternalPlugin; -+import org.bukkit.util.StringUtil; -+ -+import java.util.ArrayList; -+import java.util.Collections; -+import java.util.List; -+ -+public class FlareCommand extends Command { -+ -+ private static final String BASE_URL = "https://blog.airplane.gg/flare-tutorial/#setting-the-access-token"; -+ private static final TextColor HEX = TextColor.fromHexString("#e3eaea"); -+ private static final Component PREFIX = Component.text() -+ .append(Component.text("Flare ✈") -+ .color(TextColor.fromHexString("#6a7eda")) -+ .decoration(TextDecoration.BOLD, true) -+ .append(Component.text(" ", HEX) -+ .decoration(TextDecoration.BOLD, false))) -+ .asComponent(); -+ -+ public FlareCommand() { -+ super("flare", "Profile your server with Flare", "/flare", Collections.singletonList("profile")); -+ this.setPermission("airplane.flare"); -+ } -+ -+ @Override -+ public boolean execute(CommandSender sender, String commandLabel, String[] args) { -+ if (!testPermission(sender)) return true; -+ if (AirplaneConfig.accessToken.length() == 0) { -+ Component clickable = Component.text(BASE_URL, HEX, TextDecoration.UNDERLINED).clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, BASE_URL)); -+ -+ sender.sendMessage(PREFIX.append(Component.text("Flare currently requires an access token to use. To learn more, visit ").color(HEX).append(clickable))); -+ return true; -+ } -+ -+ if (AsyncProfilerIntegration.doesNotSupportProfiling()) { -+ sender.sendMessage(PREFIX.append( -+ Component.text("Profiling is not supported in this environment, reason: " + AsyncProfilerIntegration.getDisabledReason(), NamedTextColor.RED))); -+ return true; -+ } -+ if (ProfilingManager.isProfiling()) { -+ if (args.length == 1 && args[0].equalsIgnoreCase("status")) { -+ sender.sendMessage(PREFIX.append(Component.text("Status: " + AsyncProfilerIntegration.status(), HEX))); -+ return true; -+ } -+ if (ProfilingManager.stop()) { -+ if (!(sender instanceof ConsoleCommandSender)) { -+ sender.sendMessage(PREFIX.append(Component.text("Profiling has been stopped.", HEX))); -+ } -+ } else { -+ sender.sendMessage(PREFIX.append(Component.text("Profiling has already been stopped.", HEX))); -+ } -+ } else { -+ ProfileType profileType = null; -+ if (args.length > 0) { -+ try { -+ profileType = ProfileType.valueOf(args[0].toUpperCase()); -+ } catch (Exception e) { -+ sender.sendMessage(PREFIX.append(Component -+ .text("Invalid profile type ", HEX) -+ .append(Component.text(args[0], HEX, TextDecoration.BOLD) -+ .append(Component.text("!", HEX))) -+ )); -+ } -+ } -+ int interval = 5; -+ if (args.length > 1) { -+ try { -+ interval = Integer.parseInt(args[1]); -+ } catch (Exception e) { -+ sender.sendMessage(PREFIX.append(Component -+ .text("Invalid time in milliseconds ", HEX) -+ .append(Component.text(args[1], HEX, TextDecoration.BOLD) -+ .append(Component.text("!", HEX))) -+ )); -+ return true; -+ } -+ } -+ int finalInterval = interval; -+ ProfileType finalProfileType = profileType; -+ Bukkit.getScheduler().runTaskAsynchronously(new MinecraftInternalPlugin(), () -> { -+ try { -+ if (ProfilingManager.start(finalProfileType, finalInterval)) { -+ if (!(sender instanceof ConsoleCommandSender)) { -+ sender.sendMessage(PREFIX.append(Component -+ .text("Flare has been started: " + ProfilingManager.getProfilingUrl().get(), HEX) -+ .clickEvent(ClickEvent.openUrl(ProfilingManager.getProfilingUrl().get())) -+ )); -+ sender.sendMessage(PREFIX.append(Component.text(" Run /" + commandLabel + " to stop the Flare.", HEX))); -+ } -+ } else { -+ sender.sendMessage(PREFIX.append(Component -+ .text("Flare has already been started: " + ProfilingManager.getProfilingUrl().get(), HEX) -+ .clickEvent(ClickEvent.openUrl(ProfilingManager.getProfilingUrl().get())) -+ )); -+ } -+ } catch (UserReportableException e) { -+ sender.sendMessage(Component.text("Flare failed to start: " + e.getUserError(), NamedTextColor.RED)); -+ e.printStackTrace(); -+ } -+ }); -+ } -+ return true; -+ } -+ -+ @Override -+ public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { -+ if (AsyncProfilerIntegration.doesNotSupportProfiling()) { -+ return ImmutableList.of(); -+ } -+ -+ List list = new ArrayList<>(); -+ if (AsyncProfilerIntegration.isProfiling()) { -+ if (args.length == 1) { -+ String lastWord = args[0]; -+ if (StringUtil.startsWithIgnoreCase("status", lastWord)) { -+ list.add("status"); -+ } -+ if (StringUtil.startsWithIgnoreCase("stop", lastWord)) { -+ list.add("stop"); -+ } -+ } -+ } else { -+ if (args.length <= 1) { -+ String lastWord = args.length == 0 ? "" : args[0]; -+ for (ProfileType value : ProfileType.values()) { -+ if (StringUtil.startsWithIgnoreCase(value.getInternalName(), lastWord)) { -+ list.add(value.name().toLowerCase()); -+ } -+ } -+ } -+ } -+ return list; -+ } -+} -diff --git a/src/main/java/gg/airplane/flare/FlareSetup.java b/src/main/java/gg/airplane/flare/FlareSetup.java -new file mode 100644 -index 0000000000000000000000000000000000000000..27ac32779e700494aeca8b425edb2871d3ec29cc ---- /dev/null -+++ b/src/main/java/gg/airplane/flare/FlareSetup.java -@@ -0,0 +1,146 @@ -+package gg.airplane.flare; -+ -+import com.google.common.cache.Cache; -+import com.google.common.cache.CacheBuilder; -+import gg.airplane.AirplaneConfig; -+import gg.airplane.AirplaneLogger; -+import gg.airplane.compat.ServerConfigurations; -+import gg.airplane.flare.profiling.AsyncProfilerIntegration; -+import net.minecraft.server.MinecraftServer; -+import org.bukkit.Bukkit; -+import org.bukkit.craftbukkit.scheduler.MinecraftInternalPlugin; -+import org.bukkit.plugin.Plugin; -+import org.bukkit.plugin.java.PluginClassLoader; -+import org.bukkit.scheduler.BukkitTask; -+ -+import java.io.IOException; -+import java.util.HashMap; -+import java.util.LinkedHashMap; -+import java.util.Map; -+import java.util.concurrent.TimeUnit; -+import java.util.logging.Level; -+ -+public class FlareSetup { -+ -+ public static void init() { -+ ServerConnector.connector = new ServerConnector() { -+ -+ private final Cache pluginNameCache = CacheBuilder.newBuilder() -+ .expireAfterAccess(1, TimeUnit.MINUTES) -+ .maximumSize(1024) -+ .build(); -+ -+ @Override -+ public String getPluginForClass(String name) { -+ if (name.contains(".") && name.charAt(0) != '/') { -+ if (name.startsWith("net.minecraft") || name.startsWith("java.") || name.startsWith("com.mojang") || name.startsWith("com.google") || name.startsWith("it.unimi") || name.startsWith("sun")) { -+ return null; -+ } -+ -+ String className = name.substring(0, name.lastIndexOf(".")); -+ String existing = pluginNameCache.getIfPresent(name); -+ if (existing != null) { -+ return existing.isEmpty() ? null : existing; -+ } -+ -+ String newValue = ""; -+ -+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) { -+ ClassLoader classLoader = plugin.getClass().getClassLoader(); -+ if (classLoader instanceof PluginClassLoader) { -+ try { -+ Class aClass = ((PluginClassLoader) classLoader)._airplane_findClass(className); -+ if (aClass != null) { -+ newValue = plugin.getName(); -+ } -+ } catch (ClassNotFoundException | IllegalAccessError e) { -+ } -+ } -+ } -+ -+ pluginNameCache.put(name, newValue); -+ } -+ return null; -+ } -+ -+ @Override -+ public Thread getMainThread() { -+ return MinecraftServer.getServer().serverThread; -+ } -+ -+ @Override -+ public Map getConfigurations() { -+ Map map = new LinkedHashMap<>(); -+ for (String configurationFile : ServerConfigurations.configurationFiles) { -+ try { -+ map.put(configurationFile, ServerConfigurations.getCleanCopy(configurationFile)); -+ } catch (IOException e) { -+ this.log(Level.WARNING, "Failed to load config file " + configurationFile, e); -+ } -+ } -+ return map; -+ } -+ -+ @Override -+ public void log(Level level, String s) { -+ AirplaneLogger.LOGGER.log(level, s); -+ } -+ -+ @Override -+ public void log(Level level, String s, Throwable throwable) { -+ AirplaneLogger.LOGGER.log(level, s, throwable); -+ } -+ -+ @Override -+ public String getPrimaryVersion() { -+ return Bukkit.getVersion(); -+ } -+ -+ @Override -+ public String getApiVersion() { -+ return "bukkit:" + Bukkit.getBukkitVersion(); -+ } -+ -+ @Override -+ public String getMcVersion() { -+ return Bukkit.getMinecraftVersion(); -+ } -+ -+ private final Map scheduledRunnables = new HashMap<>(); -+ -+ @Override -+ public void schedule(Runnable runnable, long l, long l1) { -+ BukkitTask task = Bukkit.getScheduler().runTaskTimer(new MinecraftInternalPlugin(), runnable, l, l1); -+ this.scheduledRunnables.put(runnable, task); -+ } -+ -+ @Override -+ public void scheduleAsync(Runnable runnable, long l, long l1) { -+ BukkitTask task = Bukkit.getScheduler().runTaskTimerAsynchronously(new MinecraftInternalPlugin(), runnable, l, l1); -+ this.scheduledRunnables.put(runnable, task); -+ } -+ -+ @Override -+ public void cancel(Runnable runnable) { -+ this.scheduledRunnables.get(runnable).cancel(); -+ } -+ -+ @Override -+ public void runAsync(Runnable runnable) { -+ Bukkit.getScheduler().runTaskAsynchronously(new MinecraftInternalPlugin(), runnable); -+ } -+ -+ @Override -+ public String getWebUrl() { -+ return AirplaneConfig.profileWebUrl; -+ } -+ -+ @Override -+ public String getToken() { -+ return AirplaneConfig.accessToken; -+ } -+ }; -+ AsyncProfilerIntegration.init(); -+ } -+ -+} -diff --git a/src/main/java/gg/airplane/flare/ProfilingManager.java b/src/main/java/gg/airplane/flare/ProfilingManager.java -new file mode 100644 -index 0000000000000000000000000000000000000000..86d6650d174a7794a7ebe793cad033b42215c321 ---- /dev/null -+++ b/src/main/java/gg/airplane/flare/ProfilingManager.java -@@ -0,0 +1,65 @@ -+package gg.airplane.flare; -+ -+import gg.airplane.AirplaneConfig; -+import gg.airplane.AirplaneLogger; -+import gg.airplane.flare.exceptions.UserReportableException; -+import gg.airplane.flare.profiling.ProfileController; -+import org.bukkit.Bukkit; -+import org.bukkit.craftbukkit.scheduler.MinecraftInternalPlugin; -+import org.bukkit.scheduler.BukkitTask; -+ -+import javax.annotation.Nullable; -+import java.util.Optional; -+import java.util.logging.Level; -+ -+public class ProfilingManager { -+ -+ private static ProfileController currentController; -+ private static BukkitTask currentTask = null; -+ -+ public static synchronized boolean isProfiling() { -+ return currentController != null; -+ } -+ -+ public static synchronized Optional getProfilingUrl() { -+ if (!isProfiling()) { -+ return Optional.empty(); -+ } -+ return Optional.of(AirplaneConfig.profileWebUrl + "/" + currentController.getId()); -+ } -+ -+ public static synchronized boolean start(@Nullable ProfileType type, int interval) throws UserReportableException { -+ if (isProfiling()) { -+ return false; -+ } -+ if (Bukkit.isPrimaryThread()) { -+ throw new UserReportableException("Profiles should be started off-thread"); -+ } -+ currentController = new ProfileController(type, Math.max(interval, 1)); // don't allow lower than 20ms: https://bugzilla.redhat.com/show_bug.cgi?id=645528 -+ currentTask = Bukkit.getScheduler().runTaskLater(new MinecraftInternalPlugin(), ProfilingManager::stop, 20 * 60 * 15); -+ AirplaneLogger.LOGGER.log(Level.INFO, "Flare has been started: " + getProfilingUrl().orElse("An error occurred retrieving the Flare URL.")); -+ return true; -+ } -+ -+ public static synchronized boolean stop() { -+ if (!isProfiling()) { -+ return false; -+ } -+ AirplaneLogger.LOGGER.log(Level.INFO, "Flare has been stopped: " + getProfilingUrl().orElse("An error occurred retrieving the Flare URL.")); -+ try { -+ currentController.cancel(); -+ } catch (Throwable t) { -+ AirplaneLogger.LOGGER.log(Level.WARNING, "Error occurred stopping Flare", t); -+ } -+ currentController = null; -+ -+ try { -+ currentTask.cancel(); -+ } catch (Throwable t) { -+ AirplaneLogger.LOGGER.log(Level.WARNING, "Error occurred stopping Flare", t); -+ } -+ currentTask = null; -+ return true; -+ } -+ -+} -diff --git a/src/main/java/gg/airplane/structs/FluidDirectionCache.java b/src/main/java/gg/airplane/structs/FluidDirectionCache.java -new file mode 100644 -index 0000000000000000000000000000000000000000..aa8467b9dda1f7707e41f50ac7b3e9d7343723ec ---- /dev/null -+++ b/src/main/java/gg/airplane/structs/FluidDirectionCache.java -@@ -0,0 +1,136 @@ -+package gg.airplane.structs; -+ -+import it.unimi.dsi.fastutil.HashCommon; -+ -+/** -+ * This is a replacement for the cache used in FluidTypeFlowing. -+ * The requirements for the previous cache were: -+ * - Store 200 entries -+ * - Look for the flag in the cache -+ * - If it exists, move to front of cache -+ * - If it doesn't exist, remove last entry in cache and insert in front -+ * -+ * This class accomplishes something similar, however has a few different -+ * requirements put into place to make this more optimize: -+ * -+ * - maxDistance is the most amount of entries to be checked, instead -+ * of having to check the entire list. -+ * - In combination with that, entries are all tracked by age and how -+ * frequently they're used. This enables us to remove old entries, -+ * without constantly shifting any around. -+ * -+ * Usage of the previous map would have to reset the head every single usage, -+ * shifting the entire map. Here, nothing happens except an increment when -+ * the cache is hit, and when it needs to replace an old element only a single -+ * element is modified. -+ */ -+public class FluidDirectionCache { -+ -+ private static class FluidDirectionEntry { -+ private final T data; -+ private final boolean flag; -+ private int uses = 0; -+ private int age = 0; -+ -+ private FluidDirectionEntry(T data, boolean flag) { -+ this.data = data; -+ this.flag = flag; -+ } -+ -+ public int getValue() { -+ return this.uses - (this.age >> 1); // age isn't as important as uses -+ } -+ -+ public void incrementUses() { -+ this.uses = this.uses + 1 & Integer.MAX_VALUE; -+ } -+ -+ public void incrementAge() { -+ this.age = this.age + 1 & Integer.MAX_VALUE; -+ } -+ } -+ -+ private final FluidDirectionEntry[] entries; -+ private final int mask; -+ private final int maxDistance; // the most amount of entries to check for a value -+ -+ public FluidDirectionCache(int size) { -+ int arraySize = HashCommon.nextPowerOfTwo(size); -+ this.entries = new FluidDirectionEntry[arraySize]; -+ this.mask = arraySize - 1; -+ this.maxDistance = Math.min(arraySize, 4); -+ } -+ -+ public Boolean getValue(T data) { -+ FluidDirectionEntry curr; -+ int pos; -+ -+ if ((curr = this.entries[pos = HashCommon.mix(data.hashCode()) & this.mask]) == null) { -+ return null; -+ } else if (data.equals(curr.data)) { -+ curr.incrementUses(); -+ return curr.flag; -+ } -+ -+ int checked = 1; // start at 1 because we already checked the first spot above -+ -+ while ((curr = this.entries[pos = (pos + 1) & this.mask]) != null) { -+ if (data.equals(curr.data)) { -+ curr.incrementUses(); -+ return curr.flag; -+ } else if (++checked >= this.maxDistance) { -+ break; -+ } -+ } -+ -+ return null; -+ } -+ -+ public void putValue(T data, boolean flag) { -+ FluidDirectionEntry curr; -+ int pos; -+ -+ if ((curr = this.entries[pos = HashCommon.mix(data.hashCode()) & this.mask]) == null) { -+ this.entries[pos] = new FluidDirectionEntry<>(data, flag); // add -+ return; -+ } else if (data.equals(curr.data)) { -+ curr.incrementUses(); -+ return; -+ } -+ -+ int checked = 1; // start at 1 because we already checked the first spot above -+ -+ while ((curr = this.entries[pos = (pos + 1) & this.mask]) != null) { -+ if (data.equals(curr.data)) { -+ curr.incrementUses(); -+ return; -+ } else if (++checked >= this.maxDistance) { -+ this.forceAdd(data, flag); -+ return; -+ } -+ } -+ -+ this.entries[pos] = new FluidDirectionEntry<>(data, flag); // add -+ } -+ -+ private void forceAdd(T data, boolean flag) { -+ int expectedPos = HashCommon.mix(data.hashCode()) & this.mask; -+ -+ int toRemovePos = expectedPos; -+ FluidDirectionEntry entryToRemove = this.entries[toRemovePos]; -+ -+ for (int i = expectedPos + 1; i < expectedPos + this.maxDistance; i++) { -+ int pos = i & this.mask; -+ FluidDirectionEntry entry = this.entries[pos]; -+ if (entry.getValue() < entryToRemove.getValue()) { -+ toRemovePos = pos; -+ entryToRemove = entry; -+ } -+ -+ entry.incrementAge(); // use this as a mechanism to age the other entries -+ } -+ -+ // remove the least used/oldest entry -+ this.entries[toRemovePos] = new FluidDirectionEntry(data, flag); -+ } -+} -diff --git a/src/main/java/gg/airplane/structs/ItemListWithBitset.java b/src/main/java/gg/airplane/structs/ItemListWithBitset.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7103aa120d3a27d5579d54bd6f4018dc20cca95c ---- /dev/null -+++ b/src/main/java/gg/airplane/structs/ItemListWithBitset.java -@@ -0,0 +1,105 @@ -+package gg.airplane.structs; -+ -+import net.minecraft.core.NonNullList; -+import net.minecraft.world.item.ItemStack; -+import org.apache.commons.lang.Validate; -+import org.jetbrains.annotations.NotNull; -+ -+import java.util.Arrays; -+ -+public class ItemListWithBitset extends NonNullList { -+ public static ItemListWithBitset fromNonNullList(NonNullList list) { -+ if (list instanceof ItemListWithBitset) { -+ return (ItemListWithBitset) list; -+ } -+ return new ItemListWithBitset(list); -+ } -+ -+ private static ItemStack[] createArray(int size) { -+ ItemStack[] array = new ItemStack[size]; -+ Arrays.fill(array, ItemStack.NULL_ITEM); -+ return array; -+ } -+ -+ private final ItemStack[] items; -+ -+ private long bitSet = 0; -+ private final long allBits; -+ -+ private ItemListWithBitset(NonNullList list) { -+ this(list.size()); -+ -+ for (int i = 0; i < list.size(); i++) { -+ this.set(i, list.get(i)); -+ } -+ } -+ -+ public ItemListWithBitset(int size) { -+ super(null, ItemStack.NULL_ITEM); -+ -+ Validate.isTrue(size < Long.BYTES * 8, "size is too large"); -+ -+ this.items = createArray(size); -+ this.allBits = ((1L << size) - 1); -+ } -+ -+ public boolean isCompletelyEmpty() { -+ return this.bitSet == 0; -+ } -+ -+ public boolean hasFullStacks() { -+ return (this.bitSet & this.allBits) == allBits; -+ } -+ -+ @Override -+ public ItemStack set(int index, ItemStack itemStack) { -+ ItemStack existing = this.items[index]; -+ -+ this.items[index] = itemStack; -+ -+ if (itemStack == ItemStack.NULL_ITEM) { -+ this.bitSet &= ~(1L << index); -+ } else { -+ this.bitSet |= 1L << index; -+ } -+ -+ return existing; -+ } -+ -+ @NotNull -+ @Override -+ public ItemStack get(int var0) { -+ return this.items[var0]; -+ } -+ -+ @Override -+ public int size() { -+ return this.items.length; -+ } -+ -+ @Override -+ public void clear() { -+ Arrays.fill(this.items, ItemStack.NULL_ITEM); -+ } -+ -+ // these are unsupported for block inventories which have a static size -+ @Override -+ public void add(int var0, ItemStack var1) { -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public ItemStack remove(int var0) { -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public String toString() { -+ return "ItemListWithBitset{" + -+ "items=" + Arrays.toString(items) + -+ ", bitSet=" + Long.toString(bitSet, 2) + -+ ", allBits=" + Long.toString(allBits, 2) + -+ ", size=" + this.items.length + -+ '}'; -+ } -+} -diff --git a/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java b/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java -new file mode 100644 -index 0000000000000000000000000000000000000000..36eea0acd815e08e0be10bf55541ea0bb605b8f5 ---- /dev/null -+++ b/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java -@@ -0,0 +1,35 @@ -+package gg.airplane.structs; -+ -+import java.util.AbstractSet; -+import java.util.ArrayList; -+import java.util.Iterator; -+import java.util.List; -+ -+/* -+ * Used when you want fast iteration more than fast contain/remove -+ */ -+public class LinkedHashSetArrayList extends AbstractSet { -+ private final List internal = new ArrayList<>(); -+ -+ @Override -+ public boolean add(E e) { -+ if (this.internal.contains(e)) { -+ return false; -+ } -+ return this.internal.add(e); -+ } -+ -+ @Override -+ public Iterator iterator() { -+ return this.internal.iterator(); -+ } -+ -+ public E get(int index) { -+ return this.internal.get(index); -+ } -+ -+ @Override -+ public int size() { -+ return this.internal.size(); -+ } -+} -diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java -index 6a6381e85fef2ae2b9b5e6dff0b7917b92fa01e5..2685a395a2eff9083cd8c654c4b7e2141b0ca99b 100644 ---- a/src/main/java/net/minecraft/core/BlockPosition.java -+++ b/src/main/java/net/minecraft/core/BlockPosition.java -@@ -438,12 +438,26 @@ public class BlockPosition extends BaseBlockPosition { - public BlockPosition b(int i, int j, int k) { - return super.b(i, j, k).immutableCopy(); - } -+ // Airplane start - version of b that doesn't copy -+ public BlockPosition addValues(int x, int y, int z) { -+ ((BaseBlockPosition)this).a += x; -+ ((BaseBlockPosition)this).b += y; -+ ((BaseBlockPosition)this).e += z; -+ return this; -+ } -+ // Airplane end - - @Override - public BlockPosition shift(EnumDirection enumdirection, int i) { - return super.shift(enumdirection, i).immutableCopy(); - } - -+ // Airplane start - mutable shift method -+ public MutableBlockPosition mutableShift(EnumDirection enumdirection, int i) { -+ return this.setValues(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i); -+ } -+ // Airplane end -+ - @Override - public BlockPosition a(EnumDirection.EnumAxis enumdirection_enumaxis, int i) { - return super.a(enumdirection_enumaxis, i).immutableCopy(); -diff --git a/src/main/java/net/minecraft/core/EnumDirection.java b/src/main/java/net/minecraft/core/EnumDirection.java -index 7918d830a4aef09c9f517284e83a9376299116ad..0a40df2151bd388b6633a6f50b14f1f41ed4ce62 100644 ---- a/src/main/java/net/minecraft/core/EnumDirection.java -+++ b/src/main/java/net/minecraft/core/EnumDirection.java -@@ -30,7 +30,7 @@ public enum EnumDirection implements INamable { - private final EnumDirection.EnumAxis k; - private final EnumDirection.EnumAxisDirection l; - private final BaseBlockPosition m; -- private static final EnumDirection[] n = values(); -+ private static final EnumDirection[] n = values(); public static EnumDirection[] getValues() { return n; } // Airplane - getter - private static final Map o = (Map) Arrays.stream(EnumDirection.n).collect(Collectors.toMap(EnumDirection::m, (enumdirection) -> { - return enumdirection; - })); -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6f90a4182e008b49a4b3328e569311382e4bec0d..26f423d3fdc958764758573043310f84da08a08e 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1650,7 +1650,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant // Spigot - Spigot > // CraftBukkit - cb > vanilla! -+ return "Airplane"; // Airplane // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! - } - - public CrashReport b(CrashReport crashreport) { -@@ -2200,7 +2200,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant iterator = this.entityTickingChunks.iterator(); -+ // Airplane start - use raw iterator -+ //com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator iterator = this.entityTickingChunks.iterator(); -+ int iterator = this.entityTickingChunks.createRawIterator(); - try { -- while (iterator.hasNext()) { -- Chunk chunk = iterator.next(); -+ while (iterator != -1) { -+ Chunk chunk = this.entityTickingChunks.rawGet(iterator); - PlayerChunk playerchunk = chunk.playerChunk; - if (playerchunk != null) { // make sure load event has been called along with the load logic we put there - // Tuinity end - optimise chunk tick iteration -@@ -1063,10 +1066,12 @@ public class ChunkProviderServer extends IChunkProvider { - } - } - } -+ iterator = this.entityTickingChunks.advanceRawIterator(iterator); - } // Tuinity start - optimise chunk tick iteration - } finally { -- iterator.finishedIterating(); -+ this.entityTickingChunks.finishRawIterator(); - } -+ // Airplane end - // Tuinity end - optimise chunk tick iteration - this.world.getMethodProfiler().enter("customSpawners"); - if (flag1) { -diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java -index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..6aad662d823e0a64b8e18156b5f084399bc4f228 100644 ---- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java -+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java -@@ -186,6 +186,7 @@ public class EntityTrackerEntry { - boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L; - - if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.isOnGround() && !(com.tuinity.tuinity.config.TuinityConfig.sendFullPosForHardCollidingEntities && this.tracker.hardCollides())) { // Tuinity - send full pos for hard colliding entities to prevent collision problems due to desync -+ if (flag2 || flag3 || this.tracker instanceof EntityArrow) { // Airplane - if ((!flag2 || !flag3) && !(this.tracker instanceof EntityArrow)) { - if (flag2) { - packet1 = new PacketPlayOutEntity.PacketPlayOutRelEntityMove(this.tracker.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.tracker.isOnGround()); -@@ -195,6 +196,7 @@ public class EntityTrackerEntry { - } else { - packet1 = new PacketPlayOutEntity.PacketPlayOutRelEntityMoveLook(this.tracker.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.tracker.isOnGround()); - } -+ } // Airplane - } else { - this.r = this.tracker.isOnGround(); - this.o = 0; -diff --git a/src/main/java/net/minecraft/server/level/PlayerChunk.java b/src/main/java/net/minecraft/server/level/PlayerChunk.java -index 86f156587a0939b28c5cf6f64907255c1c4f8b35..06157bb07cce3ba24087ceaca7138b5609b37b5b 100644 ---- a/src/main/java/net/minecraft/server/level/PlayerChunk.java -+++ b/src/main/java/net/minecraft/server/level/PlayerChunk.java -@@ -58,6 +58,7 @@ public class PlayerChunk { - private int ticketLevel; public final void setTicketLevel(final int level) { this.ticketLevel = level; } // Tuinity - OBFHELPER - volatile int n; public final int getCurrentPriority() { return n; } // Paper - OBFHELPER - make volatile since this is concurrently accessed - public final ChunkCoordIntPair location; // Paper - private -> public -+ private final long coordinateKey; // Airplane - cache key for location - private boolean p; - private final ShortSet[] dirtyBlocks; - private int r; -@@ -80,7 +81,7 @@ public class PlayerChunk { - com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet playersInChunkTickRange; - - void updateRanges() { -- long key = net.minecraft.server.MCUtil.getCoordinateKey(this.location); -+ long key = this.coordinateKey; //net.minecraft.server.MCUtil.getCoordinateKey(this.location); // Airplane - use cached key - this.playersInMobSpawnRange = this.chunkMap.playerMobSpawnMap.getObjectsInRange(key); - this.playersInChunkTickRange = this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(key); - // Tuinity start - optimise checkDespawn -@@ -232,7 +233,7 @@ public class PlayerChunk { - this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; - this.chunkSave = CompletableFuture.completedFuture(null); // CraftBukkit - decompile error - this.dirtyBlocks = new ShortSet[16]; -- this.location = chunkcoordintpair; -+ this.location = chunkcoordintpair; this.coordinateKey = net.minecraft.server.MCUtil.getCoordinateKey(this.location); // Airplane - this.lightEngine = lightengine; - this.u = playerchunk_c; - this.players = playerchunk_d; -diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 4df1be8091af0ed9d3403f217b481645e24020e8..78e752a629bab777b45cf62e4c1aaf9efa40918a 100644 ---- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -@@ -705,7 +705,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - return d2 * d2 + d3 * d3; - } - -- private static int b(ChunkCoordIntPair chunkcoordintpair, EntityPlayer entityplayer, boolean flag) { -+ // Airplane start - create copy that accepts x/z instead of allocating pair -+ private static int b(ChunkCoordIntPair chunkcoordintpair, EntityPlayer entityplayer, boolean flag) { return someDistanceCalculation(chunkcoordintpair.x, chunkcoordintpair.z, entityplayer, flag); } -+ private static int someDistanceCalculation(int x, int z, EntityPlayer entityplayer, boolean flag) { - int i; - int j; - -@@ -719,12 +721,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - j = MathHelper.floor(entityplayer.locZ() / 16.0D); - } - -- return a(chunkcoordintpair, i, j); -+ return someOtherDistanceCalculation(x, z, i, j); -+ // Airplane end - } - -- private static int a(ChunkCoordIntPair chunkcoordintpair, int i, int j) { -- int k = chunkcoordintpair.x - i; -- int l = chunkcoordintpair.z - j; -+ // Airplane start - create copy that accepts x/z instead of allocating pair -+ private static int a(ChunkCoordIntPair chunkcoordintpair, int i, int j) { return someOtherDistanceCalculation(chunkcoordintpair.x, chunkcoordintpair.z, i, j); } -+ private static int someOtherDistanceCalculation(int x, int z, int i, int j) { -+ int k = x - i; -+ int l = z - j; -+ // Airplane end - - return Math.max(Math.abs(k), Math.abs(l)); - } -@@ -2546,11 +2552,17 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially - boolean flag1 = this.tracker.attachedToPlayer; - - if (!flag1) { -+ // Airplane start - use int/longs instead of ChunkCoordIntPair -+ /* - ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ); -- PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair()); -+ */ -+ int x = this.tracker.chunkX, z = this.tracker.chunkZ; -+ long chunkcoordintpair = ChunkCoordIntPair.pair(x, z); -+ PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair); - - if (playerchunk != null && playerchunk.getSendingChunk() != null && PlayerChunkMap.this.playerChunkManager.isChunkSent(entityplayer, MathHelper.floor(this.tracker.locX()) >> 4, MathHelper.floor(this.tracker.locZ()) >> 4)) { // Paper - no-tick view distance // Tuinity - don't broadcast in chunks the player hasn't received -- flag1 = PlayerChunkMap.b(chunkcoordintpair, entityplayer, false) <= PlayerChunkMap.this.viewDistance; -+ flag1 = PlayerChunkMap.someDistanceCalculation(x, z, entityplayer, false) <= PlayerChunkMap.this.viewDistance; -+ // Airplane end - } - } - -@@ -2580,8 +2592,10 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially - } - - private int b() { -+ // Airplane start -+ int i = this.trackingDistance; // move out of if statement -+ if (!this.tracker.passengers.isEmpty()) { - Collection collection = this.tracker.getAllPassengers(); -- int i = this.trackingDistance; - Iterator iterator = collection.iterator(); - - while (iterator.hasNext()) { -@@ -2593,6 +2607,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially - i = j; - } - } -+ } -+ // Airplane end - - return this.a(i); - } -diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 6fc215df5ed3aa6ef0c23a57e8444602ff9309e8..1553be4263f08ae21447ccf2e19e8a30a2932208 100644 ---- a/src/main/java/net/minecraft/server/level/WorldServer.java -+++ b/src/main/java/net/minecraft/server/level/WorldServer.java -@@ -846,6 +846,22 @@ public class WorldServer extends World implements GeneratorAccessSeed { - return result; - } - -+ // Airplane start - skip type lookup if already completed, but still run check -+ public TileEntity getAndCheckTileEntity(IBlockData data, BlockPosition pos) { -+ TileEntity result = super.getTileEntity(pos, false); -+ Block type = data.getBlock(); -+ -+ // copied from above -+ if (result != null && type != Blocks.AIR) { -+ if (!result.getTileType().isValidBlock(type)) { -+ result = fixTileEntity(pos, type, result); -+ } -+ } -+ -+ return result; -+ } -+ // Airplane end -+ - private TileEntity fixTileEntity(BlockPosition pos, Block type, TileEntity found) { - this.getServer().getLogger().log(Level.SEVERE, "Block at {0}, {1}, {2} is {3} but has {4}" + ". " - + "Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.", new Object[]{pos.getX(), pos.getY(), pos.getZ(), type, found}); -@@ -1107,7 +1123,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { - - gameprofilerfiller.enter("tick"); - if (!entity.dead && !(entity instanceof EntityComplexPart)) { -+ // Airplane start - inline this.a to prevent creation of lambda -+ /* - this.a(this::entityJoinedWorld, entity); -+ */ -+ boolean doMidTick = false; // usually there's a returns in the catch, so treat it like that -+ try { -+ this.entityJoinedWorld(entity); -+ doMidTick = true; -+ } catch (Throwable throwable) { -+ if (throwable instanceof ThreadDeath) throw throwable; // Paper -+ // Paper start - Prevent tile entity and entity crashes -+ String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ(); -+ System.err.println(msg); -+ throwable.printStackTrace(); -+ getServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable))); -+ entity.dead = true; -+ // Paper end -+ } -+ if (doMidTick) { -+ MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick -+ } -+ // Airplane end - } - - gameprofilerfiller.exit(); -@@ -1202,6 +1239,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { - private final BiomeBase[] biomeBaseCache = new BiomeBase[1]; - // Tuinity end - optimise chunk ice snow ticking - -+ private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // Airplane -+ - public void a(Chunk chunk, int i) { final int randomTickSpeed = i; // Paper - ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); - boolean flag = this.isRaining(); -@@ -1212,7 +1251,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { - gameprofilerfiller.enter("thunder"); - final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change - -- if (!this.paperConfig.disableThunder && flag && this.W() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder -+ if (!this.paperConfig.disableThunder && flag && chunk.shouldDoLightning(this.random) && this.W()) { // Paper - Disable thunder // Airplane - check this.W last // Airplane - replace random with shouldDoLighting - blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper - if (this.isRainingAt(blockposition)) { - DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); -@@ -1236,7 +1275,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { - } - - gameprofilerfiller.exitEnter("iceandsnow"); -- if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking -+ if (!this.paperConfig.disableIceAndSnow && (this.currentIceAndSnowTick++ & 15) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking // Airplane - optimize further random ticking - // Paper start - optimise chunk ticking - // Tuinity start - optimise chunk ice snow ticking - BiomeBase[] biomeCache = this.biomeBaseCache; -@@ -1449,9 +1488,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { - ++entity.ticksLived; - GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); - -+ // Airplane start - create debug lambda once, todo do we even WANT the method profiler? -+ /* - gameprofilerfiller.a(() -> { - return IRegistry.ENTITY_TYPE.getKey(entity.getEntityType()).toString(); - }); -+ */ -+ gameprofilerfiller.a(entity.getEntityType().getEntityName); -+ // Airplane end - gameprofilerfiller.c("tickNonPassenger"); - if (isActive) { // Paper - EAR 2 - TimingHistory.activatedEntityTicks++; // Paper -diff --git a/src/main/java/net/minecraft/util/MathHelper.java b/src/main/java/net/minecraft/util/MathHelper.java -index cc566784c7dd21cc2c44e0f351347f657e57ddcf..e9e7fcf2b63febe2a7d055826fabb86bc13a5cf3 100644 ---- a/src/main/java/net/minecraft/util/MathHelper.java -+++ b/src/main/java/net/minecraft/util/MathHelper.java -@@ -240,6 +240,7 @@ public class MathHelper { - return f - (float) d(f); - } - -+ public static double getDecimals(double num) { return h(num); } // Airplane - public static double h(double d0) { - return d0 - (double) d(d0); - } -@@ -418,6 +419,7 @@ public class MathHelper { - return f1 + f * (f2 - f1); - } - -+ public static double linearInterpolation(double value1, double value2, double amount) { return d(value1, value2, amount); } // Airplane - OBFHELPER - public static double d(double d0, double d1, double d2) { - return d1 + d0 * (d2 - d1); - } -@@ -434,6 +436,7 @@ public class MathHelper { - return d0 * d0 * d0 * (d0 * (d0 * 6.0D - 15.0D) + 10.0D); - } - -+ public static int sign(double num) { return k(num); } // Airplane - OBFHELPER - public static int k(double d0) { - return d0 == 0.0D ? 0 : (d0 > 0.0D ? 1 : -1); - } -diff --git a/src/main/java/net/minecraft/world/IInventory.java b/src/main/java/net/minecraft/world/IInventory.java -index 774ba6a923f7e329f6af5efc17e1c46e87ed2d77..8faf3850f4c965feec42f6998563b7265a8f599e 100644 ---- a/src/main/java/net/minecraft/world/IInventory.java -+++ b/src/main/java/net/minecraft/world/IInventory.java -@@ -1,6 +1,8 @@ - package net.minecraft.world; - - import java.util.Set; -+ -+import net.minecraft.core.EnumDirection; // Airplane - import net.minecraft.world.entity.player.EntityHuman; - import net.minecraft.world.item.Item; - import net.minecraft.world.item.ItemStack; -@@ -18,6 +20,70 @@ public interface IInventory extends Clearable { - - ItemStack getItem(int i); - -+ // Airplane start - allow the inventory to override and optimize these frequent calls -+ default boolean hasEmptySlot(EnumDirection enumdirection) { // there is a slot with 0 items in it -+ if (this instanceof IWorldInventory) { -+ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) { -+ if (this.getHopperItem(i).isEmpty()) { -+ return true; -+ } -+ } -+ } else { -+ int size = this.getSize(); -+ for (int i = 0; i < size; i++) { -+ if (this.getHopperItem(i).isEmpty()) { -+ return true; -+ } -+ } -+ } -+ return false; -+ } -+ -+ default boolean isCompletelyFull(EnumDirection enumdirection) { // every stack is maxed -+ if (this instanceof IWorldInventory) { -+ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) { -+ ItemStack itemStack = this.getHopperItem(i); -+ if (itemStack.getCount() < itemStack.getMaxStackSize()) { -+ return false; -+ } -+ } -+ } else { -+ int size = this.getSize(); -+ for (int i = 0; i < size; i++) { -+ ItemStack itemStack = this.getHopperItem(i); -+ if (itemStack.getCount() < itemStack.getMaxStackSize()) { -+ return false; -+ } -+ } -+ } -+ return true; -+ } -+ -+ default boolean isCompletelyEmpty(EnumDirection enumdirection) { -+ if (this instanceof IWorldInventory) { -+ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) { -+ if (!this.getHopperItem(i).isEmpty()) { -+ return false; -+ } -+ } -+ } else { -+ int size = this.getSize(); -+ for (int i = 0; i < size; i++) { -+ if (!this.getHopperItem(i).isEmpty()) { -+ return false; -+ } -+ } -+ } -+ return true; -+ } -+ // Airplane end -+ -+ // Airplane start - way for inventories to know it's a hopper, skipping certain steps -+ default ItemStack getHopperItem(int index) { -+ return this.getItem(index); -+ } -+ // Airplane end -+ - ItemStack splitStack(int i, int j); - - ItemStack splitWithoutUpdate(int i); -diff --git a/src/main/java/net/minecraft/world/InventoryLargeChest.java b/src/main/java/net/minecraft/world/InventoryLargeChest.java -index 92818df3689e35b921eb04678c84d2dd4b21ddbe..f6b723062a9cd0667efcc0171df71e9df93def06 100644 ---- a/src/main/java/net/minecraft/world/InventoryLargeChest.java -+++ b/src/main/java/net/minecraft/world/InventoryLargeChest.java -@@ -1,5 +1,6 @@ - package net.minecraft.world; - -+import net.minecraft.core.EnumDirection; // Airplane - import net.minecraft.world.entity.player.EntityHuman; - import net.minecraft.world.item.ItemStack; - -@@ -91,6 +92,30 @@ public class InventoryLargeChest implements IInventory { - return i >= this.left.getSize() ? this.right.getItem(i - this.left.getSize()) : this.left.getItem(i); - } - -+ // Airplane start -+ @Override -+ public boolean hasEmptySlot(EnumDirection enumdirection) { -+ return this.left.hasEmptySlot(null) || this.right.hasEmptySlot(null); -+ } -+ -+ @Override -+ public boolean isCompletelyFull(EnumDirection enumdirection) { -+ return this.left.isCompletelyFull(null) && this.right.isCompletelyFull(null); -+ } -+ -+ @Override -+ public boolean isCompletelyEmpty(EnumDirection enumdirection) { -+ return this.left.isCompletelyEmpty(null) && this.right.isCompletelyEmpty(null); -+ } -+ // Airplane end -+ -+ // Airplane start -+ @Override -+ public ItemStack getHopperItem(int i) { -+ return i >= this.left.getSize() ? this.right.getHopperItem(i - this.left.getSize()) : this.left.getHopperItem(i); -+ } -+ // Airplane end -+ - @Override - public ItemStack splitStack(int i, int j) { - return i >= this.left.getSize() ? this.right.splitStack(i - this.left.getSize(), j) : this.left.splitStack(i, j); -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c3d4eda866016c4ac08d4c5d771e39dcac5a3a60..1ea76604a375b60aa2b93af6c562151030907b1c 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -289,6 +289,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne - public void inactiveTick() { } - // Spigot end - public boolean shouldBeRemoved; // Paper -+ // Airplane start -+ public int activatedPriority = gg.airplane.AirplaneConfig.maximumActivationPrio; // golf score -+ // Airplane end - - public float getBukkitYaw() { - return this.yaw; -@@ -316,10 +319,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne - this.isLegacyTrackingEntity = isLegacyTrackingEntity; - } - -+ // Airplane start - behavior of getAllPassengers + getting bigger range -+ private org.spigotmc.TrackingRange.TrackingRangeType getBiggestRangeOfPassengers(net.minecraft.server.level.PlayerChunkMap chunkMap, int[] range, Entity entity) { -+ org.spigotmc.TrackingRange.TrackingRangeType type = null; -+ -+ for (int i = 0; i < entity.passengers.size(); i++) { -+ Entity passenger = entity.passengers.get(i); -+ org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType; -+ int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal()); -+ if (passengerRange > range[0]) { -+ type = passengerType; -+ range[0] = passengerRange; -+ } -+ -+ org.spigotmc.TrackingRange.TrackingRangeType childType = this.getBiggestRangeOfPassengers(chunkMap, range, passenger); -+ if (childType != null) { -+ type = childType; -+ } -+ } -+ -+ return type; -+ } -+ // Airplane end -+ - public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet getPlayersInTrackRange() { -+ // Airplane start - replicate behavior of getAllPassengers to skip creating hashset -+ /* - Collection passengers = this.getAllPassengers(); -+ */ - net.minecraft.server.level.PlayerChunkMap chunkMap = ((WorldServer)this.world).getChunkProvider().playerChunkMap; - org.spigotmc.TrackingRange.TrackingRangeType type = this.trackingRangeType; -+ type = this.getBiggestRangeOfPassengers(chunkMap, new int[]{chunkMap.getEntityTrackerRange(type.ordinal())}, this); -+ if (type == null) type = this.trackingRangeType; -+ /* - int range = chunkMap.getEntityTrackerRange(type.ordinal()); - - for (Entity passenger : passengers) { -@@ -330,8 +362,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne - range = passengerRange; - } - } -+ */ -+ // Airplane end - -- return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this)); -+ return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this.chunkX, this.chunkZ)); // Airplane - don't convert doubles to ints here - } - // Paper end - optimise entity tracking - -diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 7ba59ff9a7ed39bf69c46973a85f874c43134dc1..892bfadbb1e7d09996df61aaee2cab74187f73d0 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java -+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -201,10 +201,10 @@ public abstract class EntityInsentient extends EntityLiving { - @Override - public void inactiveTick() { - super.inactiveTick(); -- if (this.goalSelector.inactiveTick()) { -+ if (this.goalSelector.inactiveTick(this.activatedPriority)) { // Airplane - pass activated priroity - this.goalSelector.doTick(); - } -- if (this.targetSelector.inactiveTick()) { -+ if (this.targetSelector.inactiveTick(this.activatedPriority)) { // Airplane - pass activated priority - this.targetSelector.doTick(); - } - } -@@ -774,8 +774,15 @@ public abstract class EntityInsentient extends EntityLiving { - return false; - } - -+ // Airplane start - just reduce frequency of checking for despawn -+ private byte despawnCheck = 0; - @Override - public void checkDespawn() { -+ if (++despawnCheck < gg.airplane.AirplaneConfig.entityDespawnCheckFrequency) { -+ return; -+ } -+ this.despawnCheck = 0; -+ // Airplane end - if (this.world.getDifficulty() == EnumDifficulty.PEACEFUL && this.L()) { - this.die(); - } else if (!this.isPersistent() && !this.isSpecialPersistence()) { -@@ -829,9 +836,11 @@ public abstract class EntityInsentient extends EntityLiving { - this.bo.a(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("targetSelector"); -+ if (this.targetSelector.inactiveTick(this.activatedPriority)) // Airplane - use this to alternate ticking - this.targetSelector.doTick(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("goalSelector"); -+ if (this.goalSelector.inactiveTick(this.activatedPriority)) // Airplane - use this to alternate ticking - this.goalSelector.doTick(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("navigation"); -diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 33f689b1c9f4c00969fbdd8ddb21901637afb81c..a49dbcffecc971f797651984cb72c455d40f9331 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityLiving.java -+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -111,6 +111,7 @@ import net.minecraft.world.phys.AxisAlignedBB; - import net.minecraft.world.phys.MovingObjectPosition; - import net.minecraft.world.phys.MovingObjectPositionEntity; - import net.minecraft.world.phys.Vec3D; -+import net.minecraft.world.phys.shapes.VoxelShapeCollision; - import net.minecraft.world.scores.ScoreboardTeam; - import org.apache.logging.log4j.Logger; - -@@ -909,11 +910,13 @@ public abstract class EntityLiving extends Entity { - } - - if (entity != null) { -- ItemStack itemstack = this.getEquipment(EnumItemSlot.HEAD); -- Item item = itemstack.getItem(); -+ // Airplane start - don't get equipment if not needed -+ //ItemStack itemstack = this.getEquipment(EnumItemSlot.HEAD); -+ //Item item = itemstack.getItem(); - EntityTypes entitytypes = entity.getEntityType(); - -- if (entitytypes == EntityTypes.SKELETON && item == Items.SKELETON_SKULL || entitytypes == EntityTypes.ZOMBIE && item == Items.ZOMBIE_HEAD || entitytypes == EntityTypes.CREEPER && item == Items.CREEPER_HEAD) { -+ if (entitytypes == EntityTypes.SKELETON && this.getEquipment(EnumItemSlot.HEAD).getItem() == Items.SKELETON_SKULL || entitytypes == EntityTypes.ZOMBIE && this.getEquipment(EnumItemSlot.HEAD).getItem() == Items.ZOMBIE_HEAD || entitytypes == EntityTypes.CREEPER && this.getEquipment(EnumItemSlot.HEAD).getItem() == Items.CREEPER_HEAD) { -+ // Airplane end - d0 *= 0.5D; - } - } -@@ -1742,6 +1745,19 @@ public abstract class EntityLiving extends Entity { - } - } - -+ // Airplane start -+ private boolean cachedIsClimbing = false; -+ private BlockPosition lastClimbingPosition = null; -+ -+ public boolean isClimbingCached() { -+ if (!this.getChunkCoordinates().equals(this.lastClimbingPosition)) { -+ this.cachedIsClimbing = this.isClimbing(); -+ this.lastClimbingPosition = this.getChunkCoordinates(); -+ } -+ return this.cachedIsClimbing; -+ } -+ // Airplane end -+ - public IBlockData ds() { - return this.world.getType(this.getChunkCoordinates()); - } -@@ -3101,7 +3117,7 @@ public abstract class EntityLiving extends Entity { - Vec3D vec3d = new Vec3D(this.locX(), this.getHeadY(), this.locZ()); - Vec3D vec3d1 = new Vec3D(entity.locX(), entity.getHeadY(), entity.locZ()); - -- return this.world.rayTrace(new RayTrace(vec3d, vec3d1, RayTrace.BlockCollisionOption.COLLIDER, RayTrace.FluidCollisionOption.NONE, this)).getType() == MovingObjectPosition.EnumMovingObjectType.MISS; -+ return this.world.rayTraceDirect(vec3d, vec3d1, VoxelShapeCollision.a(this)) == MovingObjectPosition.EnumMovingObjectType.MISS; // Airplane - use direct method - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java -index 80c229c1852199fda85c03453d64cae33e413e89..7f70dda656ff9d802200f18139d2695e58c551c7 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityTypes.java -+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java -@@ -270,6 +270,8 @@ public class EntityTypes { - private MinecraftKey bq; - private final EntitySize br; - -+ public java.util.function.Supplier getEntityName = () -> IRegistry.ENTITY_TYPE.getKey(this).toString(); // Airplane - create lambda ones -+ - private static EntityTypes a(String s, EntityTypes.Builder entitytypes_builder) { // CraftBukkit - decompile error - return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s)); - } -diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java -index 72f1031e95b375823790f8cac4c102ba1205c9e8..e4821c1a7ceac582b019102230dbe5221add9050 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java -+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorBetterJob.java -@@ -3,6 +3,7 @@ package net.minecraft.world.entity.ai.behavior; - import com.google.common.collect.ImmutableMap; - import net.minecraft.core.GlobalPos; - import net.minecraft.server.level.WorldServer; -+import net.minecraft.world.entity.EntityLiving; - import net.minecraft.world.entity.ai.memory.MemoryModuleType; - import net.minecraft.world.entity.ai.memory.MemoryStatus; - import net.minecraft.world.entity.ai.village.poi.VillagePlaceType; -@@ -21,11 +22,31 @@ public class BehaviorBetterJob extends Behavior { - protected void a(WorldServer worldserver, EntityVillager entityvillager, long i) { - GlobalPos globalpos = (GlobalPos) entityvillager.getBehaviorController().getMemory(MemoryModuleType.JOB_SITE).get(); - -+ // Airplane start - remove stream -+ /* - worldserver.y().c(globalpos.getBlockPosition()).ifPresent((villageplacetype) -> { - BehaviorUtil.a(entityvillager, (entityvillager1) -> { - return this.a(globalpos, villageplacetype, entityvillager1); - }).reduce(entityvillager, BehaviorBetterJob::a); - }); -+ */ -+ java.util.Optional optVillagePlaceType = worldserver.y().c(globalpos.getBlockPosition()); -+ if (optVillagePlaceType.isPresent()) { -+ VillagePlaceType villageplacetype = optVillagePlaceType.get(); -+ java.util.Optional> optList = entityvillager.getBehaviorController().getMemory(MemoryModuleType.MOBS); -+ if (optList.isPresent()) { -+ EntityVillager previous = entityvillager; -+ for (EntityLiving entityliving : optList.get()) { -+ if (entityliving instanceof EntityVillager && entityliving != entityvillager && entityliving.isAlive()) { -+ EntityVillager entityvillager1 = (EntityVillager) entityliving; -+ if (this.a(globalpos, villageplacetype, entityvillager1)) { -+ previous = a(previous, entityvillager1); -+ } -+ } -+ } -+ } -+ } -+ // Airplane end - } - - private static EntityVillager a(EntityVillager entityvillager, EntityVillager entityvillager1) { -diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java -index bc8786e2aaeab4dbae4e9c7666ad816bc5bfac3f..09133c5822bc1386bc3d8a5f3c94196420bbfaea 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java -+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorFindPosition.java -@@ -67,6 +67,7 @@ public class BehaviorFindPosition extends Behavior { - - protected void a(WorldServer worldserver, EntityCreature entitycreature, long i) { - this.f = i + 20L + (long) worldserver.getRandom().nextInt(20); -+ if (entitycreature.getNavigation().isStuck()) this.f += 200L; // Airplane - wait an additional 10s to check again if they're stuck - VillagePlace villageplace = worldserver.y(); - - this.g.long2ObjectEntrySet().removeIf((entry) -> { -diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java -index 637928664f8c7b1c694a234e507c20724294e450..697e666a027d5e2ace7d0758909be5a658c480d2 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java -+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java -@@ -28,7 +28,7 @@ public class PathfinderGoalSelector { - } - }; - private final Map c = new EnumMap(PathfinderGoal.Type.class); -- private final Set d = Sets.newLinkedHashSet(); public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public -+ private final gg.airplane.structs.LinkedHashSetArrayList d = new gg.airplane.structs.LinkedHashSetArrayList<>(); public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public // Airplane - it's a set, but it's an arraylist - private final Supplier e; - private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. - private final OptimizedSmallEnumSet goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector -@@ -44,9 +44,14 @@ public class PathfinderGoalSelector { - } - - // Paper start -- public boolean inactiveTick() { -- incRate(); -- return getCurRate() % getTickRate() == 0; -+ public boolean inactiveTick(int tickRate) { // Airplane - take tick rate -+ tickRate = Math.min(tickRate, getTickRate()); // Airplane -+ if (this.curRate++ % tickRate != 0) { // Airplane - use tick rate / increment curRate every tick -+ //incRate(); -+ return false; -+ } else { -+ return true; -+ } - } - public boolean hasTasks() { - for (PathfinderGoalWrapped task : getTasks()) { -@@ -80,8 +85,11 @@ public class PathfinderGoalSelector { - - gameprofilerfiller.enter("goalCleanup"); - // Paper start - remove streams from pathfindergoalselector -- for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { -- PathfinderGoalWrapped wrappedGoal = iterator.next(); -+ // Airplane start - remove iterators from pathfindergoalselector -+ //for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { -+ // PathfinderGoalWrapped wrappedGoal = iterator.next(); -+ for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { -+ PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex); - if (!wrappedGoal.g()) { - continue; - } -@@ -100,8 +108,10 @@ public class PathfinderGoalSelector { - gameprofilerfiller.exit(); - gameprofilerfiller.enter("goalUpdate"); - // Paper start - remove streams from pathfindergoalselector -- goal_update_loop: for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { -- PathfinderGoalWrapped wrappedGoal = iterator.next(); -+ // Airplane start - remove iterators from pathfindergoalselector -+ goal_update_loop: for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { //for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { -+ PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex); -+ // Airplane end - if (wrappedGoal.g()) { - continue; - } -@@ -144,8 +154,11 @@ public class PathfinderGoalSelector { - gameprofilerfiller.exit(); - gameprofilerfiller.enter("goalTick"); - // Paper start - remove streams from pathfindergoalselector -- for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { -- PathfinderGoalWrapped wrappedGoal = iterator.next(); -+ // Airplane start - remove iterators from pathfindergoalselector -+ //for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { -+ // PathfinderGoalWrapped wrappedGoal = iterator.next(); -+ for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex); -+ // Airplane end - if (wrappedGoal.g()) { - wrappedGoal.e(); - } -diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java -index 148bdbc2cffb002d8b6dd05e70854ab503804949..48e6a4c588ef39a4bde067d79b96a656c68750ce 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java -+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java -@@ -433,6 +433,7 @@ public abstract class NavigationAbstract { - } - } - -+ public boolean isStuck() { return this.t(); } // Airplane - OBFHELPER - public boolean t() { - return this.t; - } -diff --git a/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java b/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java -index 88972dd8252bd2d2d8e384d616484ff682949fa8..5e8d3b84cbad299e09e8f25bfc712d11e1d1068e 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java -+++ b/src/main/java/net/minecraft/world/entity/ai/targeting/PathfinderTargetCondition.java -@@ -84,9 +84,17 @@ public class PathfinderTargetCondition { - } - - if (this.b > 0.0D) { -+ // Airplane start - try to return early -+ double range = (useFollowRange ? getFollowRange(entityliving) : this.b); -+ double d2 = entityliving.h(entityliving1.locX(), entityliving1.locY(), entityliving1.locZ()); // move up here to use early -+ -+ if (d2 > range * range) { // if they're further than the absolute furthest allowed, they don't match -+ return false; -+ } -+ - double d0 = this.g ? entityliving1.A(entityliving) : 1.0D; -- double d1 = Math.max((useFollowRange ? getFollowRange(entityliving) : this.b) * d0, 2.0D); // Paper -- double d2 = entityliving.h(entityliving1.locX(), entityliving1.locY(), entityliving1.locZ()); -+ double d1 = Math.max(range * d0, 2.0D); // Paper // Airplane - reuse range calculated above -+ // Airplane end - - if (d2 > d1 * d1) { - return false; -diff --git a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -index 61ebb278cf4ef57ae7a86c6c6ef1fa14559f21e2..341b95f73a839a548b202e7bf97fd18760c71fd8 100644 ---- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -+++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -@@ -10,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound; - import net.minecraft.network.syncher.DataWatcher; - import net.minecraft.network.syncher.DataWatcherObject; - import net.minecraft.network.syncher.DataWatcherRegistry; -+import net.minecraft.server.MinecraftServer; - import net.minecraft.sounds.SoundEffect; - import net.minecraft.sounds.SoundEffects; - import net.minecraft.util.MathHelper; -@@ -247,13 +248,22 @@ public class EntityBat extends EntityAmbient { - } - } - -+ // Airplane start - only check for spooky season once an hour -+ private static boolean isSpookySeason = false; -+ private static final int ONE_HOUR = 20 * 60 * 60; -+ private static int lastSpookyCheck = -ONE_HOUR; - private static boolean eJ() { -+ if (MinecraftServer.currentTick - lastSpookyCheck > ONE_HOUR) { - LocalDate localdate = LocalDate.now(); - int i = localdate.get(ChronoField.DAY_OF_MONTH); - int j = localdate.get(ChronoField.MONTH_OF_YEAR); -+ isSpookySeason = j == 10 && i >= 20 || j == 11 && i <= 3; -+ lastSpookyCheck = MinecraftServer.currentTick; -+ } - -- return j == 10 && i >= 20 || j == 11 && i <= 3; -+ return isSpookySeason; - } -+ // Airplane end - - @Override - protected float b(EntityPose entitypose, EntitySize entitysize) { -diff --git a/src/main/java/net/minecraft/world/entity/item/EntityItem.java b/src/main/java/net/minecraft/world/entity/item/EntityItem.java -index 077990f1d95ded2c8b89c38978ec25a56df3a984..e1581f0616748da885f457c7fa0f1515490c53f4 100644 ---- a/src/main/java/net/minecraft/world/entity/item/EntityItem.java -+++ b/src/main/java/net/minecraft/world/entity/item/EntityItem.java -@@ -230,10 +230,16 @@ public class EntityItem extends Entity { - if (entityitem.z()) { - // Paper Start - Fix items merging through walls - if (this.world.paperConfig.fixItemsMergingThroughWalls) { -+ // Airplane start - fast merging! -+ /* - net.minecraft.world.level.RayTrace rayTrace = new net.minecraft.world.level.RayTrace(this.getPositionVector(), entityitem.getPositionVector(), - net.minecraft.world.level.RayTrace.BlockCollisionOption.COLLIDER, net.minecraft.world.level.RayTrace.FluidCollisionOption.NONE, this); - net.minecraft.world.phys.MovingObjectPositionBlock rayTraceResult = world.rayTrace(rayTrace); - if (rayTraceResult.getType() == net.minecraft.world.phys.MovingObjectPosition.EnumMovingObjectType.BLOCK) continue; -+ */ -+ if (world.rayTraceDirect(this.getPositionVector(), entityitem.getPositionVector(), net.minecraft.world.phys.shapes.VoxelShapeCollision.a(this)) == -+ net.minecraft.world.phys.MovingObjectPosition.EnumMovingObjectType.BLOCK) continue; -+ // Airplane end - } - // Paper End - this.a(entityitem); -diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index e993b1849beb60515c51ee4f37617faab63ca223..4d7b5d47ab6bd3b1408811c3b9c157b1eb5c30ae 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -+++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -@@ -57,6 +57,7 @@ import net.minecraft.world.level.World; - import net.minecraft.world.level.block.Block; - import net.minecraft.world.level.block.Blocks; - import net.minecraft.world.level.block.state.IBlockData; -+import net.minecraft.world.level.chunk.Chunk; - import net.minecraft.world.level.pathfinder.PathType; - import net.minecraft.world.phys.AxisAlignedBB; - import net.minecraft.world.phys.MovingObjectPositionBlock; -@@ -314,11 +315,18 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { - private boolean p(double d0, double d1, double d2) { - BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(d0, d1, d2); - -- while (blockposition_mutableblockposition.getY() > 0 && !this.world.getType(blockposition_mutableblockposition).getMaterial().isSolid()) { -+ // Airplane start - single chunk lookup -+ Chunk chunk = this.world.getChunkIfLoaded(blockposition_mutableblockposition); -+ if (chunk == null) { -+ return false; -+ } -+ -+ while (blockposition_mutableblockposition.getY() > 0 && !chunk.getType(blockposition_mutableblockposition).getMaterial().isSolid()) { // use chunk lookup - blockposition_mutableblockposition.c(EnumDirection.DOWN); - } - -- IBlockData iblockdata = this.world.getType(blockposition_mutableblockposition); -+ IBlockData iblockdata = chunk.getType(blockposition_mutableblockposition); // use chunk lookup -+ // Airplane end - boolean flag = iblockdata.getMaterial().isSolid(); - boolean flag1 = iblockdata.getFluid().a((Tag) TagsFluid.WATER); - -diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -index 375409f4b72edc7990da90460b30486fb2980fb6..9aa4850e021076fde306eea7eec104c31086c57f 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -@@ -54,7 +54,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { - public int conversionTicks = 0; - public boolean cannotBeHunted = false; - protected static final ImmutableList>> bo = ImmutableList.of(SensorType.c, SensorType.d, SensorType.n, SensorType.m); -- protected static final ImmutableList> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED}); -+ protected static final ImmutableList> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED}); // Airplane - decompile error - - public EntityHoglin(EntityTypes entitytypes, World world) { - super(entitytypes, world); -@@ -118,15 +118,20 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { - - @Override - public BehaviorController getBehaviorController() { -- return super.getBehaviorController(); -+ return (BehaviorController) super.getBehaviorController(); // Airplane - decompile error - } - -+ private int behaviorTick; // Airplane - @Override - protected void mobTick() { -+ // Airplane - dynamic tick -+ if (!gg.airplane.AirplaneConfig.dynamicHoglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) { - this.world.getMethodProfiler().enter("hoglinBrain"); -- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this); -+ this.getBehaviorController().a((WorldServer) this.world, (EntityHoglin) this); // Airplane - decompile error - this.world.getMethodProfiler().exit(); - HoglinAI.a(this); -+ } -+ // Airplane end - if (this.isConverting()) { - ++this.conversionTicks; - if (this.conversionTicks > 300) { -@@ -300,7 +305,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { - - @Override - protected SoundEffect getSoundAmbient() { -- return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse((Object) null); -+ return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse(null); // Airplane - decompile error - } - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -index 9a7bebd77302dbfd07ac802acbe2b9cb80eec26f..99cdcc9a9a7e6227a165c4ef779f8e76a99ec56a 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -@@ -272,12 +272,17 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { - return !this.cannotHunt; - } - -+ private int behaviorTick; // Airplane - @Override - protected void mobTick() { -+ // Airplane - dynamic tick -+ if (!gg.airplane.AirplaneConfig.dynamicPiglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) { - this.world.getMethodProfiler().enter("piglinBrain"); - this.getBehaviorController().a((WorldServer) this.world, (EntityPiglin) this); // CraftBukkit - decompile error - this.world.getMethodProfiler().exit(); - PiglinAI.b(this); -+ } -+ // Airplane end - super.mobTick(); - } - -diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index 85374ac8f5460790de03b47d7c3ce19ed5596afe..ccb568a5e8501ac5e8901ef3a270cc87471d9ea1 100644 ---- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -@@ -231,11 +231,17 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - } - // Spigot End - -+ private int behaviorTick = 0; -+ - @Override - protected void mobTick() { mobTick(false); } - protected void mobTick(boolean inactive) { - this.world.getMethodProfiler().enter("villagerBrain"); -- if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper -+ if (!inactive) { -+ if (!gg.airplane.AirplaneConfig.dynamicVillagerBehavior || behaviorTick++ % this.activatedPriority == 0) { -+ this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper -+ } -+ } - this.world.getMethodProfiler().exit(); - if (this.bF) { - this.bF = false; -diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index 5bce47fa8f191bc1d33c04c9865cb0efd492a9a2..5f9e64df007ebc40f7bcb50be495b10e51d5b87a 100644 ---- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -162,7 +162,8 @@ public abstract class EntityHuman extends EntityLiving { - protected int bG; - protected final float bH = 0.02F; - private int g; -- private GameProfile bJ; public final void setProfile(final GameProfile profile) { this.bJ = profile; } // Paper - OBFHELPER -+ private IChatBaseComponent displayName; // Airplane - cache displayName -+ private GameProfile bJ; public final void setProfile(final GameProfile profile) { this.bJ = profile; this.displayName = null; } // Paper - OBFHELPER // Airplane - use to reset displayName - private ItemStack bL; - private final ItemCooldown bM; - @Nullable -@@ -1840,7 +1841,12 @@ public abstract class EntityHuman extends EntityLiving { - - @Override - public IChatBaseComponent getDisplayName() { -- return new ChatComponentText(this.bJ.getName()); -+ // Airplane start - cache display name -+ if (this.displayName == null) { -+ this.displayName = new ChatComponentText(this.getProfile().getName()); -+ } -+ return this.displayName; -+ // Airplane end - } - - public InventoryEnderChest getEnderChest() { -diff --git a/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java b/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java -index 2df3ae0b72ccb5f816d55fed15396ba5a1affb7f..754a3ea18905b79ae5ae4fc2442c94f0611b6d0e 100644 ---- a/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java -+++ b/src/main/java/net/minecraft/world/entity/player/PlayerInventory.java -@@ -630,6 +630,8 @@ public class PlayerInventory implements IInventory, INamableTileEntity { - } - - public boolean h(ItemStack itemstack) { -+ // Airplane start - skip using abstract iterators and stuff, they're generic and slow and allocating them sucks -+ /* - Iterator iterator = this.f.iterator(); - - while (iterator.hasNext()) { -@@ -644,6 +646,20 @@ public class PlayerInventory implements IInventory, INamableTileEntity { - } - } - } -+ */ -+ List> components = this.getComponents(); -+ for (int i = 0; i < components.size(); i++) { -+ List list = components.get(i); -+ -+ for (int j = 0; j < list.size(); j++) { -+ ItemStack itemstack1 = list.get(j); -+ -+ if (!itemstack1.isEmpty() && itemstack1.doMaterialsMatch(itemstack)) { -+ return true; -+ } -+ } -+ } -+ // Airplane end - - return false; - } -diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java -index 8bc65e9c0fa5e134a8eb4e03f0da5b2ccd06cd7c..c48bcb89464ecffeb8805eae460d76ae8b37ccb6 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java -@@ -4,6 +4,8 @@ import net.minecraft.core.BlockPosition; - import net.minecraft.core.particles.Particles; - import net.minecraft.network.protocol.Packet; - import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity; -+import net.minecraft.server.MinecraftServer; -+import net.minecraft.util.MathHelper; - import net.minecraft.world.entity.Entity; - import net.minecraft.world.entity.EntityLiving; - import net.minecraft.world.entity.EntityTypes; -@@ -102,6 +104,37 @@ public abstract class EntityProjectile extends IProjectile { - this.setPosition(d0, d1, d2); - } - -+ private static int loadedThisTick = 0; -+ private static int loadedTick; -+ -+ private int buffered = 0; -+ -+ // Airplane start -+ @Override -+ public void setPosition(double d0, double d1, double d2) { -+ if (loadedTick != MinecraftServer.currentTick) { -+ loadedTick = MinecraftServer.currentTick; -+ loadedThisTick = 0; -+ } -+ int previousX = MathHelper.floor(this.locX()) >> 4, previousZ = MathHelper.floor(this.locZ()) >> 4; -+ int newX = MathHelper.floor(d0) >> 4, newZ = MathHelper.floor(d2) >> 4; -+ if (previousX != newX || previousZ != newZ) { -+ boolean isLoaded = this.world.isChunkLoaded(newX, newZ); -+ if (!isLoaded) { -+ if (loadedThisTick > 10) { // Airplane 10 = max chunks to load from projectiles in a tick todo config -+ if (++buffered > 20) { // Airplane 20 = max chunks a single projectile loads overall todo config -+ this.die(); -+ } -+ return; -+ } -+ loadedThisTick++; -+ } -+ buffered = 0; -+ } -+ super.setPosition(d0, d1, d2); -+ } -+ // Airplane end -+ - protected float k() { - return 0.03F; - } -diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java -index e112d149fc3a7af7f0c9a5280c94c9b03b2aba2d..d2afc367fb393c6206f9cd599d4603294d457608 100644 ---- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java -+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipes.java -@@ -26,8 +26,16 @@ public class ShapelessRecipes implements RecipeCrafting { - private final String group; - private final ItemStack result; - private final NonNullList ingredients; -+ private final boolean isBukkit; // Airplane - -+ // Airplane start - add isBukkit constructor param - public ShapelessRecipes(MinecraftKey minecraftkey, String s, ItemStack itemstack, NonNullList nonnulllist) { -+ this(minecraftkey, s, itemstack, nonnulllist, false); -+ } -+ -+ public ShapelessRecipes(MinecraftKey minecraftkey, String s, ItemStack itemstack, NonNullList nonnulllist, boolean isBukkit) { -+ this.isBukkit = isBukkit; -+ // Airplane end - this.key = minecraftkey; - this.group = s; - this.result = itemstack; -@@ -69,6 +77,28 @@ public class ShapelessRecipes implements RecipeCrafting { - } - - public boolean a(InventoryCrafting inventorycrafting, World world) { -+ // Airplane start -+ if (!this.isBukkit) { -+ java.util.List ingredients = com.google.common.collect.Lists.newArrayList(this.ingredients.toArray(new RecipeItemStack[0])); -+ -+ inventory: for (int index = 0; index < inventorycrafting.getSize(); index++) { -+ ItemStack itemStack = inventorycrafting.getItem(index); -+ -+ if (!itemStack.isEmpty()) { -+ for (int i = 0; i < ingredients.size(); i++) { -+ if (ingredients.get(i).test(itemStack)) { -+ ingredients.remove(i); -+ continue inventory; -+ } -+ } -+ return false; -+ } -+ } -+ -+ return ingredients.isEmpty(); -+ } -+ // Airplane end -+ - AutoRecipeStackManager autorecipestackmanager = new AutoRecipeStackManager(); - int i = 0; - -diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index 3783f3a83e3e70d77cf0fa1021f62a89c5950af5..d0c63be6ebfa2f95fb3d63eed2e11b1c5cd6384e 100644 ---- a/src/main/java/net/minecraft/world/level/GameRules.java -+++ b/src/main/java/net/minecraft/world/level/GameRules.java -@@ -86,6 +86,7 @@ public class GameRules { - public static final GameRules.GameRuleKey FORGIVE_DEAD_PLAYERS = a("forgiveDeadPlayers", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleBoolean.b(true)); - public static final GameRules.GameRuleKey UNIVERSAL_ANGER = a("universalAnger", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleBoolean.b(false)); - private final Map, GameRules.GameRuleValue> J; -+ private final GameRules.GameRuleValue[] gameruleArray; - - private static > GameRules.GameRuleKey a(String s, GameRules.GameRuleCategory gamerules_gamerulecategory, GameRules.GameRuleDefinition gamerules_gameruledefinition) { - GameRules.GameRuleKey gamerules_gamerulekey = new GameRules.GameRuleKey<>(s, gamerules_gamerulecategory); -@@ -104,17 +105,31 @@ public class GameRules { - } - - public GameRules() { -- this.J = (Map) GameRules.I.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> { -+ // Airplane start - use this() -+ this((Map) GameRules.I.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> { - return ((GameRules.GameRuleDefinition) entry.getValue()).getValue(); -- })); -+ }))); -+ // Airplane end - } - - private GameRules(Map, GameRules.GameRuleValue> map) { - this.J = map; -+ -+ int arraySize = map.keySet().stream().mapToInt(key -> key.gameRuleIndex).max().orElse(-1) + 1; -+ GameRules.GameRuleValue[] values = new GameRules.GameRuleValue[arraySize]; -+ -+ for (Entry, GameRuleValue> entry : map.entrySet()) { -+ values[entry.getKey().gameRuleIndex] = entry.getValue(); -+ } -+ -+ this.gameruleArray = values; - } - - public > T get(GameRules.GameRuleKey gamerules_gamerulekey) { -- return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error -+ // Airplane start -+ return gamerules_gamerulekey == null ? null : (T) this.gameruleArray[gamerules_gamerulekey.gameRuleIndex]; -+ //return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error -+ // Airplane end - } - - public NBTTagCompound a() { -@@ -357,6 +372,10 @@ public class GameRules { - } - - public static final class GameRuleKey> { -+ // Airplane start -+ private static int lastGameRuleIndex = 0; -+ public final int gameRuleIndex = lastGameRuleIndex++; -+ // Airplane end - - private final String a; - private final GameRules.GameRuleCategory b; -diff --git a/src/main/java/net/minecraft/world/level/IBlockAccess.java b/src/main/java/net/minecraft/world/level/IBlockAccess.java -index e612e1d30f76e217b1aa23488ab025adce048f57..6109d59c02d0c7877e213213c6aec6f8513ccc47 100644 ---- a/src/main/java/net/minecraft/world/level/IBlockAccess.java -+++ b/src/main/java/net/minecraft/world/level/IBlockAccess.java -@@ -14,9 +14,11 @@ import net.minecraft.world.level.block.state.IBlockData; - import net.minecraft.world.level.material.Fluid; - import net.minecraft.world.level.material.Material; - import net.minecraft.world.phys.AxisAlignedBB; -+import net.minecraft.world.phys.MovingObjectPosition; - import net.minecraft.world.phys.MovingObjectPositionBlock; - import net.minecraft.world.phys.Vec3D; - import net.minecraft.world.phys.shapes.VoxelShape; -+import net.minecraft.world.phys.shapes.VoxelShapeCollision; - - public interface IBlockAccess { - -@@ -56,6 +58,16 @@ public interface IBlockAccess { - return BlockPosition.a(axisalignedbb).map(this::getType); - } - -+ // Airplane start - broken down variant of below rayTraceBlock, used by World#rayTraceDirect -+ default MovingObjectPosition.EnumMovingObjectType rayTraceBlockDirect(Vec3D vec3d, Vec3D vec3d1, BlockPosition blockposition, IBlockData iblockdata, VoxelShapeCollision voxelshapecoll) { -+ if (iblockdata.isAir()) return null; // Tuinity - optimise air cases -+ VoxelShape voxelshape = RayTrace.BlockCollisionOption.COLLIDER.get(iblockdata, this, blockposition, voxelshapecoll); -+ MovingObjectPositionBlock movingobjectpositionblock = this.rayTrace(vec3d, vec3d1, blockposition, voxelshape, iblockdata); -+ -+ return movingobjectpositionblock == null ? null : movingobjectpositionblock.getType(); -+ } -+ // Airplane end -+ - // CraftBukkit start - moved block handling into separate method for use by Block#rayTrace - default MovingObjectPositionBlock rayTraceBlock(RayTrace raytrace1, BlockPosition blockposition) { - // Paper start - Prevent raytrace from loading chunks -diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java -index d497006f05f79015cd791849888832bb53f4a414..d98526785ff2fa3b72e8ffffcb89a57a2203a5c8 100644 ---- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java -@@ -415,7 +415,10 @@ public final class SpawnerCreature { - } - - private static List a(WorldServer worldserver, StructureManager structuremanager, ChunkGenerator chunkgenerator, EnumCreatureType enumcreaturetype, BlockPosition blockposition, @Nullable BiomeBase biomebase) { -- return enumcreaturetype == EnumCreatureType.MONSTER && worldserver.getType(blockposition.down()).getBlock() == Blocks.NETHER_BRICKS && structuremanager.a(blockposition, false, StructureGenerator.FORTRESS).e() ? StructureGenerator.FORTRESS.c() : chunkgenerator.getMobsFor(biomebase != null ? biomebase : worldserver.getBiome(blockposition), structuremanager, enumcreaturetype, blockposition); -+ // Airplane start - single chunk lookup -+ Chunk chunk; -+ return enumcreaturetype == EnumCreatureType.MONSTER && (chunk = worldserver.getChunkIfLoaded(blockposition)) != null && chunk.getType(blockposition.down()).getBlock() == Blocks.NETHER_BRICKS && structuremanager.a(blockposition, false, StructureGenerator.FORTRESS).e() ? StructureGenerator.FORTRESS.c() : chunkgenerator.getMobsFor(biomebase != null ? biomebase : worldserver.getBiome(blockposition), structuremanager, enumcreaturetype, blockposition); -+ // Airplane end - } - - private static BlockPosition getRandomPosition(World world, Chunk chunk) { -diff --git a/src/main/java/net/minecraft/world/level/StructureManager.java b/src/main/java/net/minecraft/world/level/StructureManager.java -index 43418273f00f3703c7bd86586847d469af92c18f..d11e79093f9a5121c98b7da840bc79d204895b65 100644 ---- a/src/main/java/net/minecraft/world/level/StructureManager.java -+++ b/src/main/java/net/minecraft/world/level/StructureManager.java -@@ -16,6 +16,11 @@ import net.minecraft.world.level.levelgen.feature.StructureGenerator; - import net.minecraft.world.level.levelgen.structure.StructurePiece; - import net.minecraft.world.level.levelgen.structure.StructureStart; - -+// Airplane start -+import it.unimi.dsi.fastutil.longs.LongIterator; -+import it.unimi.dsi.fastutil.longs.LongSet; -+// Airplane end -+ - public class StructureManager { - - private final GeneratorAccess a; public GeneratorAccess getLevel() { return a; } // Paper - OBFHELPER -@@ -52,13 +57,15 @@ public class StructureManager { - public java.util.List> getFeatureStarts(SectionPosition sectionPosition, StructureGenerator structureGenerator, IWorldReader world) { - // Tuinity end - add world parameter - java.util.List> list = new ObjectArrayList<>(); -- for (Long curLong: (world == null ? getLevel() : world).getChunkAt(sectionPosition.a(), sectionPosition.c(), ChunkStatus.STRUCTURE_REFERENCES).b(structureGenerator)) { // Tuinity - fix deadlock on world gen - chunk can be unloaded while generating, so we should be using the generator's regionlimitedaccess so we always get the chunk -- SectionPosition sectionPosition1 = SectionPosition.a(new ChunkCoordIntPair(curLong), 0); -+ // Airplane start - skip allocating Longs -+ (world == null ? getLevel() : world).getChunkAt(sectionPosition.a(), sectionPosition.c(), ChunkStatus.STRUCTURE_REFERENCES).b(structureGenerator).forEach((java.util.function.LongConsumer) curLong -> { -+ SectionPosition sectionPosition1 = SectionPosition.a(ChunkCoordIntPair.getX(curLong), 0, ChunkCoordIntPair.getZ(curLong)); // don't allocate ChunkCoordIntPair - StructureStart structurestart = a(sectionPosition1, structureGenerator, getLevel().getChunkAt(sectionPosition1.a(), sectionPosition1.c(), ChunkStatus.STRUCTURE_STARTS)); - if (structurestart != null && structurestart.e()) { - list.add(structurestart); - } -- } -+ }); -+ // Airplane end - return list; - } - // Paper end -@@ -86,7 +93,18 @@ public class StructureManager { - } - public StructureStart getStructureStarts(BlockPosition blockposition, boolean flag, StructureGenerator structuregenerator, IWorldReader world) { - // Paper start - remove structure streams -- for (StructureStart structurestart : getFeatureStarts(SectionPosition.a(blockposition), structuregenerator, world)) { // Tuinity end - add world parameter -+ // Airplane start - inline getFeatureStarts to skip creating the list -+ SectionPosition sectionPosition = SectionPosition.a(blockposition); -+ -+ // use iterator here instead of forEach like in getFeatureStarts so we can return early -+ LongSet longSet = (world == null ? getLevel() : world).getChunkAt(sectionPosition.a(), sectionPosition.c(), ChunkStatus.STRUCTURE_REFERENCES).b(structuregenerator); -+ LongIterator iterator = longSet.iterator(); -+ while (iterator.hasNext()) { -+ long curLong = iterator.nextLong(); -+ SectionPosition sectionPosition1 = SectionPosition.a(ChunkCoordIntPair.getX(curLong), 0, ChunkCoordIntPair.getZ(curLong)); // don't allocate ChunkCoordIntPair -+ StructureStart structurestart = a(sectionPosition1, structuregenerator, getLevel().getChunkAt(sectionPosition1.a(), sectionPosition1.c(), ChunkStatus.STRUCTURE_STARTS)); -+ if (structurestart != null && structurestart.e()) { -+ - if (structurestart.c().b(blockposition)) { - if (!flag) { - return structurestart; -@@ -97,7 +115,10 @@ public class StructureManager { - } - } - } -+ -+ } - } -+ // Airplane end - return StructureStart.a; - // Paper end - } -diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index cb8064df7e9f1b8b4d4292486e2193680d83663c..d1591f8d0b45126acef5d24ddb41d76293f5b42d 100644 ---- a/src/main/java/net/minecraft/world/level/World.java -+++ b/src/main/java/net/minecraft/world/level/World.java -@@ -18,6 +18,7 @@ import java.util.function.Consumer; - import java.util.function.Predicate; - import java.util.function.Supplier; - import javax.annotation.Nullable; -+ - import net.minecraft.CrashReport; - import net.minecraft.CrashReportSystemDetails; - import net.minecraft.ReportedException; -@@ -69,6 +70,8 @@ import net.minecraft.world.level.saveddata.maps.WorldMap; - import net.minecraft.world.level.storage.WorldData; - import net.minecraft.world.level.storage.WorldDataMutable; - import net.minecraft.world.phys.AxisAlignedBB; -+import net.minecraft.world.phys.MovingObjectPosition; -+import net.minecraft.world.phys.Vec3D; - import net.minecraft.world.phys.shapes.OperatorBoolean; - import net.minecraft.world.phys.shapes.VoxelShape; - import net.minecraft.world.phys.shapes.VoxelShapeCollision; -@@ -104,7 +107,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list - public final List tileEntityListTick = Lists.newArrayList(); - protected final List tileEntityListPending = Lists.newArrayList(); -- protected final java.util.Set tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); -+ protected final java.util.Set tileEntityListUnload = java.util.Collections.newSetFromMap(new java.util.IdentityHashMap<>()); // Airplane - use set with faster contains - public final Thread serverThread; - private final boolean debugWorld; - private int d; -@@ -385,6 +388,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - return null; - } - -+ // Airplane start - broken down method of raytracing for EntityLiving#hasLineOfSight, replaces IBlockAccess#rayTrace(RayTrace) -+ public MovingObjectPosition.EnumMovingObjectType rayTraceDirect(Vec3D vec3d, Vec3D vec3d1, VoxelShapeCollision voxelshapecoll) { -+ // most of this code comes from IBlockAccess#a(RayTrace, BiFunction, Function), but removes the needless functions -+ if (vec3d.equals(vec3d1)) { -+ return MovingObjectPosition.EnumMovingObjectType.MISS; -+ } -+ -+ double endX = MathHelper.linearInterpolation(-1.0E-7D, vec3d1.x, vec3d.x); -+ double endY = MathHelper.linearInterpolation(-1.0E-7D, vec3d1.y, vec3d.y); -+ double endZ = MathHelper.linearInterpolation(-1.0E-7D, vec3d1.z, vec3d.z); -+ -+ double startX = MathHelper.linearInterpolation(-1.0E-7D, vec3d.x, vec3d1.x); -+ double startY = MathHelper.linearInterpolation(-1.0E-7D, vec3d.y, vec3d1.y); -+ double startZ = MathHelper.linearInterpolation(-1.0E-7D, vec3d.z, vec3d1.z); -+ -+ int currentX = MathHelper.floor(startX); -+ int currentY = MathHelper.floor(startY); -+ int currentZ = MathHelper.floor(startZ); -+ -+ BlockPosition.MutableBlockPosition currentBlock = new BlockPosition.MutableBlockPosition(currentX, currentY, currentZ); -+ -+ Chunk chunk = this.getChunkIfLoaded(currentBlock); -+ if (chunk == null) { -+ return MovingObjectPosition.EnumMovingObjectType.MISS; -+ } -+ -+ MovingObjectPosition.EnumMovingObjectType initialCheck = this.rayTraceBlockDirect(vec3d, vec3d1, currentBlock, chunk.getType(currentBlock), voxelshapecoll); -+ -+ if (initialCheck != null) { -+ return initialCheck; -+ } -+ -+ double diffX = endX - startX; -+ double diffY = endY - startY; -+ double diffZ = endZ - startZ; -+ -+ int xDirection = MathHelper.sign(diffX); -+ int yDirection = MathHelper.sign(diffY); -+ int zDirection = MathHelper.sign(diffZ); -+ -+ double normalizedX = xDirection == 0 ? Double.MAX_VALUE : (double) xDirection / diffX; -+ double normalizedY = yDirection == 0 ? Double.MAX_VALUE : (double) yDirection / diffY; -+ double normalizedZ = zDirection == 0 ? Double.MAX_VALUE : (double) zDirection / diffZ; -+ -+ double normalizedXDirection = normalizedX * (xDirection > 0 ? 1.0D - MathHelper.getDecimals(startX) : MathHelper.getDecimals(startX)); -+ double normalizedYDirection = normalizedY * (yDirection > 0 ? 1.0D - MathHelper.getDecimals(startY) : MathHelper.getDecimals(startY)); -+ double normalizedZDirection = normalizedZ * (zDirection > 0 ? 1.0D - MathHelper.getDecimals(startZ) : MathHelper.getDecimals(startZ)); -+ -+ MovingObjectPosition.EnumMovingObjectType result; -+ -+ do { -+ if (normalizedXDirection > 1.0D && normalizedYDirection > 1.0D && normalizedZDirection > 1.0D) { -+ return MovingObjectPosition.EnumMovingObjectType.MISS; -+ } -+ -+ if (normalizedXDirection < normalizedYDirection) { -+ if (normalizedXDirection < normalizedZDirection) { -+ currentX += xDirection; -+ normalizedXDirection += normalizedX; -+ } else { -+ currentZ += zDirection; -+ normalizedZDirection += normalizedZ; -+ } -+ } else if (normalizedYDirection < normalizedZDirection) { -+ currentY += yDirection; -+ normalizedYDirection += normalizedY; -+ } else { -+ currentZ += zDirection; -+ normalizedZDirection += normalizedZ; -+ } -+ -+ currentBlock.setValues(currentX, currentY, currentZ); -+ if (chunk.getPos().x != currentBlock.getX() >> 4 || chunk.getPos().z != currentBlock.getZ() >> 4) { -+ chunk = this.getChunkIfLoaded(currentBlock); -+ if (chunk == null) { -+ return MovingObjectPosition.EnumMovingObjectType.MISS; -+ } -+ } -+ result = this.rayTraceBlockDirect(vec3d, vec3d1, currentBlock, chunk.getType(currentBlock), voxelshapecoll); -+ } while (result == null); -+ -+ return result; -+ } -+ // Airplane end -+ - public static boolean isValidLocation(BlockPosition blockposition) { - return blockposition.isValidLocation(); // Paper - use better/optimized check - } -@@ -906,12 +994,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - gameprofilerfiller.enter("blockEntities"); - timings.tileEntityTick.startTiming(); // Spigot - if (!this.tileEntityListUnload.isEmpty()) { -+ // Airplane start - we just use the identitymap as the basis for the unload set now instead of copying -+ /* - // Paper start - Use alternate implementation with faster contains - java.util.Set toRemove = java.util.Collections.newSetFromMap(new java.util.IdentityHashMap<>()); - toRemove.addAll(tileEntityListUnload); - this.tileEntityListTick.removeAll(toRemove); - // Paper end - //this.tileEntityList.removeAll(this.tileEntityListUnload); // Paper - remove unused list -+ */ -+ this.tileEntityListTick.removeAll(this.tileEntityListUnload); -+ // Airplane end - this.tileEntityListUnload.clear(); - } - -@@ -1023,19 +1116,19 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - - public void a(Consumer consumer, Entity entity) { - try { -- consumer.accept(entity); -+ consumer.accept(entity); // Airplane - error on change - } catch (Throwable throwable) { - if (throwable instanceof ThreadDeath) throw throwable; // Paper - // Paper start - Prevent tile entity and entity crashes - String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ(); - System.err.println(msg); - throwable.printStackTrace(); -- getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); -+ getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Airplane - error on change - entity.dead = true; - return; - // Paper end - } -- MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick -+ MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick // Airplane - error on change - } - // Paper start - Prevent armor stands from doing entity lookups - @Override -@@ -1721,6 +1814,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - } - - public GameProfilerFiller getMethodProfiler() { -+ if (gg.airplane.AirplaneConfig.disableMethodProfiler) return net.minecraft.util.profiling.GameProfilerDisabled.a; // Airplane - return (GameProfilerFiller) this.methodProfiler.get(); - } - -diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 7279893d599351785652279c8827fe0efbd72f12..96d7990c66bd569b1b5ee287c0238c7dbb4c503e 100644 ---- a/src/main/java/net/minecraft/world/level/block/Block.java -+++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -392,6 +392,7 @@ public class Block extends BlockBase implements IMaterial { - return this.d; - } - -+ /** currently seems to only return true for MOVING_PISTON and SCAFFOLDING */ public boolean isComplexHitbox() { return this.o(); } // Airplane - OBFHELPER - public boolean o() { - return this.aA; - } -diff --git a/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java -index 712596420af83e6e1b9d147ae2fd8d8a1f36e1b9..9c29fa3efac7e16df81b8a44934e3286bb37f1f6 100644 ---- a/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java -+++ b/src/main/java/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java -@@ -54,8 +54,14 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow { - if (worldserver.getLightLevel(blockposition.up()) >= 9) { - IBlockData iblockdata1 = this.getBlockData(); - -+ // Airplane start - use mutable position -+ BlockPosition.MutableBlockPosition blockposition1 = new BlockPosition.MutableBlockPosition(); - for (int i = 0; i < 4; ++i) { -+ blockposition1.setValues(blockposition).addValues(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1); -+ /* - BlockPosition blockposition1 = blockposition.b(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1); -+ */ -+ // Airplane end - - if (worldserver.getType(blockposition1).a(Blocks.DIRT) && c(iblockdata1, (IWorldReader) worldserver, blockposition1)) { - org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, worldserver.getType(blockposition1.up()).a(Blocks.SNOW))); // CraftBukkit -diff --git a/src/main/java/net/minecraft/world/level/block/BlockFire.java b/src/main/java/net/minecraft/world/level/block/BlockFire.java -index 70c32b7a53a1107cced3491ebac19b0eaf4fec2e..3f3e241f3b24d9df9d57760c5515ff021718065a 100644 ---- a/src/main/java/net/minecraft/world/level/block/BlockFire.java -+++ b/src/main/java/net/minecraft/world/level/block/BlockFire.java -@@ -340,13 +340,15 @@ public class BlockFire extends BlockFireAbstract { - return 0; - } else { - int i = 0; -- EnumDirection[] aenumdirection = EnumDirection.values(); -+ EnumDirection[] aenumdirection = EnumDirection.getValues(); // Airplane - don't allocate new array here - int j = aenumdirection.length; - -+ BlockPosition.MutableBlockPosition copy = new BlockPosition.MutableBlockPosition(); // Airplane - single allocation for this method - for (int k = 0; k < j; ++k) { -+ copy.setValues(blockposition); // Airplane - reset values - EnumDirection enumdirection = aenumdirection[k]; - // Paper start -- IBlockData iblockdata = iworldreader.getTypeIfLoaded(blockposition.shift(enumdirection)); -+ IBlockData iblockdata = iworldreader.getTypeIfLoaded(copy.mutableShift(enumdirection, 1)); // Airplane - mutable shift - if (iblockdata == null) { - continue; - } -diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java -index 111f62d0e5b40e945793b8f504f2c035c0884a6a..324b752c70e0bd7ea06caa98ec15cdd4e6ea40ae 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java -@@ -36,7 +36,7 @@ import org.bukkit.entity.HumanEntity; - - public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable - -- private NonNullList items; -+ private gg.airplane.structs.ItemListWithBitset items; // Airplane - protected float a; - protected float b; - public int viewingCount; -@@ -73,10 +73,34 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic - } - // CraftBukkit end - -+ private final boolean isNative = getClass().equals(TileEntityChest.class); // Airplane -+ - protected TileEntityChest(TileEntityTypes tileentitytypes) { - super(tileentitytypes); -+ // Airplane start -+ /* - this.items = NonNullList.a(27, ItemStack.b); -+ */ -+ this.items = new gg.airplane.structs.ItemListWithBitset(27); -+ // Airplane end -+ } -+ -+ // Airplane start -+ @Override -+ public boolean hasEmptySlot(EnumDirection enumdirection) { -+ return isNative ? !this.items.hasFullStacks() : super.hasEmptySlot(enumdirection); -+ } -+ -+ @Override -+ public boolean isCompletelyFull(EnumDirection enumdirection) { -+ return isNative ? this.items.hasFullStacks() && super.isCompletelyFull(enumdirection) : super.isCompletelyFull(enumdirection); -+ } -+ -+ @Override -+ public boolean isCompletelyEmpty(EnumDirection enumdirection) { -+ return isNative && this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection); - } -+ // Airplane end - - public TileEntityChest() { - this(TileEntityTypes.CHEST); -@@ -95,7 +119,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic - @Override - public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { - super.load(iblockdata, nbttagcompound); -- this.items = NonNullList.a(this.getSize(), ItemStack.b); -+ this.items = new gg.airplane.structs.ItemListWithBitset(this.getSize()); // Airplane - if (!this.b(nbttagcompound)) { - ContainerUtil.b(nbttagcompound, this.items); - } -@@ -295,7 +319,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic - - @Override - protected void a(NonNullList nonnulllist) { -- this.items = nonnulllist; -+ this.items = gg.airplane.structs.ItemListWithBitset.fromNonNullList(nonnulllist); // Airplane - } - - public static int a(IBlockAccess iblockaccess, BlockPosition blockposition) { -diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java -index 537dc52e5ff3325555ee6049bc7f277952983b76..056d280c7db6fc532d83b2a547d6a01402a49bd0 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java -@@ -46,7 +46,7 @@ import org.bukkit.inventory.Inventory; - - public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable { - -- private NonNullList items; -+ private gg.airplane.structs.ItemListWithBitset items; // Airplane - private int j; - private long k; - -@@ -82,14 +82,31 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - - public TileEntityHopper() { - super(TileEntityTypes.HOPPER); -- this.items = NonNullList.a(5, ItemStack.b); -+ this.items = new gg.airplane.structs.ItemListWithBitset(5); // Airplane - this.j = -1; - } - -+ // Airplane start -+ @Override -+ public boolean hasEmptySlot(EnumDirection enumdirection) { -+ return !this.items.hasFullStacks(); -+ } -+ -+ @Override -+ public boolean isCompletelyFull(EnumDirection enumdirection) { -+ return this.items.hasFullStacks() && super.isCompletelyFull(enumdirection); -+ } -+ -+ @Override -+ public boolean isCompletelyEmpty(EnumDirection enumdirection) { -+ return this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection); -+ } -+ // Airplane end -+ - @Override - public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { - super.load(iblockdata, nbttagcompound); -- this.items = NonNullList.a(this.getSize(), ItemStack.b); -+ this.items = new gg.airplane.structs.ItemListWithBitset(this.getSize()); // Airplane - if (!this.b(nbttagcompound)) { - ContainerUtil.b(nbttagcompound, this.items); - } -@@ -181,16 +198,19 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - } - - private boolean j() { -- Iterator iterator = this.items.iterator(); -+ // Airplane start - no iterator -+ //Iterator iterator = this.items.iterator(); -+ int i = 0; - - ItemStack itemstack; - - do { -- if (!iterator.hasNext()) { -+ if (i >= this.items.size()) { - return true; - } - -- itemstack = (ItemStack) iterator.next(); -+ itemstack = (ItemStack) this.items.get(i++); -+ // Airplane end - } while (!itemstack.isEmpty() && itemstack.getCount() == itemstack.getMaxStackSize()); - - return false; -@@ -205,7 +225,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - skipPushModeEventFire = skipHopperEvents; - boolean foundItem = false; - for (int i = 0; i < this.getSize(); ++i) { -- ItemStack item = this.getItem(i); -+ ItemStack item = this.getHopperItem(i); // Airplane - if (!item.isEmpty()) { - foundItem = true; - ItemStack origItemStack = item; -@@ -429,14 +449,14 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - private static boolean anyMatch(IInventory iinventory, EnumDirection enumdirection, java.util.function.BiPredicate test) { - if (iinventory instanceof IWorldInventory) { - for (int i : ((IWorldInventory) iinventory).getSlotsForFace(enumdirection)) { -- if (test.test(iinventory.getItem(i), i)) { -+ if (test.test(iinventory.getHopperItem(i), i)) { // Airplane - return true; - } - } - } else { - int size = iinventory.getSize(); - for (int i = 0; i < size; i++) { -- if (test.test(iinventory.getItem(i), i)) { -+ if (test.test(iinventory.getHopperItem(i), i)) { // Airplane - return true; - } - } -@@ -450,12 +470,22 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - - private boolean b(IInventory iinventory, EnumDirection enumdirection) { - // Paper start - no streams -+ // Airplane start - use direct method -+ /* - return allMatch(iinventory, enumdirection, STACK_SIZE_TEST); -+ */ -+ return iinventory.isCompletelyFull(enumdirection); -+ // Airplane end - // Paper end - } - - private static boolean c(IInventory iinventory, EnumDirection enumdirection) { -+ // Airplane start - use direct method -+ /* - return allMatch(iinventory, enumdirection, IS_EMPTY_TEST); -+ */ -+ return iinventory.isCompletelyEmpty(enumdirection); -+ // Airplane end - } - - public static boolean a(IHopper ihopper) { -@@ -594,7 +624,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - - if (a(iinventory1, itemstack, i, enumdirection)) { - boolean flag = false; -- boolean flag1 = iinventory1.isEmpty(); -+ boolean flag1 = iinventory1.isCompletelyEmpty(enumdirection); // Airplane - - if (itemstack1.isEmpty()) { - IGNORE_TILE_UPDATES = true; // Paper -@@ -677,7 +707,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - if (block instanceof IInventoryHolder) { - object = ((IInventoryHolder) block).a(iblockdata, world, blockposition); - } else if (block.isTileEntity()) { -- TileEntity tileentity = world.getTileEntity(blockposition); -+ TileEntity tileentity = ((net.minecraft.server.level.WorldServer) world).getAndCheckTileEntity(iblockdata, blockposition); // Airplane - skip validation check, since we already looked it up - - if (tileentity instanceof IInventory) { - object = (IInventory) tileentity; -@@ -736,7 +766,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - - @Override - protected void a(NonNullList nonnulllist) { -- this.items = nonnulllist; -+ this.items = gg.airplane.structs.ItemListWithBitset.fromNonNullList(nonnulllist); // Airplane - } - - public void a(Entity entity) { -diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java -index f0da819627035bed83561128a11059424d2b7e30..36ef5b11f12da1a7e3c8031ec84d28ba22d59a5c 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java -@@ -98,7 +98,11 @@ public abstract class TileEntityLootable extends TileEntityContainer { - public boolean isEmpty() { - this.d((EntityHuman) null); - // Paper start -- for (ItemStack itemStack : this.f()) { -+ // Airplane start - don't use abstract iterator -+ java.util.List list = this.f(); -+ for (int i = 0, size = list.size(); i < size; i++) { -+ ItemStack itemStack = list.get(i); -+ // Airplane end - if (!itemStack.isEmpty()) { - return false; - } -@@ -107,6 +111,13 @@ public abstract class TileEntityLootable extends TileEntityContainer { - return true; - } - -+ // Airplane start - skip loot check for hoppers -+ @Override -+ public final ItemStack getHopperItem(int index) { -+ return this.f().get(index); -+ } -+ // Airplane end -+ - @Override - public ItemStack getItem(int i) { - if (i == 0) this.d((EntityHuman) null); // Paper -diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java -index fc07e2014e961da5d97095c4ee6f972e2ece3ec3..8f5809756b4fb358f1207c1d61c5cbe6df3fff00 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java -+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java -@@ -99,6 +99,18 @@ public class Chunk implements IChunkAccess { - private final ChunkCoordIntPair loc; public final long coordinateKey; public final int locX; public final int locZ; // Paper - cache coordinate key - private volatile boolean x; - -+ // Airplane start - instead of using a random every time the chunk is ticked, define when lightning strikes preemptively -+ private int lightningTick; -+ // shouldDoLightning compiles down to 29 bytes, which with the default of 35 byte inlining should guarantee an inline -+ public final boolean shouldDoLightning(java.util.Random random) { -+ if (this.lightningTick-- <= 0) { -+ this.lightningTick = random.nextInt(100000) << 1; -+ return true; -+ } -+ return false; -+ } -+ // Airplane end -+ - public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage) { - this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null); - } -@@ -333,6 +345,7 @@ public class Chunk implements IChunkAccess { - // CraftBukkit start - this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this); - this.entitySlicesManager = new com.tuinity.tuinity.world.ChunkEntitySlices(this.world, this.loc.x, this.loc.z, 0, 15); // TODO update for 1.17 // Tuinity -+ this.lightningTick = this.world.random.nextInt(100000) << 1; // Airplane - initialize lightning tick - } - - public org.bukkit.Chunk bukkitChunk; -diff --git a/src/main/java/net/minecraft/world/level/chunk/DataPaletteBlock.java b/src/main/java/net/minecraft/world/level/chunk/DataPaletteBlock.java -index a6937366cd9c9d708edb5cd1ab3ac096e7b2032e..a579c5bf9e20c74aa3bf8ef6bc00576409805ca6 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/DataPaletteBlock.java -+++ b/src/main/java/net/minecraft/world/level/chunk/DataPaletteBlock.java -@@ -235,12 +235,16 @@ public class DataPaletteBlock implements DataPaletteExpandable { - this.b(); - } - -+ // Airplane start - add parameter for reusing aint - public synchronized void a(NBTTagCompound nbttagcompound, String s, String s1) { // Paper - synchronize -+ a(nbttagcompound, s, s1, new int[4096]); -+ } -+ public synchronized void a(NBTTagCompound nbttagcompound, String s, String s1, int[] aint) { // Paper - synchronize // Airplane end - this.a(); - DataPaletteHash datapalettehash = new DataPaletteHash<>(this.d, this.i, this.c, this.e, this.f); - T t0 = this.g; - int i = datapalettehash.a(this.g); -- int[] aint = new int[4096]; -+ //int[] aint = new int[4096]; // Airplane - use parameter - - for (int j = 0; j < 4096; ++j) { - T t1 = this.a(j); -diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java -index ec2b238480413ba9c123d9ddeaa787d9520e1b74..bf96f9e538fc29ca914536e8a7ce727ebe43a8b2 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java -+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkRegionLoader.java -@@ -468,6 +468,7 @@ public class ChunkRegionLoader { - public static NBTTagCompound saveChunk(WorldServer worldserver, IChunkAccess ichunkaccess) { - return saveChunk(worldserver, ichunkaccess, null); - } -+ private static final ThreadLocal paletteArray = ThreadLocal.withInitial(() -> new int[4096]); // Airplane - public static NBTTagCompound saveChunk(WorldServer worldserver, IChunkAccess ichunkaccess, AsyncSaveData asyncsavedata) { - // Paper end - // Tuinity start - rewrite light impl -@@ -498,6 +499,7 @@ public class ChunkRegionLoader { - - NBTTagCompound nbttagcompound2; - -+ int[] aint = paletteArray.get(); // Airplane - use cached - for (int i = -1; i < 17; ++i) { // Paper - conflict on loop parameter change - int finalI = i; // CraftBukkit - decompile errors - ChunkSection chunksection = (ChunkSection) Arrays.stream(achunksection).filter((chunksection1) -> { -@@ -518,7 +520,7 @@ public class ChunkRegionLoader { - nbttagcompound2 = new NBTTagCompound(); - nbttagcompound2.setByte("Y", (byte) (i & 255)); - if (chunksection != Chunk.a) { -- chunksection.getBlocks().a(nbttagcompound2, "Palette", "BlockStates"); -+ chunksection.getBlocks().a(nbttagcompound2, "Palette", "BlockStates", aint); // Airplane - } - - if (nibblearray != null && !nibblearray.c()) { -diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java -index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..3b8fa837db21c5f67eab2ff8752e906ea97c288d 100644 ---- a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java -+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java -@@ -45,6 +45,8 @@ public abstract class FluidTypeFlowing extends FluidType { - - public static final BlockStateBoolean FALLING = BlockProperties.i; - public static final BlockStateInteger LEVEL = BlockProperties.at; -+ // Airplane start - use our own threadlocal cache -+ /* - private static final ThreadLocal> e = ThreadLocal.withInitial(() -> { - Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap = new Object2ByteLinkedOpenHashMap(200) { - protected void rehash(int i) {} -@@ -53,6 +55,13 @@ public abstract class FluidTypeFlowing extends FluidType { - object2bytelinkedopenhashmap.defaultReturnValue((byte) 127); - return object2bytelinkedopenhashmap; - }); -+ */ -+ private static final ThreadLocal> localFluidDirectionCache = ThreadLocal.withInitial(() -> { -+ // Airplane todo - mess with this number for performance -+ // with 2048 it seems very infrequent on a small world that it has to remove old entries -+ return new gg.airplane.structs.FluidDirectionCache<>(2048); -+ }); -+ // Airplane end - private final Map f = Maps.newIdentityHashMap(); - - public FluidTypeFlowing() {} -@@ -240,6 +249,8 @@ public abstract class FluidTypeFlowing extends FluidType { - } - - private boolean a(EnumDirection enumdirection, IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, BlockPosition blockposition1, IBlockData iblockdata1) { -+ // Airplane start - modify to use our cache -+ /* - Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap; - - if (!iblockdata.getBlock().o() && !iblockdata1.getBlock().o()) { -@@ -247,9 +258,16 @@ public abstract class FluidTypeFlowing extends FluidType { - } else { - object2bytelinkedopenhashmap = null; - } -+ */ -+ gg.airplane.structs.FluidDirectionCache cache = null; -+ -+ if (!iblockdata.getBlock().isComplexHitbox() && !iblockdata1.getBlock().isComplexHitbox()) { -+ cache = localFluidDirectionCache.get(); -+ } - - Block.a block_a; - -+ /* - if (object2bytelinkedopenhashmap != null) { - block_a = new Block.a(iblockdata, iblockdata1, enumdirection); - byte b0 = object2bytelinkedopenhashmap.getAndMoveToFirst(block_a); -@@ -260,11 +278,22 @@ public abstract class FluidTypeFlowing extends FluidType { - } else { - block_a = null; - } -+ */ -+ if (cache != null) { -+ block_a = new Block.a(iblockdata, iblockdata1, enumdirection); -+ Boolean flag = cache.getValue(block_a); -+ if (flag != null) { -+ return flag; -+ } -+ } else { -+ block_a = null; -+ } - - VoxelShape voxelshape = iblockdata.getCollisionShape(iblockaccess, blockposition); - VoxelShape voxelshape1 = iblockdata1.getCollisionShape(iblockaccess, blockposition1); - boolean flag = !VoxelShapes.b(voxelshape, voxelshape1, enumdirection); - -+ /* - if (object2bytelinkedopenhashmap != null) { - if (object2bytelinkedopenhashmap.size() == 200) { - object2bytelinkedopenhashmap.removeLastByte(); -@@ -272,6 +301,11 @@ public abstract class FluidTypeFlowing extends FluidType { - - object2bytelinkedopenhashmap.putAndMoveToFirst(block_a, (byte) (flag ? 1 : 0)); - } -+ */ -+ if (cache != null) { -+ cache.putValue(block_a, flag); -+ } -+ // Airplane end - - return flag; - } -diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java -index 95d0c9f22d79194ca83ca6f6a8e6d91180a3c8da..20cc04be75ab202d4c4ee9a07e9876ceff8422ca 100644 ---- a/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java -+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootTableInfo.java -@@ -43,8 +43,8 @@ public class LootTableInfo { - this.world = worldserver; - this.d = function; - this.f = function1; -- this.h = ImmutableMap.copyOf(map); -- this.i = ImmutableMap.copyOf(map1); -+ this.h = java.util.Collections.unmodifiableMap(map); // Airplane -+ this.i = java.util.Collections.unmodifiableMap(map1); // Airplane - } - - public boolean hasContextParameter(LootContextParameter lootcontextparameter) { -@@ -62,7 +62,7 @@ public class LootTableInfo { - - @Nullable - public T getContextParameter(LootContextParameter lootcontextparameter) { -- return this.h.get(lootcontextparameter); -+ return (T) this.h.get(lootcontextparameter); // Airplane - compile error - } - - public boolean a(LootTable loottable) { -@@ -216,7 +216,7 @@ public class LootTableInfo { - } - - public T a(LootContextParameter lootcontextparameter) { -- T t0 = this.b.get(lootcontextparameter); -+ T t0 = (T) this.b.get(lootcontextparameter); // Airplane - compile error - - if (t0 == null) { - throw new IllegalArgumentException("No parameter " + lootcontextparameter); -@@ -227,7 +227,7 @@ public class LootTableInfo { - - @Nullable - public T b(LootContextParameter lootcontextparameter) { -- return this.b.get(lootcontextparameter); -+ return (T) this.b.get(lootcontextparameter); // Airplane - compile error - } - - public LootTableInfo build(LootContextParameterSet lootcontextparameterset) { -diff --git a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java -index dcb3e4b0cf34699ed77208f8122710bbdfa3d063..dbb6a68eea01a3484f2ac862745b57d1d832b80c 100644 ---- a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java -+++ b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java -@@ -23,18 +23,22 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision { - }; - private final boolean b; - private final double c; -- private final Item d; -- private final Predicate e; -+ private Item d; // Airplane -+ private Entity entity; // Airplane -+ private Predicate e; // Airplane - - protected VoxelShapeCollisionEntity(boolean flag, double d0, Item item, Predicate predicate) { - this.b = flag; - this.c = d0; - this.d = item; - this.e = predicate; -+ this.entity = null; // Airplane - } - - @Deprecated - protected VoxelShapeCollisionEntity(Entity entity) { -+ // Airplane start - compile fixes -+ /* - boolean flag = entity.by(); - double d0 = entity.locY(); - Item item = entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR; -@@ -50,17 +54,27 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision { - return false; - }; - } -+ */ - -- this(flag, d0, item, predicate); -+ this( -+ entity.by(), -+ entity.locY(), -+ null, //entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR, // Airplane - lazy -+ null //entity instanceof EntityLiving ? ((EntityLiving) entity)::a : (fluidtype) -> false -+ ); -+ this.entity = entity; -+ // Airplane end - } - - @Override - public boolean a(Item item) { -+ if (this.d == null) this.d = this.entity instanceof EntityLiving ? ((EntityLiving) this.entity).getItemInMainHand().getItem() : Items.AIR; // Airplane - return this.d == item; - } - - @Override - public boolean a(Fluid fluid, FluidTypeFlowing fluidtypeflowing) { -+ if (this.e == null) return this.entity instanceof EntityLiving && ((EntityLiving) this.entity).a(fluidtypeflowing); // Airplane - return this.e.test(fluidtypeflowing) && !fluid.getType().a((FluidType) fluidtypeflowing); - } - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 507c5255542ba1b958470b4db2c35b1b0b779f17..eab5bd32860d136864ca8f74be264236cf530910 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -230,7 +230,7 @@ import javax.annotation.Nullable; // Paper - import javax.annotation.Nonnull; // Paper - - public final class CraftServer implements Server { -- private final String serverName = "Tuinity"; // Paper // Tuinity -+ private final String serverName = "Airplane"; // Paper // Tuinity // Airplane - private final String serverVersion; - private final String bukkitVersion = Versioning.getBukkitVersion(); - private final Logger logger = Logger.getLogger("Minecraft"); -@@ -994,6 +994,11 @@ public final class CraftServer implements Server { - plugin.getDescription().getName(), - "This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies." - )); -+ getLogger().log(Level.SEVERE, String.format("%s Stacktrace", worker.getThread().getName())); -+ StackTraceElement[] stackTrace = worker.getThread().getStackTrace(); -+ for (StackTraceElement element : stackTrace) { -+ getLogger().log(Level.SEVERE, " " + element.toString()); -+ } - } - } - // Paper end -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java -index de9c5ed6b03a290fe77eec719f0079fd7bd9b7f5..8c02f6fdffb59153712a3be778f9c454fd87b73b 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java -@@ -44,6 +44,6 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe - data.set(i, toNMS(ingred.get(i), true)); - } - -- MinecraftServer.getServer().getCraftingManager().addRecipe(new ShapelessRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), CraftItemStack.asNMSCopy(this.getResult()), data)); -+ MinecraftServer.getServer().getCraftingManager().addRecipe(new ShapelessRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), CraftItemStack.asNMSCopy(this.getResult()), data, true)); // Airplane - } - } -diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java -index 49dc0c441b9dd7e7745cf15ced67f383ebee1f99..b343d8ee7435312929558efdaf127334d8e2fff6 100644 ---- a/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java -+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java -@@ -19,7 +19,8 @@ public class MinecraftInternalPlugin extends PluginBase { - private boolean enabled = true; - - private final String pluginName; -- private PluginDescriptionFile pdf; -+ private org.bukkit.plugin.PluginLogger logger; -+ private PluginDescriptionFile pdf; // Airplane - - public MinecraftInternalPlugin() { - this.pluginName = "Minecraft"; -@@ -72,7 +73,12 @@ public class MinecraftInternalPlugin extends PluginBase { - - @Override - public PluginLogger getLogger() { -- throw new UnsupportedOperationException("Not supported."); -+ // Airplane start -+ if (this.logger == null) { -+ this.logger = new org.bukkit.plugin.PluginLogger(this); // Airplane -+ } -+ return this.logger; -+ // Airplane end - } - - @Override -@@ -82,7 +88,7 @@ public class MinecraftInternalPlugin extends PluginBase { - - @Override - public Server getServer() { -- throw new UnsupportedOperationException("Not supported."); -+ return org.bukkit.Bukkit.getServer(); // Airplane - impl - } - - @Override -diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -index 001b1e5197eaa51bfff9031aa6c69876c9a47960..1788d79ea489e446d3d9f541693d4ba3dfc26015 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -@@ -11,7 +11,7 @@ public final class Versioning { - public static String getBukkitVersion() { - String result = "Unknown-Version"; - -- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.tuinity/tuinity-api/pom.properties"); // Tuinity -+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/gg.airplane/airplane-api/pom.properties"); // Tuinity // Airplane - Properties properties = new Properties(); - - if (stream != null) { -diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 5c2eaca0bc63c7880ee928aba6a24761737aa649..94910bf0c53c79588c55b89e4a023273d6c859ef 100644 ---- a/src/main/java/org/spigotmc/ActivationRange.java -+++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -47,6 +47,9 @@ import net.minecraft.world.entity.schedule.Activity; - import net.minecraft.world.entity.item.EntityFallingBlock; - import net.minecraft.world.entity.projectile.EntityEnderSignal; - // Paper end -+// Airplane start -+import net.minecraft.world.phys.Vec3D; -+// Airplane end - - public class ActivationRange - { -@@ -227,7 +230,7 @@ public class ActivationRange - Chunk chunk = chunkProvider.getChunkAtIfLoadedMainThreadNoCache( i1, j1 ); // Paper - if ( chunk != null ) - { -- activateChunkEntities( chunk ); -+ activateChunkEntities( chunk, player.getPositionVector() ); // Airplane - } - } - } -@@ -240,7 +243,7 @@ public class ActivationRange - * - * @param chunk - */ -- private static void activateChunkEntities(Chunk chunk) -+ private static void activateChunkEntities(Chunk chunk, Vec3D playerVec) // Airplane - add player location - { - // Paper start - Entity[] rawData = chunk.entities.getRawData(); -@@ -249,6 +252,15 @@ public class ActivationRange - //for ( Entity entity : (Collection) slice ) - // Paper end - { -+ // Airplane start -+ Vec3D entityVec = entity.getPositionVector(); -+ double diffX = playerVec.x - entityVec.x, diffY = playerVec.y - entityVec.y, diffZ = playerVec.z - entityVec.z; -+ int squaredDistance = (int) (diffX * diffX + diffY * diffY + diffZ * diffZ); -+ entity.activatedPriority = squaredDistance > gg.airplane.AirplaneConfig.startDistanceSquared ? -+ Math.max(1, Math.min(squaredDistance >> gg.airplane.AirplaneConfig.activationDistanceMod, gg.airplane.AirplaneConfig.maximumActivationPrio)) : -+ 1; -+ // Airplane end -+ - if (MinecraftServer.currentTick > entity.activatedTick) { - if (entity.defaultActivationState || entity.activationType.boundingBox.c(entity.getBoundingBox())) { // Paper - entity.activatedTick = MinecraftServer.currentTick; -@@ -297,7 +309,7 @@ public class ActivationRange - if ( entity instanceof EntityLiving ) - { - EntityLiving living = (EntityLiving) entity; -- if ( living.isClimbing() || living.jumping || living.hurtTicks > 0 || living.effects.size() > 0 ) // Paper -+ if ( living.isClimbingCached() || living.jumping || living.hurtTicks > 0 || living.effects.size() > 0 ) // Paper // Airplane - use cached climbing - { - return 1; // Paper - } diff --git a/patches/server/0003-Rebrand.patch b/patches/server/0002-Rebrand.patch similarity index 97% rename from patches/server/0003-Rebrand.patch rename to patches/server/0002-Rebrand.patch index 29845db66..accedd374 100644 --- a/patches/server/0003-Rebrand.patch +++ b/patches/server/0002-Rebrand.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Rebrand diff --git a/pom.xml b/pom.xml -index efa2ea6b8422f900643eb2f0f65cf067c034cea3..5136762f8e95cb1ea2564b6801703fb6f019fbe1 100644 +index 642ee96ead8176f5c5a811946b050f4fa5dab6e2..3ef0a08b7a38040e43670d18dc6c5542f9fbb9bb 100644 --- a/pom.xml +++ b/pom.xml @@ -39,8 +39,10 @@ -- gg.airplane -- airplane-api +- com.tuinity +- tuinity-api + + net.pl3x.purpur + purpur-api @@ -21,7 +21,7 @@ index efa2ea6b8422f900643eb2f0f65cf067c034cea3..5136762f8e95cb1ea2564b6801703fb6 ${project.version} compile -@@ -209,6 +211,14 @@ +@@ -195,6 +197,14 @@ @@ -36,7 +36,7 @@ index efa2ea6b8422f900643eb2f0f65cf067c034cea3..5136762f8e95cb1ea2564b6801703fb6 tuinity-${minecraft.version} -@@ -414,8 +424,15 @@ +@@ -400,8 +410,15 @@ org.eclipse.jdt ecj @@ -66,18 +66,6 @@ index ad87b575a0261200b280884e054a59e3ce59c41c..e56ebeaaa12494817d31099eed54ef2c .variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history")) .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); -diff --git a/src/main/java/gg/airplane/compat/ServerConfigurations.java b/src/main/java/gg/airplane/compat/ServerConfigurations.java -index f4976428bc721319d2926e97cbe0f64c6e9e503c..044ad28bd1fd1c1e25061f9f811fc10baf7f5f72 100644 ---- a/src/main/java/gg/airplane/compat/ServerConfigurations.java -+++ b/src/main/java/gg/airplane/compat/ServerConfigurations.java -@@ -23,6 +23,7 @@ public class ServerConfigurations { - "spigot.yml", - "paper.yml", - "tuinity.yml", -+ "purpur.yml", // Purpur - "airplane.air" - }; - diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java index 3bc5cd1e53dd7c94b948e7f57f0dc8e073e349b0..87891161f5b06bb8be0e2016b490484e6daca9d7 100644 --- a/src/main/java/net/minecraft/server/EULA.java @@ -92,23 +80,23 @@ index 3bc5cd1e53dd7c94b948e7f57f0dc8e073e349b0..87891161f5b06bb8be0e2016b490484e throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 26f423d3fdc958764758573043310f84da08a08e..c599ea5e102360be0322931735f3a0313727faa4 100644 +index 6f90a4182e008b49a4b3328e569311382e4bec0d..b02affc621f1960302d8d40426e676a319b0c227 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1650,7 +1650,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant // Spigot - Spigot > // CraftBukkit - cb > vanilla! -+ return "Purpur"; // Purpur // Airplane // Tuinity // Paper // Spigot // CraftBukkit +- return "Tuinity"; // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! ++ return "Purpur"; // Purpur // Tuinity // Paper // Spigot // CraftBukkit } public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 0d27af452fc6a72646a4a168fc827fed5072fab9..3e21bd029131ceeaac9cb46bef8d238617ca76ea 100644 +index 3713a110a64fa686e785b9789c33dd09cacc2f48..10dcc34738378d416d4fae1875bcc26796e9d67f 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -277,11 +277,12 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -275,11 +275,12 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware."); // Spigot start @@ -249,15 +237,15 @@ index 0000000000000000000000000000000000000000..cabfcebf9f944f7a2a2a1cffc7401435 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index eab5bd32860d136864ca8f74be264236cf530910..120fe39467a582bbc2db8096b110497052e43977 100644 +index 507c5255542ba1b958470b4db2c35b1b0b779f17..967473b7109dc78b1b682c342929e40854b2517c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -230,7 +230,7 @@ import javax.annotation.Nullable; // Paper import javax.annotation.Nonnull; // Paper public final class CraftServer implements Server { -- private final String serverName = "Airplane"; // Paper // Tuinity // Airplane -+ private final String serverName = "Purpur"; // Paper // Tuinity // Airplane // Purpur +- private final String serverName = "Tuinity"; // Paper // Tuinity ++ private final String serverName = "Purpur"; // Paper // Tuinity // Purpur private final String serverVersion; private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); @@ -275,15 +263,15 @@ index 6cb8608f8238c4a8c346b92ba672c8cc1c0cbcc4..3fa4d18d7a1e2d351fbe8e02d1e74958 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -index 1788d79ea489e446d3d9f541693d4ba3dfc26015..191f5331f0c7871f80f0da9cc38345ce33353577 100644 +index 001b1e5197eaa51bfff9031aa6c69876c9a47960..13b98439320ac1401a920c01d7cf5a4b3a23deff 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java @@ -11,7 +11,7 @@ public final class Versioning { public static String getBukkitVersion() { String result = "Unknown-Version"; -- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/gg.airplane/airplane-api/pom.properties"); // Tuinity // Airplane -+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.pl3x.purpur/purpur-api/pom.properties"); // Tuinity // Airplane // Purpur +- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.tuinity/tuinity-api/pom.properties"); // Tuinity ++ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.pl3x.purpur/purpur-api/pom.properties"); // Tuinity // Purpur Properties properties = new Properties(); if (stream != null) { diff --git a/patches/server/0004-Purpur-config-files.patch b/patches/server/0003-Purpur-config-files.patch similarity index 94% rename from patches/server/0004-Purpur-config-files.patch rename to patches/server/0003-Purpur-config-files.patch index fbd4fb9b6..e5dad3005 100644 --- a/patches/server/0004-Purpur-config-files.patch +++ b/patches/server/0003-Purpur-config-files.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Purpur config files diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index b480bd3044370b8eb733166f0c4b737344475993..4d8740678049aa749b42618470e9cc838555528d 100644 +index 52c0ab1ce46e1f3233ef746d9bc699356fa9fae4..4d8740678049aa749b42618470e9cc838555528d 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java @@ -593,7 +593,7 @@ public class Metrics { boolean logFailedRequests = config.getBoolean("logFailedRequests", false); // Only start Metrics, if it's enabled in the config if (config.getBoolean("enabled", true)) { -- Metrics metrics = new Metrics("Airplane", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page // Airplane +- Metrics metrics = new Metrics("Tuinity", serverUUID, logFailedRequests, Bukkit.getLogger()); // Tuinity - we have our own bstats page + Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Purpur metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> { @@ -22,14 +22,14 @@ index b480bd3044370b8eb733166f0c4b737344475993..4d8740678049aa749b42618470e9cc83 metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size())); - metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() || PaperConfig.isProxyOnlineMode() ? "online" : "offline")); -- metrics.addCustomChart(new Metrics.SimplePie("airplane_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page // Airplane +- metrics.addCustomChart(new Metrics.SimplePie("tuinity_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Tuinity - we have our own bstats page + metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (PaperConfig.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur + metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (Metrics.class.getPackage().getImplementationVersion() != null) ? Metrics.class.getPackage().getImplementationVersion() : "unknown")); // Purpur metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> { Map> map = new HashMap<>(); diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 14ac28d4d6b1ab0f0a70dfefc589f7723a1d2e1a..4eb122cfd31902df9789d2e8ff2615207a65ab06 100644 +index efc1e42d606e1c9feb1a4871c0714933ae92a1b2..a0ed8ed1d6b89a4f10dff645e09eaff303fb3f8a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -118,6 +118,11 @@ public class PaperConfig { @@ -45,7 +45,7 @@ index 14ac28d4d6b1ab0f0a70dfefc589f7723a1d2e1a..4eb122cfd31902df9789d2e8ff261520 config.save(CONFIG_FILE); } catch (IOException ex) { diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 3e21bd029131ceeaac9cb46bef8d238617ca76ea..c2932e739a607e4ed3f94632ca45bdb2b0954ecb 100644 +index 10dcc34738378d416d4fae1875bcc26796e9d67f..69888acd1932fd896245e77ce58b53b8cdaf202c 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -212,6 +212,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -65,10 +65,10 @@ index 3e21bd029131ceeaac9cb46bef8d238617ca76ea..c2932e739a607e4ed3f94632ca45bdb2 io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider // Paper end diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index d1591f8d0b45126acef5d24ddb41d76293f5b42d..b67914145517bd027f297cc4358d287b6899919f 100644 +index cb8064df7e9f1b8b4d4292486e2193680d83663c..22d91a970c7376aa6349bb6cd9cb174e89bc8a09 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -158,6 +158,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -155,6 +155,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config @@ -76,7 +76,7 @@ index d1591f8d0b45126acef5d24ddb41d76293f5b42d..b67914145517bd027f297cc4358d287b public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPosition lastPhysicsProblem; // Spigot -@@ -257,6 +258,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -254,6 +255,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config @@ -357,7 +357,7 @@ index 0000000000000000000000000000000000000000..536955124afaec5c8a070249c7432cb9 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 120fe39467a582bbc2db8096b110497052e43977..522b4ca2e981ea27cb5cc95ab645c08afe16008d 100644 +index 967473b7109dc78b1b682c342929e40854b2517c..e0a11fe20a38e52ed008f9389ed7218825a8ee27 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -881,6 +881,7 @@ public final class CraftServer implements Server { @@ -384,7 +384,7 @@ index 120fe39467a582bbc2db8096b110497052e43977..522b4ca2e981ea27cb5cc95ab645c08a overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2389,6 +2392,18 @@ public final class CraftServer implements Server { +@@ -2384,6 +2387,18 @@ public final class CraftServer implements Server { } // Tuinity end - add config to timings report diff --git a/patches/server/0005-Timings-stuff.patch b/patches/server/0004-Timings-stuff.patch similarity index 100% rename from patches/server/0005-Timings-stuff.patch rename to patches/server/0004-Timings-stuff.patch diff --git a/patches/server/0006-Barrels-and-enderchests-6-rows.patch b/patches/server/0005-Barrels-and-enderchests-6-rows.patch similarity index 100% rename from patches/server/0006-Barrels-and-enderchests-6-rows.patch rename to patches/server/0005-Barrels-and-enderchests-6-rows.patch diff --git a/patches/server/0007-Advancement-API.patch b/patches/server/0006-Advancement-API.patch similarity index 100% rename from patches/server/0007-Advancement-API.patch rename to patches/server/0006-Advancement-API.patch diff --git a/patches/server/0008-Llama-API.patch b/patches/server/0007-Llama-API.patch similarity index 100% rename from patches/server/0008-Llama-API.patch rename to patches/server/0007-Llama-API.patch diff --git a/patches/server/0009-AFK-API.patch b/patches/server/0008-AFK-API.patch similarity index 96% rename from patches/server/0009-AFK-API.patch rename to patches/server/0008-AFK-API.patch index 9c07d5e4a..b84de3fb6 100644 --- a/patches/server/0009-AFK-API.patch +++ b/patches/server/0008-AFK-API.patch @@ -64,10 +64,10 @@ index 32e400632ec1e61374f772c6262580f84a5b2288..aee1946f96ec6007caef63b2183c5218 return this.serverStatisticManager; } diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 1553be4263f08ae21447ccf2e19e8a30a2932208..74fb9386ca2a0cfe970a9f74977b8128d3c2bf30 100644 +index 6fc215df5ed3aa6ef0c23a57e8444602ff9309e8..a97b8d8116920237964cc3a887525f8c3804c640 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java -@@ -1018,7 +1018,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1002,7 +1002,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit end if (this.everyoneSleeping && this.players.stream().noneMatch((entityplayer) -> { @@ -76,7 +76,7 @@ index 1553be4263f08ae21447ccf2e19e8a30a2932208..74fb9386ca2a0cfe970a9f74977b8128 })) { // CraftBukkit start long l = this.worldData.getDayTime() + 24000L; -@@ -1384,7 +1384,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1345,7 +1345,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -150,10 +150,10 @@ index f5e32faeb6d937cf90b1f3ea251b5cfc91f2338d..f9908fb7cc27a8947030c2100dccf1dc // Paper start public static final Predicate affectsSpawning = (entity) -> { diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index 5f9e64df007ebc40f7bcb50be495b10e51d5b87a..17e6f476e60a4f5dc278894a0a874ca5ae45ee22 100644 +index 5bce47fa8f191bc1d33c04c9865cb0efd492a9a2..afa14eddb6a21d4747689af6d70551f10d304be7 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -182,6 +182,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -181,6 +181,15 @@ public abstract class EntityHuman extends EntityLiving { } // CraftBukkit end @@ -289,10 +289,10 @@ index ed1bb89ae7b85bf4017315d6189d6cbf595aefe5..f3fb405c92a35796baa30cafcd96df2d + // Purpur end } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 94910bf0c53c79588c55b89e4a023273d6c859ef..a57473fb8815545977ff08bf46d6463d2b7a9d78 100644 +index 5c2eaca0bc63c7880ee928aba6a24761737aa649..2bbbd4a7ae87c2ead3dc2fd5520adfaefe2776b8 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -207,6 +207,7 @@ public class ActivationRange +@@ -204,6 +204,7 @@ public class ActivationRange { player.activatedTick = MinecraftServer.currentTick; diff --git a/patches/server/0010-Bring-back-server-name.patch b/patches/server/0009-Bring-back-server-name.patch similarity index 91% rename from patches/server/0010-Bring-back-server-name.patch rename to patches/server/0009-Bring-back-server-name.patch index af51d92ea..a2981838e 100644 --- a/patches/server/0010-Bring-back-server-name.patch +++ b/patches/server/0009-Bring-back-server-name.patch @@ -17,10 +17,10 @@ index 1fab9b9c7d41a0d2a551096c2c15f741a887fa2d..f33309f4c1ad92960d0634f3f5b8105c public final boolean spawnNpcs = this.getBoolean("spawn-npcs", true); public final boolean pvp = this.getBoolean("pvp", true); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 522b4ca2e981ea27cb5cc95ab645c08afe16008d..59b84c5878a1f6be8fb72c6e8dc30cc24ccb0832 100644 +index e0a11fe20a38e52ed008f9389ed7218825a8ee27..441a3cbe6321b289f95ea0a269d98d045d4fdffa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2558,4 +2558,11 @@ public final class CraftServer implements Server { +@@ -2553,4 +2553,11 @@ public final class CraftServer implements Server { } // Paper end diff --git a/patches/server/0011-Configurable-server-mod-name.patch b/patches/server/0010-Configurable-server-mod-name.patch similarity index 86% rename from patches/server/0011-Configurable-server-mod-name.patch rename to patches/server/0010-Configurable-server-mod-name.patch index f6ec95f54..9cf983bce 100644 --- a/patches/server/0011-Configurable-server-mod-name.patch +++ b/patches/server/0010-Configurable-server-mod-name.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Configurable server mod name diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c599ea5e102360be0322931735f3a0313727faa4..3ea278e3c407249f2aa8693e10889292ced7bfaf 100644 +index b02affc621f1960302d8d40426e676a319b0c227..2f3d6acf497b6fa6b497a1b94ba96977ce2e6008 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1650,7 +1650,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant drops = new ArrayList(); public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes; -@@ -322,8 +323,8 @@ public abstract class EntityLiving extends Entity { +@@ -321,8 +322,8 @@ public abstract class EntityLiving extends Entity { this.cR(); } @@ -27,7 +27,7 @@ index a49dbcffecc971f797651984cb72c455d40f9331..bb030f5b258d82a1a3e60151b42a113b if (!iblockdata.isAir()) { double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D); -@@ -1803,7 +1804,7 @@ public abstract class EntityLiving extends Entity { +@@ -1787,7 +1788,7 @@ public abstract class EntityLiving extends Entity { MobEffect mobeffect = this.getEffect(MobEffects.JUMP); float f2 = mobeffect == null ? 0.0F : (float) (mobeffect.getAmplifier() + 1); diff --git a/patches/server/0013-Lagging-threshold.patch b/patches/server/0012-Lagging-threshold.patch similarity index 91% rename from patches/server/0013-Lagging-threshold.patch rename to patches/server/0012-Lagging-threshold.patch index c0af1c626..0869ea358 100644 --- a/patches/server/0013-Lagging-threshold.patch +++ b/patches/server/0012-Lagging-threshold.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3ea278e3c407249f2aa8693e10889292ced7bfaf..5602995edc049c6fdb751d443a73cb36faead1b3 100644 +index 2f3d6acf497b6fa6b497a1b94ba96977ce2e6008..991ac5baf3f10631edb0e60d17c714af1f406a29 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -280,6 +280,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { +@@ -274,6 +274,16 @@ public class EntityTypes { return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s)); } @@ -25,7 +25,7 @@ index 7f70dda656ff9d802200f18139d2695e58c551c7..e858e41e046665016327f0ef3f19cf5d public static MinecraftKey getName(EntityTypes entitytypes) { return IRegistry.ENTITY_TYPE.getKey(entitytypes); } -@@ -441,6 +451,16 @@ public class EntityTypes { +@@ -439,6 +449,16 @@ public class EntityTypes { return this.bg; } @@ -42,7 +42,7 @@ index 7f70dda656ff9d802200f18139d2695e58c551c7..e858e41e046665016327f0ef3f19cf5d public String getDescriptionId() { return f(); } // Paper - OBFHELPER public String f() { if (this.bo == null) { -@@ -450,6 +470,7 @@ public class EntityTypes { +@@ -448,6 +468,7 @@ public class EntityTypes { return this.bo; } diff --git a/patches/server/0016-EMC-MonsterEggSpawnEvent.patch b/patches/server/0015-EMC-MonsterEggSpawnEvent.patch similarity index 95% rename from patches/server/0016-EMC-MonsterEggSpawnEvent.patch rename to patches/server/0015-EMC-MonsterEggSpawnEvent.patch index fd52ae2e5..86429a61c 100644 --- a/patches/server/0016-EMC-MonsterEggSpawnEvent.patch +++ b/patches/server/0015-EMC-MonsterEggSpawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] EMC - MonsterEggSpawnEvent diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java -index e858e41e046665016327f0ef3f19cf5db765fe3b..a2ceb426026a8bf632643232f5f9f7d33f04079b 100644 +index 6335e9046a6288f7bcf945ad8c381e080744653d..1bfde4cfc0f27705238abf7852ad9bb7997e23e6 100644 --- a/src/main/java/net/minecraft/world/entity/EntityTypes.java +++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java -@@ -320,13 +320,20 @@ public class EntityTypes { +@@ -318,13 +318,20 @@ public class EntityTypes { @Nullable public Entity spawnCreature(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1) { @@ -31,7 +31,7 @@ index e858e41e046665016327f0ef3f19cf5db765fe3b..a2ceb426026a8bf632643232f5f9f7d3 } @Nullable -@@ -351,9 +358,29 @@ public class EntityTypes { +@@ -349,9 +356,29 @@ public class EntityTypes { } } // Paper end diff --git a/patches/server/0017-Player-invulnerabilities.patch b/patches/server/0016-Player-invulnerabilities.patch similarity index 100% rename from patches/server/0017-Player-invulnerabilities.patch rename to patches/server/0016-Player-invulnerabilities.patch diff --git a/patches/server/0018-Anvil-API.patch b/patches/server/0017-Anvil-API.patch similarity index 100% rename from patches/server/0018-Anvil-API.patch rename to patches/server/0017-Anvil-API.patch diff --git a/patches/server/0019-Configurable-villager-brain-ticks.patch b/patches/server/0018-Configurable-villager-brain-ticks.patch similarity index 87% rename from patches/server/0019-Configurable-villager-brain-ticks.patch rename to patches/server/0018-Configurable-villager-brain-ticks.patch index 5ff8ed89c..60d849457 100644 --- a/patches/server/0019-Configurable-villager-brain-ticks.patch +++ b/patches/server/0018-Configurable-villager-brain-ticks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable villager brain ticks diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index ccb568a5e8501ac5e8901ef3a270cc87471d9ea1..7a404996909454d1d6bc606609f0c19853cda91a 100644 +index 85374ac8f5460790de03b47d7c3ce19ed5596afe..c45e6ae3f912ac582c6ba693517e05cd8fbf33e2 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -127,6 +127,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -24,7 +24,7 @@ index ccb568a5e8501ac5e8901ef3a270cc87471d9ea1..7a404996909454d1d6bc606609f0c198 } @Override -@@ -237,6 +239,10 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -235,6 +237,10 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation protected void mobTick() { mobTick(false); } protected void mobTick(boolean inactive) { this.world.getMethodProfiler().enter("villagerBrain"); @@ -32,9 +32,9 @@ index ccb568a5e8501ac5e8901ef3a270cc87471d9ea1..7a404996909454d1d6bc606609f0c198 + boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0; + if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick) + // Purpur end - if (!inactive) { - if (!gg.airplane.AirplaneConfig.dynamicVillagerBehavior || behaviorTick++ % this.activatedPriority == 0) { - this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper + if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper + this.world.getMethodProfiler().exit(); + if (this.bF) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java index c441fcea9b2b5a77b801c8a69541cf42050927dc..c7fb5a737cab0083c39732247acb8f4e87562894 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java diff --git a/patches/server/0020-Alternative-Keepalive-Handling.patch b/patches/server/0019-Alternative-Keepalive-Handling.patch similarity index 100% rename from patches/server/0020-Alternative-Keepalive-Handling.patch rename to patches/server/0019-Alternative-Keepalive-Handling.patch diff --git a/patches/server/0021-Silk-touch-spawners.patch b/patches/server/0020-Silk-touch-spawners.patch similarity index 100% rename from patches/server/0021-Silk-touch-spawners.patch rename to patches/server/0020-Silk-touch-spawners.patch diff --git a/patches/server/0022-MC-168772-Fix-Add-turtle-egg-block-options.patch b/patches/server/0021-MC-168772-Fix-Add-turtle-egg-block-options.patch similarity index 100% rename from patches/server/0022-MC-168772-Fix-Add-turtle-egg-block-options.patch rename to patches/server/0021-MC-168772-Fix-Add-turtle-egg-block-options.patch diff --git a/patches/server/0023-Fix-vanilla-command-permission-handler.patch b/patches/server/0022-Fix-vanilla-command-permission-handler.patch similarity index 100% rename from patches/server/0023-Fix-vanilla-command-permission-handler.patch rename to patches/server/0022-Fix-vanilla-command-permission-handler.patch diff --git a/patches/server/0024-Logger-settings-suppressing-pointless-logs.patch b/patches/server/0023-Logger-settings-suppressing-pointless-logs.patch similarity index 100% rename from patches/server/0024-Logger-settings-suppressing-pointless-logs.patch rename to patches/server/0023-Logger-settings-suppressing-pointless-logs.patch diff --git a/patches/server/0025-Disable-outdated-build-check.patch b/patches/server/0024-Disable-outdated-build-check.patch similarity index 100% rename from patches/server/0025-Disable-outdated-build-check.patch rename to patches/server/0024-Disable-outdated-build-check.patch diff --git a/patches/server/0026-Giants-AI-settings.patch b/patches/server/0025-Giants-AI-settings.patch similarity index 94% rename from patches/server/0026-Giants-AI-settings.patch rename to patches/server/0025-Giants-AI-settings.patch index 06a15a0ea..f6b18f870 100644 --- a/patches/server/0026-Giants-AI-settings.patch +++ b/patches/server/0025-Giants-AI-settings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Giants AI settings diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1ea76604a375b60aa2b93af6c562151030907b1c..ac87fb7ce0f1e00382abb4b92e5422bc613a4d5f 100644 +index c3d4eda866016c4ac08d4c5d771e39dcac5a3a60..2d8cea0be6189f1e71f3c671b91b0082de7bc2ee 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -228,7 +228,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -18,10 +18,10 @@ index 1ea76604a375b60aa2b93af6c562151030907b1c..ac87fb7ce0f1e00382abb4b92e5422bc public float I; protected final Random random; diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 892bfadbb1e7d09996df61aaee2cab74187f73d0..f5b23f42e87ac6e44fa2aac6635daa44d9936868 100644 +index 7ba59ff9a7ed39bf69c46973a85f874c43134dc1..46e9a232ca5df81cafd4c3fc6af43b933c95d04f 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -1030,6 +1030,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1021,6 +1021,7 @@ public abstract class EntityInsentient extends EntityLiving { return f; } @@ -29,7 +29,7 @@ index 892bfadbb1e7d09996df61aaee2cab74187f73d0..f5b23f42e87ac6e44fa2aac6635daa44 protected void a(DifficultyDamageScaler difficultydamagescaler) { if (this.random.nextFloat() < 0.15F * difficultydamagescaler.d()) { int i = this.random.nextInt(2); -@@ -1137,6 +1138,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1128,6 +1129,7 @@ public abstract class EntityInsentient extends EntityLiving { } } @@ -38,10 +38,10 @@ index 892bfadbb1e7d09996df61aaee2cab74187f73d0..f5b23f42e87ac6e44fa2aac6635daa44 float f = difficultydamagescaler.d(); diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index bb030f5b258d82a1a3e60151b42a113b8f8022f1..b2be16652756de1ad06cc4a98cdbe95406a445d3 100644 +index 16b408916a72fb2f21fcc315d396bfcb50f7c875..683b2b516ca824cfc7454e683e33513306a5ab09 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -261,6 +261,7 @@ public abstract class EntityLiving extends Entity { +@@ -260,6 +260,7 @@ public abstract class EntityLiving extends Entity { this.activeItem = ItemStack.b; this.by = Optional.empty(); this.attributeMap = new AttributeMapBase(AttributeDefaults.a(entitytypes)); @@ -49,7 +49,7 @@ index bb030f5b258d82a1a3e60151b42a113b8f8022f1..b2be16652756de1ad06cc4a98cdbe954 this.craftAttributes = new CraftAttributeMap(attributeMap); // CraftBukkit // CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor this.datawatcher.set(EntityLiving.HEALTH, (float) this.getAttributeInstance(GenericAttributes.MAX_HEALTH).getValue()); -@@ -276,6 +277,8 @@ public abstract class EntityLiving extends Entity { +@@ -275,6 +276,8 @@ public abstract class EntityLiving extends Entity { this.bg = this.a(new Dynamic(dynamicopsnbt, dynamicopsnbt.createMap((Map) ImmutableMap.of(dynamicopsnbt.createString("memories"), dynamicopsnbt.emptyMap())))); } @@ -58,7 +58,7 @@ index bb030f5b258d82a1a3e60151b42a113b8f8022f1..b2be16652756de1ad06cc4a98cdbe954 public BehaviorController getBehaviorController() { return this.bg; } -@@ -2289,7 +2292,7 @@ public abstract class EntityLiving extends Entity { +@@ -2273,7 +2276,7 @@ public abstract class EntityLiving extends Entity { this.enderTeleportTo(vec3d.x, vec3d.y, vec3d.z); } diff --git a/patches/server/0027-Illusioners-AI-settings.patch b/patches/server/0026-Illusioners-AI-settings.patch similarity index 100% rename from patches/server/0027-Illusioners-AI-settings.patch rename to patches/server/0026-Illusioners-AI-settings.patch diff --git a/patches/server/0028-Zombie-horse-naturally-spawn.patch b/patches/server/0027-Zombie-horse-naturally-spawn.patch similarity index 95% rename from patches/server/0028-Zombie-horse-naturally-spawn.patch rename to patches/server/0027-Zombie-horse-naturally-spawn.patch index 6448b32aa..24f10369b 100644 --- a/patches/server/0028-Zombie-horse-naturally-spawn.patch +++ b/patches/server/0027-Zombie-horse-naturally-spawn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Zombie horse naturally spawn diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 74fb9386ca2a0cfe970a9f74977b8128d3c2bf30..df83364cb740a188f8e0db766b78bdaab8c3d484 100644 +index a97b8d8116920237964cc3a887525f8c3804c640..a0c731af6dffa30832b321f8fd86cef76ec06522 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -96,6 +96,7 @@ import net.minecraft.world.entity.ai.village.poi.VillagePlace; @@ -16,7 +16,7 @@ index 74fb9386ca2a0cfe970a9f74977b8128d3c2bf30..df83364cb740a188f8e0db766b78bdaa import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton; import net.minecraft.world.entity.boss.EntityComplexPart; import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon; -@@ -1258,12 +1259,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1219,12 +1220,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper if (flag1) { diff --git a/patches/server/0029-Charged-creeper-naturally-spawn.patch b/patches/server/0028-Charged-creeper-naturally-spawn.patch similarity index 100% rename from patches/server/0029-Charged-creeper-naturally-spawn.patch rename to patches/server/0028-Charged-creeper-naturally-spawn.patch diff --git a/patches/server/0030-Rabbit-naturally-spawn-toast-and-killer.patch b/patches/server/0029-Rabbit-naturally-spawn-toast-and-killer.patch similarity index 100% rename from patches/server/0030-Rabbit-naturally-spawn-toast-and-killer.patch rename to patches/server/0029-Rabbit-naturally-spawn-toast-and-killer.patch diff --git a/patches/server/0031-Fix-outdated-server-showing-in-ping-before-server-fu.patch b/patches/server/0030-Fix-outdated-server-showing-in-ping-before-server-fu.patch similarity index 100% rename from patches/server/0031-Fix-outdated-server-showing-in-ping-before-server-fu.patch rename to patches/server/0030-Fix-outdated-server-showing-in-ping-before-server-fu.patch diff --git a/patches/server/0032-Make-Iron-Golems-Swim.patch b/patches/server/0031-Make-Iron-Golems-Swim.patch similarity index 100% rename from patches/server/0032-Make-Iron-Golems-Swim.patch rename to patches/server/0031-Make-Iron-Golems-Swim.patch diff --git a/patches/server/0033-Dont-send-useless-entity-packets.patch b/patches/server/0032-Dont-send-useless-entity-packets.patch similarity index 95% rename from patches/server/0033-Dont-send-useless-entity-packets.patch rename to patches/server/0032-Dont-send-useless-entity-packets.patch index eb38bcacc..609fff060 100644 --- a/patches/server/0033-Dont-send-useless-entity-packets.patch +++ b/patches/server/0032-Dont-send-useless-entity-packets.patch @@ -26,10 +26,10 @@ index 0eed10a6c4e0c7245f219d19ed1e2e5c94364db9..2b54a5f3347f788b751892105f888663 protected boolean h; protected boolean i; diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java -index 6aad662d823e0a64b8e18156b5f084399bc4f228..71df7a322bcb1f8050bf37a0c1a8dc1d307166c3 100644 +index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..53e773c14689967d5b12467bf209eefb05f7a812 100644 --- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java -@@ -202,6 +202,7 @@ public class EntityTrackerEntry { +@@ -200,6 +200,7 @@ public class EntityTrackerEntry { this.o = 0; packet1 = new PacketPlayOutEntityTeleport(this.tracker); } @@ -37,7 +37,7 @@ index 6aad662d823e0a64b8e18156b5f084399bc4f228..71df7a322bcb1f8050bf37a0c1a8dc1d } if ((this.e || this.tracker.impulse || this.tracker instanceof EntityLiving && ((EntityLiving) this.tracker).isGliding()) && this.tickCounter > 0) { -@@ -288,6 +289,22 @@ public class EntityTrackerEntry { +@@ -286,6 +287,22 @@ public class EntityTrackerEntry { } diff --git a/patches/server/0034-Tulips-change-fox-type.patch b/patches/server/0033-Tulips-change-fox-type.patch similarity index 100% rename from patches/server/0034-Tulips-change-fox-type.patch rename to patches/server/0033-Tulips-change-fox-type.patch diff --git a/patches/server/0035-Breedable-Polar-Bears.patch b/patches/server/0034-Breedable-Polar-Bears.patch similarity index 100% rename from patches/server/0035-Breedable-Polar-Bears.patch rename to patches/server/0034-Breedable-Polar-Bears.patch diff --git a/patches/server/0036-Chickens-can-retaliate.patch b/patches/server/0035-Chickens-can-retaliate.patch similarity index 100% rename from patches/server/0036-Chickens-can-retaliate.patch rename to patches/server/0035-Chickens-can-retaliate.patch diff --git a/patches/server/0037-Add-option-to-set-armorstand-step-height.patch b/patches/server/0036-Add-option-to-set-armorstand-step-height.patch similarity index 100% rename from patches/server/0037-Add-option-to-set-armorstand-step-height.patch rename to patches/server/0036-Add-option-to-set-armorstand-step-height.patch diff --git a/patches/server/0038-Cat-spawning-options.patch b/patches/server/0037-Cat-spawning-options.patch similarity index 100% rename from patches/server/0038-Cat-spawning-options.patch rename to patches/server/0037-Cat-spawning-options.patch diff --git a/patches/server/0039-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch b/patches/server/0038-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch similarity index 100% rename from patches/server/0039-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch rename to patches/server/0038-MC-147659-Fix-non-black-cats-spawning-in-swamp-huts.patch diff --git a/patches/server/0040-Cows-eat-mushrooms.patch b/patches/server/0039-Cows-eat-mushrooms.patch similarity index 96% rename from patches/server/0040-Cows-eat-mushrooms.patch rename to patches/server/0039-Cows-eat-mushrooms.patch index 6ebe0af7d..f747e5c3d 100644 --- a/patches/server/0040-Cows-eat-mushrooms.patch +++ b/patches/server/0039-Cows-eat-mushrooms.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cows eat mushrooms diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ac87fb7ce0f1e00382abb4b92e5422bc613a4d5f..2b895c84404fe76570ad2fa5a9882ce5580df382 100644 +index 2d8cea0be6189f1e71f3c671b91b0082de7bc2ee..f734c79e5ed4fefc1431cb8cadf45572a19a9838 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2950,6 +2950,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2916,6 +2916,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.invulnerable = flag; } @@ -17,10 +17,10 @@ index ac87fb7ce0f1e00382abb4b92e5422bc613a4d5f..2b895c84404fe76570ad2fa5a9882ce5 this.setPositionRotation(entity.locX(), entity.locY(), entity.locZ(), entity.yaw, entity.pitch); } diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index b2be16652756de1ad06cc4a98cdbe95406a445d3..65d09af57111bb99f2438731bb8c053f6e3fafba 100644 +index 683b2b516ca824cfc7454e683e33513306a5ab09..a7d469c9fe7a0f51019e5f1a567b8c020cfb2f1b 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -176,7 +176,7 @@ public abstract class EntityLiving extends Entity { +@@ -175,7 +175,7 @@ public abstract class EntityLiving extends Entity { public int maxNoDamageTicks; public final float ay; public final float az; diff --git a/patches/server/0041-Fix-cow-rotation-when-shearing-mooshroom.patch b/patches/server/0040-Fix-cow-rotation-when-shearing-mooshroom.patch similarity index 100% rename from patches/server/0041-Fix-cow-rotation-when-shearing-mooshroom.patch rename to patches/server/0040-Fix-cow-rotation-when-shearing-mooshroom.patch diff --git a/patches/server/0042-Pigs-give-saddle-back.patch b/patches/server/0041-Pigs-give-saddle-back.patch similarity index 100% rename from patches/server/0042-Pigs-give-saddle-back.patch rename to patches/server/0041-Pigs-give-saddle-back.patch diff --git a/patches/server/0043-Snowman-drop-and-put-back-pumpkin.patch b/patches/server/0042-Snowman-drop-and-put-back-pumpkin.patch similarity index 100% rename from patches/server/0043-Snowman-drop-and-put-back-pumpkin.patch rename to patches/server/0042-Snowman-drop-and-put-back-pumpkin.patch diff --git a/patches/server/0044-Ender-dragon-always-drop-full-exp.patch b/patches/server/0043-Ender-dragon-always-drop-full-exp.patch similarity index 100% rename from patches/server/0044-Ender-dragon-always-drop-full-exp.patch rename to patches/server/0043-Ender-dragon-always-drop-full-exp.patch diff --git a/patches/server/0045-Signs-editable-on-right-click.patch b/patches/server/0044-Signs-editable-on-right-click.patch similarity index 100% rename from patches/server/0045-Signs-editable-on-right-click.patch rename to patches/server/0044-Signs-editable-on-right-click.patch diff --git a/patches/server/0046-Signs-allow-color-codes.patch b/patches/server/0045-Signs-allow-color-codes.patch similarity index 100% rename from patches/server/0046-Signs-allow-color-codes.patch rename to patches/server/0045-Signs-allow-color-codes.patch diff --git a/patches/server/0047-Allow-soil-to-moisten-from-water-directly-under-it.patch b/patches/server/0046-Allow-soil-to-moisten-from-water-directly-under-it.patch similarity index 100% rename from patches/server/0047-Allow-soil-to-moisten-from-water-directly-under-it.patch rename to patches/server/0046-Allow-soil-to-moisten-from-water-directly-under-it.patch diff --git a/patches/server/0048-Minecart-settings-and-WASD-controls.patch b/patches/server/0047-Minecart-settings-and-WASD-controls.patch similarity index 97% rename from patches/server/0048-Minecart-settings-and-WASD-controls.patch rename to patches/server/0047-Minecart-settings-and-WASD-controls.patch index 0ce7bc312..4baf8ac11 100644 --- a/patches/server/0048-Minecart-settings-and-WASD-controls.patch +++ b/patches/server/0047-Minecart-settings-and-WASD-controls.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Minecart settings and WASD controls diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java -index 2685a395a2eff9083cd8c654c4b7e2141b0ca99b..c2706c752f6ff5c131b6db469ae85dd703d5d381 100644 +index 6a6381e85fef2ae2b9b5e6dff0b7917b92fa01e5..17d63cd4ca152adc66ffe9ffd3227a0770738a29 100644 --- a/src/main/java/net/minecraft/core/BlockPosition.java +++ b/src/main/java/net/minecraft/core/BlockPosition.java @@ -42,6 +42,12 @@ public class BlockPosition extends BaseBlockPosition { @@ -34,10 +34,10 @@ index a8d60d288afd9b413494fe6abe8cfddb7c1f0b3b..57900f89695bcce9aa6e90ab96007e45 if (!flag && isSpawnInvulnerable() && damagesource != DamageSource.OUT_OF_WORLD) { // Purpur diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 65d09af57111bb99f2438731bb8c053f6e3fafba..3116644a2689c7f553fac0fe778fe7277b0ac02d 100644 +index a7d469c9fe7a0f51019e5f1a567b8c020cfb2f1b..f79a37156c2d868a2ae117a34abb9b873f068e39 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -194,9 +194,9 @@ public abstract class EntityLiving extends Entity { +@@ -193,9 +193,9 @@ public abstract class EntityLiving extends Entity { protected int aO;protected int getKillCount() { return this.aO; } // Paper - OBFHELPER public float lastDamage; public boolean jumping; // Paper protected -> public @@ -170,7 +170,7 @@ index 527f3ed664854cdd938c34f00a064bc2f77148cc..1a1de9491a50e9e746e714fcb35633c2 } } diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 96d7990c66bd569b1b5ee287c0238c7dbb4c503e..2448ff8e3a9c60d6d99dd8f4d3033553b2780c77 100644 +index 7279893d599351785652279c8827fe0efbd72f12..cfdc602947548970b3fde00dd9fddf4e82c28841 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -83,6 +83,7 @@ public class Block extends BlockBase implements IMaterial { diff --git a/patches/server/0049-Disable-loot-drops-on-death-by-cramming.patch b/patches/server/0048-Disable-loot-drops-on-death-by-cramming.patch similarity index 92% rename from patches/server/0049-Disable-loot-drops-on-death-by-cramming.patch rename to patches/server/0048-Disable-loot-drops-on-death-by-cramming.patch index cfd7b08bf..8d381748d 100644 --- a/patches/server/0049-Disable-loot-drops-on-death-by-cramming.patch +++ b/patches/server/0048-Disable-loot-drops-on-death-by-cramming.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable loot drops on death by cramming diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 3116644a2689c7f553fac0fe778fe7277b0ac02d..7654b244bcabec35a3a9cdda862ebe220abf41c0 100644 +index f79a37156c2d868a2ae117a34abb9b873f068e39..c2f2b9006dfc8e6d090768c8550ddf42e0e82b80 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -1598,8 +1598,10 @@ public abstract class EntityLiving extends Entity { +@@ -1595,8 +1595,10 @@ public abstract class EntityLiving extends Entity { this.dropInventory(); // CraftBukkit - from below if (this.cW() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { diff --git a/patches/server/0050-Players-should-not-cram-to-death.patch b/patches/server/0049-Players-should-not-cram-to-death.patch similarity index 100% rename from patches/server/0050-Players-should-not-cram-to-death.patch rename to patches/server/0049-Players-should-not-cram-to-death.patch diff --git a/patches/server/0051-Option-to-toggle-milk-curing-bad-omen.patch b/patches/server/0050-Option-to-toggle-milk-curing-bad-omen.patch similarity index 100% rename from patches/server/0051-Option-to-toggle-milk-curing-bad-omen.patch rename to patches/server/0050-Option-to-toggle-milk-curing-bad-omen.patch diff --git a/patches/server/0052-End-gateway-should-check-if-entity-can-use-portal.patch b/patches/server/0051-End-gateway-should-check-if-entity-can-use-portal.patch similarity index 100% rename from patches/server/0052-End-gateway-should-check-if-entity-can-use-portal.patch rename to patches/server/0051-End-gateway-should-check-if-entity-can-use-portal.patch diff --git a/patches/server/0053-Fix-the-dead-lagging-the-server.patch b/patches/server/0052-Fix-the-dead-lagging-the-server.patch similarity index 81% rename from patches/server/0053-Fix-the-dead-lagging-the-server.patch rename to patches/server/0052-Fix-the-dead-lagging-the-server.patch index cf37e7e34..2d5074b84 100644 --- a/patches/server/0053-Fix-the-dead-lagging-the-server.patch +++ b/patches/server/0052-Fix-the-dead-lagging-the-server.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix the dead lagging the server diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2b895c84404fe76570ad2fa5a9882ce5580df382..8ce20570ae6ea5fe885006bf5ace1e99b44b901e 100644 +index f734c79e5ed4fefc1431cb8cadf45572a19a9838..94644c513c92d0dd44592cd70ec36278bc83ac8b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1694,6 +1694,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -1660,6 +1660,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F; this.lastYaw = this.yaw; this.lastPitch = this.pitch; @@ -17,10 +17,10 @@ index 2b895c84404fe76570ad2fa5a9882ce5580df382..8ce20570ae6ea5fe885006bf5ace1e99 public void f(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 7654b244bcabec35a3a9cdda862ebe220abf41c0..1da0905798c89b3c4b5a6ce93a838935b60cbfc4 100644 +index c2f2b9006dfc8e6d090768c8550ddf42e0e82b80..51f0259d66a82e5cf3a20f1d3994cb2826d1e3d1 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -2610,7 +2610,7 @@ public abstract class EntityLiving extends Entity { +@@ -2594,7 +2594,7 @@ public abstract class EntityLiving extends Entity { } } diff --git a/patches/server/0054-Skip-events-if-there-s-no-listeners.patch b/patches/server/0053-Skip-events-if-there-s-no-listeners.patch similarity index 100% rename from patches/server/0054-Skip-events-if-there-s-no-listeners.patch rename to patches/server/0053-Skip-events-if-there-s-no-listeners.patch diff --git a/patches/server/0055-Add-permission-for-F3-N-debug.patch b/patches/server/0054-Add-permission-for-F3-N-debug.patch similarity index 100% rename from patches/server/0055-Add-permission-for-F3-N-debug.patch rename to patches/server/0054-Add-permission-for-F3-N-debug.patch diff --git a/patches/server/0056-Add-wither-skeleton-takes-wither-damage-option.patch b/patches/server/0055-Add-wither-skeleton-takes-wither-damage-option.patch similarity index 100% rename from patches/server/0056-Add-wither-skeleton-takes-wither-damage-option.patch rename to patches/server/0055-Add-wither-skeleton-takes-wither-damage-option.patch diff --git a/patches/server/0057-Configurable-TPS-Catchup.patch b/patches/server/0056-Configurable-TPS-Catchup.patch similarity index 95% rename from patches/server/0057-Configurable-TPS-Catchup.patch rename to patches/server/0056-Configurable-TPS-Catchup.patch index 82b374509..13e6a643d 100644 --- a/patches/server/0057-Configurable-TPS-Catchup.patch +++ b/patches/server/0056-Configurable-TPS-Catchup.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable TPS Catchup diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5602995edc049c6fdb751d443a73cb36faead1b3..279590c49be376625f7ece35add5fa75c91a90d1 100644 +index 991ac5baf3f10631edb0e60d17c714af1f406a29..d93ecf4b3451b1c3c309aadfe2ec287a68df0713 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1136,7 +1136,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= world.paperConfig.netherVoidTopDamageHeight)) { this.doVoidDamage(); diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 1da0905798c89b3c4b5a6ce93a838935b60cbfc4..5203c1ecb333b7bf5a707e77e559ec707c276e6b 100644 +index 51f0259d66a82e5cf3a20f1d3994cb2826d1e3d1..9a9a5d4e0b6ec4a88278aea216b9aa3194d36bb4 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -2129,7 +2129,7 @@ public abstract class EntityLiving extends Entity { +@@ -2113,7 +2113,7 @@ public abstract class EntityLiving extends Entity { @Override protected void an() { diff --git a/patches/server/0070-Dispenser-curse-of-binding-protection.patch b/patches/server/0069-Dispenser-curse-of-binding-protection.patch similarity index 95% rename from patches/server/0070-Dispenser-curse-of-binding-protection.patch rename to patches/server/0069-Dispenser-curse-of-binding-protection.patch index 77517a565..64be7324e 100644 --- a/patches/server/0070-Dispenser-curse-of-binding-protection.patch +++ b/patches/server/0069-Dispenser-curse-of-binding-protection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Dispenser curse of binding protection diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 091bc957ed810bc6f5c7e380af8e85b64ea75b1f..2fb24a203e46bb3b43070aa3fd6eca2eb237c507 100644 +index 864b9bf8f41476e876fd386cdbfb007898584ad6..b70120c32027a456037daac363d420d2edd4bdfe 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -65,6 +65,7 @@ import net.minecraft.world.item.ItemSword; @@ -16,7 +16,7 @@ index 091bc957ed810bc6f5c7e380af8e85b64ea75b1f..2fb24a203e46bb3b43070aa3fd6eca2e import net.minecraft.world.level.GameRules; import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.IBlockAccess; -@@ -1077,6 +1078,13 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1068,6 +1069,13 @@ public abstract class EntityInsentient extends EntityLiving { } diff --git a/patches/server/0071-Add-option-for-boats-to-eject-players-on-land.patch b/patches/server/0070-Add-option-for-boats-to-eject-players-on-land.patch similarity index 100% rename from patches/server/0071-Add-option-for-boats-to-eject-players-on-land.patch rename to patches/server/0070-Add-option-for-boats-to-eject-players-on-land.patch diff --git a/patches/server/0072-Add-obfhelpers-for-plugin-use.patch b/patches/server/0071-Add-obfhelpers-for-plugin-use.patch similarity index 100% rename from patches/server/0072-Add-obfhelpers-for-plugin-use.patch rename to patches/server/0071-Add-obfhelpers-for-plugin-use.patch diff --git a/patches/server/0073-Mending-mends-most-damages-equipment-first.patch b/patches/server/0072-Mending-mends-most-damages-equipment-first.patch similarity index 100% rename from patches/server/0073-Mending-mends-most-damages-equipment-first.patch rename to patches/server/0072-Mending-mends-most-damages-equipment-first.patch diff --git a/patches/server/0074-Add-5-second-tps-average-in-tps.patch b/patches/server/0073-Add-5-second-tps-average-in-tps.patch similarity index 96% rename from patches/server/0074-Add-5-second-tps-average-in-tps.patch rename to patches/server/0073-Add-5-second-tps-average-in-tps.patch index 38dbc2ab1..5cd4dd5f3 100644 --- a/patches/server/0074-Add-5-second-tps-average-in-tps.patch +++ b/patches/server/0073-Add-5-second-tps-average-in-tps.patch @@ -27,7 +27,7 @@ index dc6bc1910ad0f9b27144d5750078c3ca607d03d3..e8be35f836ede2630d44902e99a21489 setListData(vector); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 279590c49be376625f7ece35add5fa75c91a90d1..502675b7bef3322b88efff650b239bfedebc0785 100644 +index d93ecf4b3451b1c3c309aadfe2ec287a68df0713..afe3c53252354760b22901f7f109fd5d265928e0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -279,7 +279,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant trackedPlayerMap = null; diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 78e752a629bab777b45cf62e4c1aaf9efa40918a..6a571c549e0eee5ab9c7c8ed325bcdedca87272d 100644 +index 4df1be8091af0ed9d3403f217b481645e24020e8..e94d9c784bde37f65c2fd081eacbd41b061cd1aa 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -@@ -2437,7 +2437,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2431,7 +2431,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially public class EntityTracker { @@ -31,10 +31,10 @@ index 78e752a629bab777b45cf62e4c1aaf9efa40918a..6a571c549e0eee5ab9c7c8ed325bcded private final int trackingDistance; private SectionPosition e; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e412175edae9aa7b5f4e7e2b550d29a647f4c7f9..5d43cc1cb42e14db50407ba62d89df327829da1c 100644 +index e6e8e8d346a38664115a4cb5ec63ec4b1005d290..b418bcba078e9c6ce8ff1399ad27d82c32a06f99 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1643,6 +1643,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -1609,6 +1609,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } @@ -43,7 +43,7 @@ index e412175edae9aa7b5f4e7e2b550d29a647f4c7f9..5d43cc1cb42e14db50407ba62d89df32 return this.O == tag; } diff --git a/src/main/java/net/minecraft/world/entity/item/EntityItem.java b/src/main/java/net/minecraft/world/entity/item/EntityItem.java -index e1581f0616748da885f457c7fa0f1515490c53f4..bb3ea44a641cc830416e9e000357199150135047 100644 +index 077990f1d95ded2c8b89c38978ec25a56df3a984..be46b8fcbfed932ba96a34c94eee0b237c783bd4 100644 --- a/src/main/java/net/minecraft/world/entity/item/EntityItem.java +++ b/src/main/java/net/minecraft/world/entity/item/EntityItem.java @@ -50,6 +50,12 @@ public class EntityItem extends Entity { @@ -59,7 +59,7 @@ index e1581f0616748da885f457c7fa0f1515490c53f4..bb3ea44a641cc830416e9e0003571991 public EntityItem(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -315,6 +321,16 @@ public class EntityItem extends Entity { +@@ -309,6 +315,16 @@ public class EntityItem extends Entity { return false; } else if (!this.getItemStack().getItem().a(damagesource)) { return false; @@ -76,7 +76,7 @@ index e1581f0616748da885f457c7fa0f1515490c53f4..bb3ea44a641cc830416e9e0003571991 } else { // CraftBukkit start if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) { -@@ -495,6 +511,12 @@ public class EntityItem extends Entity { +@@ -489,6 +505,12 @@ public class EntityItem extends Entity { com.google.common.base.Preconditions.checkArgument(!itemstack.isEmpty(), "Cannot drop air"); // CraftBukkit this.getDataWatcher().set(EntityItem.ITEM, itemstack); this.getDataWatcher().markDirty(EntityItem.ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty @@ -89,7 +89,7 @@ index e1581f0616748da885f457c7fa0f1515490c53f4..bb3ea44a641cc830416e9e0003571991 } @Override -@@ -576,4 +598,15 @@ public class EntityItem extends Entity { +@@ -570,4 +592,15 @@ public class EntityItem extends Entity { super.setPositionRaw(x, y, z); } // Paper end - fix MC-4 diff --git a/patches/server/0077-Add-ping-command.patch b/patches/server/0076-Add-ping-command.patch similarity index 100% rename from patches/server/0077-Add-ping-command.patch rename to patches/server/0076-Add-ping-command.patch diff --git a/patches/server/0078-Configurable-jockey-options.patch b/patches/server/0077-Configurable-jockey-options.patch similarity index 100% rename from patches/server/0078-Configurable-jockey-options.patch rename to patches/server/0077-Configurable-jockey-options.patch diff --git a/patches/server/0079-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch b/patches/server/0078-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch similarity index 99% rename from patches/server/0079-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch rename to patches/server/0078-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch index 1774006d5..7fa849420 100644 --- a/patches/server/0079-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch +++ b/patches/server/0078-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch @@ -17,10 +17,10 @@ index 53ea8a6d90faf4f7f8fd0819be4499422bdd4cbe..6ba14f603b8ec69597c70677cc317f80 return (new EntityDamageSourceIndirect("indirectMagic", entity, entity1)).setIgnoreArmor().setMagic(); } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5d43cc1cb42e14db50407ba62d89df327829da1c..aedfe9875780496e8404c3364eed0d0c920af538 100644 +index b418bcba078e9c6ce8ff1399ad27d82c32a06f99..ec7ddc1a92f401d702fec22d525e0ee8683855fc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2309,8 +2309,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2275,8 +2275,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return this.a(new ItemStack(imaterial), (float) i); } diff --git a/patches/server/0080-Add-phantom-spawning-options.patch b/patches/server/0079-Add-phantom-spawning-options.patch similarity index 98% rename from patches/server/0080-Add-phantom-spawning-options.patch rename to patches/server/0079-Add-phantom-spawning-options.patch index 403f57275..16cfeb483 100644 --- a/patches/server/0080-Add-phantom-spawning-options.patch +++ b/patches/server/0079-Add-phantom-spawning-options.patch @@ -49,10 +49,10 @@ index 8b2e57c833c03940f2e0727e00decce59f263269..642bf019d32a2fdc18718337ecfe45d2 return this.getBrightness(EnumSkyBlock.SKY, blockposition) >= this.K(); } diff --git a/src/main/java/net/minecraft/world/level/SpawnerCreature.java b/src/main/java/net/minecraft/world/level/SpawnerCreature.java -index d98526785ff2fa3b72e8ffffcb89a57a2203a5c8..7859d84471436b427138593776ebd30a0429b6b4 100644 +index d497006f05f79015cd791849888832bb53f4a414..ec80c956b4612435ec37672fe27112ac2253bea5 100644 --- a/src/main/java/net/minecraft/world/level/SpawnerCreature.java +++ b/src/main/java/net/minecraft/world/level/SpawnerCreature.java -@@ -431,6 +431,7 @@ public final class SpawnerCreature { +@@ -428,6 +428,7 @@ public final class SpawnerCreature { return new BlockPosition(i, l, j); } @@ -61,10 +61,10 @@ index d98526785ff2fa3b72e8ffffcb89a57a2203a5c8..7859d84471436b427138593776ebd30a return iblockdata.r(iblockaccess, blockposition) ? false : (iblockdata.isPowerSource() ? false : (!fluid.isEmpty() ? false : (iblockdata.a((Tag) TagsBlock.PREVENT_MOB_SPAWNING_INSIDE) ? false : !entitytypes.a(iblockdata)))); } diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index b67914145517bd027f297cc4358d287b6899919f..fc5e2263d05661672b3295da46d7e7495c5b40b6 100644 +index 22d91a970c7376aa6349bb6cd9cb174e89bc8a09..7133b814b414a8aae2f056b9205cf58ca68ab887 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1757,6 +1757,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1664,6 +1664,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return new DifficultyDamageScaler(this.getDifficulty(), this.getDayTime(), i, f); } diff --git a/patches/server/0081-Implement-bed-explosion-options.patch b/patches/server/0080-Implement-bed-explosion-options.patch similarity index 100% rename from patches/server/0081-Implement-bed-explosion-options.patch rename to patches/server/0080-Implement-bed-explosion-options.patch diff --git a/patches/server/0082-Implement-respawn-anchor-explosion-options.patch b/patches/server/0081-Implement-respawn-anchor-explosion-options.patch similarity index 100% rename from patches/server/0082-Implement-respawn-anchor-explosion-options.patch rename to patches/server/0081-Implement-respawn-anchor-explosion-options.patch diff --git a/patches/server/0083-Add-allow-water-in-end-world-option.patch b/patches/server/0082-Add-allow-water-in-end-world-option.patch similarity index 97% rename from patches/server/0083-Add-allow-water-in-end-world-option.patch rename to patches/server/0082-Add-allow-water-in-end-world-option.patch index fcb33886b..ed10bb73f 100644 --- a/patches/server/0083-Add-allow-water-in-end-world-option.patch +++ b/patches/server/0082-Add-allow-water-in-end-world-option.patch @@ -27,10 +27,10 @@ index f97447d77890cd65b5613899c389483bcf82be01..7eb3238b5820bb13f25d78d780872265 return true; diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index fc5e2263d05661672b3295da46d7e7495c5b40b6..8382d0f3158da3c90bba082e62411998632c3644 100644 +index 7133b814b414a8aae2f056b9205cf58ca68ab887..137583da4926ce85d258fce98c919618d02a5f77 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1833,4 +1833,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1739,4 +1739,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final boolean isDebugWorld() { return this.debugWorld; } diff --git a/patches/server/0084-Allow-color-codes-in-books.patch b/patches/server/0083-Allow-color-codes-in-books.patch similarity index 100% rename from patches/server/0084-Allow-color-codes-in-books.patch rename to patches/server/0083-Allow-color-codes-in-books.patch diff --git a/patches/server/0085-Entity-lifespan.patch b/patches/server/0084-Entity-lifespan.patch similarity index 97% rename from patches/server/0085-Entity-lifespan.patch rename to patches/server/0084-Entity-lifespan.patch index 105b3023e..d93e63bc7 100644 --- a/patches/server/0085-Entity-lifespan.patch +++ b/patches/server/0084-Entity-lifespan.patch @@ -17,7 +17,7 @@ index d16149731efbaa9ad19083d5654f4e1e14ef3b76..10c5af3949af4a3bee4999753e7545f0 event = new PlayerInteractEntityEvent((Player) this.getPlayer(), entity.getBukkitEntity(), (packetplayinuseentity.c() == EnumHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND); } else { diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 2fb24a203e46bb3b43070aa3fd6eca2eb237c507..7fa6c3e71b01166e563bf33c1c8606b116930ebe 100644 +index b70120c32027a456037daac363d420d2edd4bdfe..fdc1b99f0a032a76a02ee88b28d62e049a2fc54c 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -124,7 +124,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -94,7 +94,7 @@ index 2fb24a203e46bb3b43070aa3fd6eca2eb237c507..7fa6c3e71b01166e563bf33c1c8606b1 } @Override -@@ -1635,7 +1667,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1626,7 +1658,7 @@ public abstract class EntityInsentient extends EntityLiving { this.a((EntityLiving) this, entity); this.z(entity); } diff --git a/patches/server/0086-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch b/patches/server/0085-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch similarity index 95% rename from patches/server/0086-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch rename to patches/server/0085-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch index aa5ebf276..af096274c 100644 --- a/patches/server/0086-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch +++ b/patches/server/0085-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch @@ -36,7 +36,7 @@ index c766ec5ac4519d1c734a10e667988ada040096c5..b3d12463fbeb2045860c6b933da74980 + // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 75f397067ea57335ab57e492ae212b440d7bedf1..30defe89af719e681c7ee5f8394f1fc3775c05c3 100644 +index 681c74d36d8f9bfdc7c237f0cce1c5acef3daf24..acbaff3fdd08d7f808c109e8a91d983bc9df5b9d 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -45,6 +45,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -47,7 +47,7 @@ index 75f397067ea57335ab57e492ae212b440d7bedf1..30defe89af719e681c7ee5f8394f1fc3 import net.minecraft.server.level.ChunkProviderServer; import net.minecraft.server.level.EntityPlayer; import net.minecraft.server.level.WorldServer; -@@ -376,6 +377,7 @@ public abstract class EntityLiving extends Entity { +@@ -375,6 +376,7 @@ public abstract class EntityLiving extends Entity { double d1 = this.world.getWorldBorder().getDamageAmount(); if (d1 > 0.0D) { diff --git a/patches/server/0087-Squid-EAR-immunity.patch b/patches/server/0086-Squid-EAR-immunity.patch similarity index 93% rename from patches/server/0087-Squid-EAR-immunity.patch rename to patches/server/0086-Squid-EAR-immunity.patch index 222d6917c..0858d1db8 100644 --- a/patches/server/0087-Squid-EAR-immunity.patch +++ b/patches/server/0086-Squid-EAR-immunity.patch @@ -21,7 +21,7 @@ index cd9970db68b6c2f358115b616c36f52ad324fc90..86578f20429aa6bf5f3de1233c6287ce public boolean villagerUseBrainTicksOnlyWhenLagging = true; public boolean villagerCanBeLeashed = false; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index a57473fb8815545977ff08bf46d6463d2b7a9d78..2d06392c8d33dd200e101079c2dbf5c488ade982 100644 +index 2bbbd4a7ae87c2ead3dc2fd5520adfaefe2776b8..2fbc24a6907c06bbc12815a89b507d4479be6dc5 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -11,6 +11,7 @@ import net.minecraft.world.entity.EntityLiving; @@ -32,7 +32,7 @@ index a57473fb8815545977ff08bf46d6463d2b7a9d78..2d06392c8d33dd200e101079c2dbf5c4 import net.minecraft.world.entity.boss.EntityComplexPart; import net.minecraft.world.entity.boss.enderdragon.EntityEnderCrystal; import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon; -@@ -387,6 +388,7 @@ public class ActivationRange +@@ -375,6 +376,7 @@ public class ActivationRange */ public static boolean checkIfActive(Entity entity) { diff --git a/patches/server/0088-Configurable-end-spike-seed.patch b/patches/server/0087-Configurable-end-spike-seed.patch similarity index 100% rename from patches/server/0088-Configurable-end-spike-seed.patch rename to patches/server/0087-Configurable-end-spike-seed.patch diff --git a/patches/server/0089-Configurable-dungeon-seed.patch b/patches/server/0088-Configurable-dungeon-seed.patch similarity index 100% rename from patches/server/0089-Configurable-dungeon-seed.patch rename to patches/server/0088-Configurable-dungeon-seed.patch diff --git a/patches/server/0090-Phantoms-burn-in-light.patch b/patches/server/0089-Phantoms-burn-in-light.patch similarity index 100% rename from patches/server/0090-Phantoms-burn-in-light.patch rename to patches/server/0089-Phantoms-burn-in-light.patch diff --git a/patches/server/0091-Configurable-villager-breeding.patch b/patches/server/0090-Configurable-villager-breeding.patch similarity index 93% rename from patches/server/0091-Configurable-villager-breeding.patch rename to patches/server/0090-Configurable-villager-breeding.patch index 237550f1f..6ef73a7b8 100644 --- a/patches/server/0091-Configurable-villager-breeding.patch +++ b/patches/server/0090-Configurable-villager-breeding.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable villager breeding diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index 31372fe2a7cfdc416594c943b7e771ba3aedf771..f2c4d2610ad10dc4fdaf7178e8cee56bfa06acfc 100644 +index aaf8d2cd3089adba69c873c4ea62b0e8837b21d6..2ff9dffc0f0b20582f5b3bffd01743ee26c63c20 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -@@ -718,7 +718,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -712,7 +712,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @Override public boolean canBreed() { diff --git a/patches/server/0092-Redstone-deactivates-spawners.patch b/patches/server/0091-Redstone-deactivates-spawners.patch similarity index 100% rename from patches/server/0092-Redstone-deactivates-spawners.patch rename to patches/server/0091-Redstone-deactivates-spawners.patch diff --git a/patches/server/0093-Totems-work-in-inventory.patch b/patches/server/0092-Totems-work-in-inventory.patch similarity index 93% rename from patches/server/0093-Totems-work-in-inventory.patch rename to patches/server/0092-Totems-work-in-inventory.patch index d07390bec..68a253822 100644 --- a/patches/server/0093-Totems-work-in-inventory.patch +++ b/patches/server/0092-Totems-work-in-inventory.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Totems work in inventory diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 30defe89af719e681c7ee5f8394f1fc3775c05c3..818363663cabe88bc9f76b8e6e57725c4f2f992a 100644 +index acbaff3fdd08d7f808c109e8a91d983bc9df5b9d..5fcdfb400389b5026c286f7e38bbfe31b57c8a66 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -1426,6 +1426,19 @@ public abstract class EntityLiving extends Entity { +@@ -1423,6 +1423,19 @@ public abstract class EntityLiving extends Entity { } } diff --git a/patches/server/0094-Populator-seed-controls.patch b/patches/server/0093-Populator-seed-controls.patch similarity index 100% rename from patches/server/0094-Populator-seed-controls.patch rename to patches/server/0093-Populator-seed-controls.patch diff --git a/patches/server/0095-Add-vindicator-johnny-spawn-chance.patch b/patches/server/0094-Add-vindicator-johnny-spawn-chance.patch similarity index 100% rename from patches/server/0095-Add-vindicator-johnny-spawn-chance.patch rename to patches/server/0094-Add-vindicator-johnny-spawn-chance.patch diff --git a/patches/server/0096-Add-option-to-disable-mushroom-and-note-block-update.patch b/patches/server/0095-Add-option-to-disable-mushroom-and-note-block-update.patch similarity index 100% rename from patches/server/0096-Add-option-to-disable-mushroom-and-note-block-update.patch rename to patches/server/0095-Add-option-to-disable-mushroom-and-note-block-update.patch diff --git a/patches/server/0097-Dispensers-place-anvils-option.patch b/patches/server/0096-Dispensers-place-anvils-option.patch similarity index 97% rename from patches/server/0097-Dispensers-place-anvils-option.patch rename to patches/server/0096-Dispensers-place-anvils-option.patch index 557ecd82b..68248f4ef 100644 --- a/patches/server/0097-Dispensers-place-anvils-option.patch +++ b/patches/server/0096-Dispensers-place-anvils-option.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Dispensers place anvils option diff --git a/src/main/java/net/minecraft/core/EnumDirection.java b/src/main/java/net/minecraft/core/EnumDirection.java -index 0a40df2151bd388b6633a6f50b14f1f41ed4ce62..3ff1d8b3dfaeb875e5e70b97abb79a21f671f328 100644 +index 7918d830a4aef09c9f517284e83a9376299116ad..29d747f7fc5824a222755ebf96dfe053896d43d0 100644 --- a/src/main/java/net/minecraft/core/EnumDirection.java +++ b/src/main/java/net/minecraft/core/EnumDirection.java @@ -116,6 +116,7 @@ public enum EnumDirection implements INamable { diff --git a/patches/server/0098-Allow-anvil-colors.patch b/patches/server/0097-Allow-anvil-colors.patch similarity index 100% rename from patches/server/0098-Allow-anvil-colors.patch rename to patches/server/0097-Allow-anvil-colors.patch diff --git a/patches/server/0099-Add-no-random-tick-block-list.patch b/patches/server/0098-Add-no-random-tick-block-list.patch similarity index 98% rename from patches/server/0099-Add-no-random-tick-block-list.patch rename to patches/server/0098-Add-no-random-tick-block-list.patch index 52f0f94f8..4afaaa043 100644 --- a/patches/server/0099-Add-no-random-tick-block-list.patch +++ b/patches/server/0098-Add-no-random-tick-block-list.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add no-random-tick block list diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index df83364cb740a188f8e0db766b78bdaab8c3d484..ed80429706bb81c0dfaa36f8c60983dc2e16d0d7 100644 +index a0c731af6dffa30832b321f8fd86cef76ec06522..9668619480706cb5d3a3e2ed0d85ac5bdd6b3c1f 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -532,14 +532,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/server/0100-Add-option-to-disable-dolphin-treasure-searching.patch b/patches/server/0099-Add-option-to-disable-dolphin-treasure-searching.patch similarity index 100% rename from patches/server/0100-Add-option-to-disable-dolphin-treasure-searching.patch rename to patches/server/0099-Add-option-to-disable-dolphin-treasure-searching.patch diff --git a/patches/server/0101-Short-enderman-height.patch b/patches/server/0100-Short-enderman-height.patch similarity index 85% rename from patches/server/0101-Short-enderman-height.patch rename to patches/server/0100-Short-enderman-height.patch index 0de61b549..a1e154bf8 100644 --- a/patches/server/0101-Short-enderman-height.patch +++ b/patches/server/0100-Short-enderman-height.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Short enderman height diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java -index a2ceb426026a8bf632643232f5f9f7d33f04079b..e1ef642f06078202fb782ac16b268e6429c5e202 100644 +index 1bfde4cfc0f27705238abf7852ad9bb7997e23e6..2cf4e8f68fa85c4e09effda0da0c3a3f64ae7ba9 100644 --- a/src/main/java/net/minecraft/world/entity/EntityTypes.java +++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java @@ -268,7 +268,8 @@ public class EntityTypes { @@ -16,13 +16,13 @@ index a2ceb426026a8bf632643232f5f9f7d33f04079b..e1ef642f06078202fb782ac16b268e64 + public void setEntitySize(EntitySize entitySize) { this.br = entitySize; } // Purpur - OBFHELPER + private EntitySize br; // Purpur - remove final - public java.util.function.Supplier getEntityName = () -> IRegistry.ENTITY_TYPE.getKey(this).toString(); // Airplane - create lambda ones - + private static EntityTypes a(String s, EntityTypes.Builder entitytypes_builder) { // CraftBukkit - decompile error + return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s)); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 72142f5c777c6218050bc2b69891072d256ea57d..52aa47036acee2ec21ae2d6f4df634ecbf04b3b0 100644 +index 6a5593ff735a9e0486d7ed9b3afb4f44ad156b34..1e50f7c51f88afaed01777d2da9ed543718a610d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -@@ -383,6 +383,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -375,6 +375,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable(damagesource)) { return false; diff --git a/patches/server/0102-Stop-squids-floating-on-top-of-water.patch b/patches/server/0101-Stop-squids-floating-on-top-of-water.patch similarity index 95% rename from patches/server/0102-Stop-squids-floating-on-top-of-water.patch rename to patches/server/0101-Stop-squids-floating-on-top-of-water.patch index bdb969052..27ccd1357 100644 --- a/patches/server/0102-Stop-squids-floating-on-top-of-water.patch +++ b/patches/server/0101-Stop-squids-floating-on-top-of-water.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Stop squids floating on top of water diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index aedfe9875780496e8404c3364eed0d0c920af538..0c98115022d5af56b41429b090048dd52243ca3f 100644 +index ec7ddc1a92f401d702fec22d525e0ee8683855fc..7837b7f83b34b3ffe0ff0cb1f732408eb78d231a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3620,8 +3620,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3586,8 +3586,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.lastYaw = this.yaw; } diff --git a/patches/server/0103-Ridables.patch b/patches/server/0102-Ridables.patch similarity index 98% rename from patches/server/0103-Ridables.patch rename to patches/server/0102-Ridables.patch index 87f692970..ea0025ec3 100644 --- a/patches/server/0103-Ridables.patch +++ b/patches/server/0102-Ridables.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ridables diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 502675b7bef3322b88efff650b239bfedebc0785..45722de76788886efa664b1b4124903bf6870e7c 100644 +index afe3c53252354760b22901f7f109fd5d265928e0..aacc1b82ed178d6c0e499a53ce1aec7e20dad875 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1544,6 +1544,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0.0D; } @@ -203,7 +203,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 public void a(float f, Vec3D vec3d) { Vec3D vec3d1 = a(vec3d, f, this.yaw); -@@ -2409,6 +2410,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2375,6 +2376,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return this.a(entity, false); } @@ -211,7 +211,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 public boolean a(Entity entity, boolean flag) { for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) { if (entity1.vehicle == this) { -@@ -2504,6 +2506,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2470,6 +2472,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.passengers.add(entity); } @@ -225,7 +225,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 } return true; // CraftBukkit } -@@ -2544,6 +2553,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2510,6 +2519,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return false; } // Spigot end @@ -238,7 +238,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 this.passengers.remove(entity); entity.j = 60; } -@@ -2710,6 +2725,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2676,6 +2691,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.setFlag(4, flag); } @@ -246,7 +246,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 public boolean bE() { return this.glowing || this.world.isClientSide && this.getFlag(6); } -@@ -2932,6 +2948,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2898,6 +2914,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne public void setHeadRotation(float f) {} @@ -254,7 +254,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 public void n(float f) {} public boolean bL() { -@@ -3373,6 +3390,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3339,6 +3356,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return false; } @@ -273,7 +273,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 @Override public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {} -@@ -3825,4 +3854,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3791,4 +3820,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return ((ChunkProviderServer) world.getChunkProvider()).isInEntityTickingChunk(this); } // Paper end @@ -322,7 +322,7 @@ index 0c98115022d5af56b41429b090048dd52243ca3f..7856e81266c9b63eebeb7b302e64c1c6 + // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 7fa6c3e71b01166e563bf33c1c8606b116930ebe..30d76626bd13cfa99df99f2c1346aaac2df339a0 100644 +index fdc1b99f0a032a76a02ee88b28d62e049a2fc54c..0ee99a2c9a966eaaaf09879cce2f54bc68eb3151 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -46,8 +46,6 @@ import net.minecraft.world.entity.ai.sensing.EntitySenses; @@ -387,7 +387,7 @@ index 7fa6c3e71b01166e563bf33c1c8606b116930ebe..30d76626bd13cfa99df99f2c1346aaac public void v(float f) { this.aR = f; } -@@ -1335,7 +1336,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1326,7 +1327,7 @@ public abstract class EntityInsentient extends EntityLiving { protected void a(EntityHuman entityhuman, EntityInsentient entityinsentient) {} protected EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) { @@ -396,7 +396,7 @@ index 7fa6c3e71b01166e563bf33c1c8606b116930ebe..30d76626bd13cfa99df99f2c1346aaac } public boolean ev() { -@@ -1716,4 +1717,54 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1707,4 +1708,54 @@ public abstract class EntityInsentient extends EntityLiving { this.unleash(true, event.isDropLeash()); // Paper end } @@ -452,10 +452,10 @@ index 7fa6c3e71b01166e563bf33c1c8606b116930ebe..30d76626bd13cfa99df99f2c1346aaac + // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 818363663cabe88bc9f76b8e6e57725c4f2f992a..377f850d2aa29e5cd8903cb65b5d85acbfff2030 100644 +index 5fcdfb400389b5026c286f7e38bbfe31b57c8a66..ec7a0dd11b4fca286fab3d68bd40e198171e7bd9 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -559,7 +559,7 @@ public abstract class EntityLiving extends Entity { +@@ -558,7 +558,7 @@ public abstract class EntityLiving extends Entity { @Override public boolean bt() { @@ -464,7 +464,7 @@ index 818363663cabe88bc9f76b8e6e57725c4f2f992a..377f850d2aa29e5cd8903cb65b5d85ac } protected void cU() { -@@ -2313,7 +2313,7 @@ public abstract class EntityLiving extends Entity { +@@ -2297,7 +2297,7 @@ public abstract class EntityLiving extends Entity { return 0.42F * this.getBlockJumpFactor(); } @@ -473,7 +473,7 @@ index 818363663cabe88bc9f76b8e6e57725c4f2f992a..377f850d2aa29e5cd8903cb65b5d85ac float f = this.dJ(); if (this.hasEffect(MobEffects.JUMP)) { -@@ -2562,10 +2562,12 @@ public abstract class EntityLiving extends Entity { +@@ -2546,10 +2546,12 @@ public abstract class EntityLiving extends Entity { return this.onGround ? this.dN() * (0.21600002F / (f * f * f)) : this.aE; } @@ -486,7 +486,7 @@ index 818363663cabe88bc9f76b8e6e57725c4f2f992a..377f850d2aa29e5cd8903cb65b5d85ac public void q(float f) { this.bu = f; } -@@ -2951,8 +2953,10 @@ public abstract class EntityLiving extends Entity { +@@ -2935,8 +2937,10 @@ public abstract class EntityLiving extends Entity { this.collideNearby(); this.world.getMethodProfiler().exit(); // Paper start @@ -499,7 +499,7 @@ index 818363663cabe88bc9f76b8e6e57725c4f2f992a..377f850d2aa29e5cd8903cb65b5d85ac Location from = new Location(world.getWorld(), lastX, lastY, lastZ, lastYaw, lastPitch); Location to = new Location (world.getWorld(), locX(), locY(), locZ(), yaw, pitch); EntityMoveEvent event = new EntityMoveEvent(getBukkitLivingEntity(), from, to.clone()); -@@ -2962,6 +2966,21 @@ public abstract class EntityLiving extends Entity { +@@ -2946,6 +2950,21 @@ public abstract class EntityLiving extends Entity { setLocation(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch()); } } @@ -679,10 +679,10 @@ index 2aa5789437ba7eb20579da238c407a65a25b1d44..434229b146978ba7dc08a83ea55fdb3a public ControllerMove(EntityInsentient entityinsentient) { diff --git a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -index 341b95f73a839a548b202e7bf97fd18760c71fd8..a99c2b4281196ad3b93292da52fc4c6bf4207181 100644 +index 61ebb278cf4ef57ae7a86c6c6ef1fa14559f21e2..bee72578fae2fba56f8e8dcc1142ab54c7ba7cb8 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -@@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityPose; +@@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityPose; import net.minecraft.world.entity.EntitySize; import net.minecraft.world.entity.EntityTypes; import net.minecraft.world.entity.EnumMobSpawn; @@ -690,7 +690,7 @@ index 341b95f73a839a548b202e7bf97fd18760c71fd8..a99c2b4281196ad3b93292da52fc4c6b import net.minecraft.world.entity.ai.attributes.AttributeProvider; import net.minecraft.world.entity.ai.attributes.GenericAttributes; import net.minecraft.world.entity.ai.targeting.PathfinderTargetCondition; -@@ -41,9 +42,48 @@ public class EntityBat extends EntityAmbient { +@@ -40,9 +41,48 @@ public class EntityBat extends EntityAmbient { public EntityBat(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -739,7 +739,7 @@ index 341b95f73a839a548b202e7bf97fd18760c71fd8..a99c2b4281196ad3b93292da52fc4c6b @Override protected void initDatawatcher() { super.initDatawatcher(); -@@ -88,7 +128,7 @@ public class EntityBat extends EntityAmbient { +@@ -87,7 +127,7 @@ public class EntityBat extends EntityAmbient { protected void collideNearby() {} public static AttributeProvider.Builder m() { @@ -748,7 +748,7 @@ index 341b95f73a839a548b202e7bf97fd18760c71fd8..a99c2b4281196ad3b93292da52fc4c6b } public boolean isAsleep() { -@@ -120,6 +160,13 @@ public class EntityBat extends EntityAmbient { +@@ -119,6 +159,13 @@ public class EntityBat extends EntityAmbient { @Override protected void mobTick() { @@ -3690,7 +3690,7 @@ index ea776755767f29e49de2792afa30f79420d0fa4c..1d4039d61a2c77a38a31947010cee26f @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c19431ee42540 100644 +index 1e50f7c51f88afaed01777d2da9ed543718a610d..a15dbd76e1d1afae7eb3809ef2e0448d8e2ab8e6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -3701,7 +3701,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c1943 import net.minecraft.server.level.WorldServer; import net.minecraft.sounds.SoundEffect; import net.minecraft.sounds.SoundEffects; -@@ -85,9 +86,22 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -84,9 +85,22 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { this.a(PathType.WATER, -1.0F); } @@ -3724,7 +3724,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c1943 this.goalSelector.a(1, new EntityEnderman.a(this)); this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, 1.0D, false)); this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D, 0.0F)); -@@ -95,6 +109,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -94,6 +108,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); this.goalSelector.a(10, new EntityEnderman.PathfinderGoalEndermanPlaceBlock(this)); this.goalSelector.a(11, new EntityEnderman.PathfinderGoalEndermanPickupBlock(this)); @@ -3732,7 +3732,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c1943 this.targetSelector.a(1, new EntityEnderman.PathfinderGoalPlayerWhoLookedAtTarget(this, this::a_)); this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, new Class[0])); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityEndermite.class, 10, true, false, EntityEnderman.bq)); -@@ -275,7 +290,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -274,7 +289,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { @Override protected void mobTick() { @@ -3741,7 +3741,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c1943 float f = this.aR(); if (f > 0.5F && this.world.e(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper -@@ -384,6 +399,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -376,6 +391,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { if (this.isInvulnerable(damagesource)) { return false; } else if (net.pl3x.purpur.PurpurConfig.endermanShortHeight && damagesource == DamageSource.STUCK) { return false; // Purpur - no suffocation damage if short height @@ -3749,7 +3749,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c1943 } else if (damagesource instanceof EntityDamageSourceIndirect) { if (this.tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start for (int i = 0; i < 64; ++i) { -@@ -428,6 +444,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -420,6 +436,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { public PathfinderGoalEndermanPickupBlock(EntityEnderman entityenderman) { this.enderman = entityenderman; @@ -3757,7 +3757,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c1943 } @Override -@@ -470,6 +487,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -462,6 +479,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { public PathfinderGoalEndermanPlaceBlock(EntityEnderman entityenderman) { this.a = entityenderman; @@ -5295,10 +5295,18 @@ index 99d0932e5352589cfbcc48a5e789651d0d77edde..b8395c7317494adf36010080931a1c86 public boolean jockeyOnlyBaby() { return world.purpurConfig.zombieVillagerJockeyOnlyBaby; diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -index 9aa4850e021076fde306eea7eec104c31086c57f..c2e32121f693a6207e6239c26a1fd6e60d0ce434 100644 +index 375409f4b72edc7990da90460b30486fb2980fb6..9bac45983b55abf9b72f2c45f632cdedd48f81f9 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -@@ -61,6 +61,18 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { +@@ -54,13 +54,25 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { + public int conversionTicks = 0; + public boolean cannotBeHunted = false; + protected static final ImmutableList>> bo = ImmutableList.of(SensorType.c, SensorType.d, SensorType.n, SensorType.m); +- protected static final ImmutableList> bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED}); ++ protected static final ImmutableList bp = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.MOBS, MemoryModuleType.VISIBLE_MOBS, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULY, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED}); // Purpur - decompile error + + public EntityHoglin(EntityTypes entitytypes, World world) { + super(entitytypes, world); this.f = 5; } @@ -5317,16 +5325,34 @@ index 9aa4850e021076fde306eea7eec104c31086c57f..c2e32121f693a6207e6239c26a1fd6e6 @Override public boolean a(EntityHuman entityhuman) { return !this.isLeashed(); -@@ -127,6 +139,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { - // Airplane - dynamic tick - if (!gg.airplane.AirplaneConfig.dynamicHoglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) { +@@ -118,13 +130,14 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { + + @Override + public BehaviorController getBehaviorController() { +- return super.getBehaviorController(); ++ return (BehaviorController) super.getBehaviorController(); // Purpur decompile error + } + + @Override + protected void mobTick() { this.world.getMethodProfiler().enter("hoglinBrain"); +- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this); + if (getPurpurRider() == null) // Purpur - only use brain if no rider - this.getBehaviorController().a((WorldServer) this.world, (EntityHoglin) this); // Airplane - decompile error ++ this.getBehaviorController().a((WorldServer) this.world, this); // Purpour - decompile error this.world.getMethodProfiler().exit(); HoglinAI.a(this); + if (this.isConverting()) { +@@ -300,7 +313,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { + + @Override + protected SoundEffect getSoundAmbient() { +- return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse((Object) null); ++ return this.world.isClientSide ? null : (SoundEffect) HoglinAI.b(this).orElse(null); // Purpur - decompile error + } + + @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -index 99cdcc9a9a7e6227a165c4ef779f8e76a99ec56a..a2e90d890dfe62666c79969b9de9d9cd78ee2cf3 100644 +index 9a7bebd77302dbfd07ac802acbe2b9cb80eec26f..edac17b1072102abe322d69072c4277e6c21cfbe 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java @@ -86,6 +86,18 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { @@ -5348,9 +5374,9 @@ index 99cdcc9a9a7e6227a165c4ef779f8e76a99ec56a..a2e90d890dfe62666c79969b9de9d9cd @Override public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); -@@ -278,6 +290,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { - // Airplane - dynamic tick - if (!gg.airplane.AirplaneConfig.dynamicPiglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) { +@@ -275,6 +287,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { + @Override + protected void mobTick() { this.world.getMethodProfiler().enter("piglinBrain"); + if (getPurpurRider() == null) // Purpur - only use brain if no rider this.getBehaviorController().a((WorldServer) this.world, (EntityPiglin) this); // CraftBukkit - decompile error @@ -5399,7 +5425,7 @@ index 3d85501791fce621335f34bf508becb74b80210d..1370d2d8568a4ed62f2ec3d54abc7d2b PiglinBruteAI.b(this); PiglinBruteAI.c(this); diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index f2c4d2610ad10dc4fdaf7178e8cee56bfa06acfc..59215aaaa7237c39c9049aa5d106d83d1a65e392 100644 +index 2ff9dffc0f0b20582f5b3bffd01743ee26c63c20..85242947bd115f63f8807e1d4e6784fff537e802 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -32,6 +32,7 @@ import net.minecraft.network.syncher.DataWatcherObject; @@ -5430,7 +5456,7 @@ index f2c4d2610ad10dc4fdaf7178e8cee56bfa06acfc..59215aaaa7237c39c9049aa5d106d83d if (world.purpurConfig.villagerFollowEmeraldBlock) this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.0D, false, TEMPT_ITEMS)); } -@@ -317,7 +329,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -311,7 +323,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation if (itemstack.getItem() != Items.VILLAGER_SPAWN_EGG && this.isAlive() && !this.eN() && !this.isSleeping()) { if (this.isBaby()) { this.fk(); @@ -5439,7 +5465,7 @@ index f2c4d2610ad10dc4fdaf7178e8cee56bfa06acfc..59215aaaa7237c39c9049aa5d106d83d } else { boolean flag = this.getOffers().isEmpty(); -@@ -330,8 +342,9 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -324,8 +336,9 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation } if (flag) { @@ -5499,7 +5525,7 @@ index 8df4d985e3124ddc1643da8385b15348937bc320..6c390fb20c7f29133a60780a75676d8d this.setTradingPlayer(entityhuman); this.openTrade(entityhuman, this.getScoreboardDisplayName(), 1); diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index 1b130b50888113d515ce1e200a157c3bbff3b625..a70c557de56c5ba04cb520108cdb037eb9cad8a9 100644 +index f9ce15aa4a2b1ee07f9c31b793410a4ff27ec829..ba8add51b86fc8a6417c1a9ac7a97ac605a9939b 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java @@ -111,7 +111,6 @@ import net.minecraft.world.phys.AxisAlignedBB; @@ -5510,7 +5536,7 @@ index 1b130b50888113d515ce1e200a157c3bbff3b625..a70c557de56c5ba04cb520108cdb037e // CraftBukkit start import org.bukkit.craftbukkit.entity.CraftHumanEntity; -@@ -183,6 +182,8 @@ public abstract class EntityHuman extends EntityLiving { +@@ -182,6 +181,8 @@ public abstract class EntityHuman extends EntityLiving { // CraftBukkit end // Purpur start @@ -5519,7 +5545,7 @@ index 1b130b50888113d515ce1e200a157c3bbff3b625..a70c557de56c5ba04cb520108cdb037e private javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); public void setAfk(boolean setAfk){ -@@ -2271,4 +2272,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2265,4 +2266,15 @@ public abstract class EntityHuman extends EntityLiving { return this.g; } } @@ -5590,10 +5616,10 @@ index 96efd974f1eb9c1e7c70e576e51ed69e15aacb99..fc86ef53c48503139667f7703019a07c default int getHeight() { diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 8382d0f3158da3c90bba082e62411998632c3644..0167222759972d1221284bb6eb0de6779c3b9a95 100644 +index 137583da4926ce85d258fce98c919618d02a5f77..b6b4e759975776afcb9d33e650774b9e30d7eb96 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1842,5 +1842,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1748,5 +1748,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean isTheEnd() { return getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END; } diff --git a/patches/server/0104-Use-configured-height-for-nether-surface-builders.patch b/patches/server/0103-Use-configured-height-for-nether-surface-builders.patch similarity index 100% rename from patches/server/0104-Use-configured-height-for-nether-surface-builders.patch rename to patches/server/0103-Use-configured-height-for-nether-surface-builders.patch diff --git a/patches/server/0105-Crying-obsidian-valid-for-portal-frames.patch b/patches/server/0104-Crying-obsidian-valid-for-portal-frames.patch similarity index 97% rename from patches/server/0105-Crying-obsidian-valid-for-portal-frames.patch rename to patches/server/0104-Crying-obsidian-valid-for-portal-frames.patch index 8fac28f1a..d43c04040 100644 --- a/patches/server/0105-Crying-obsidian-valid-for-portal-frames.patch +++ b/patches/server/0104-Crying-obsidian-valid-for-portal-frames.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Crying obsidian valid for portal frames diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 2448ff8e3a9c60d6d99dd8f4d3033553b2780c77..fa43eb5e31a9e3c6d6725ef770a7d1b3aec4d663 100644 +index cfdc602947548970b3fde00dd9fddf4e82c28841..4e0b88e26ad8017d93841c4149a1687c1db4ff0b 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -140,6 +140,7 @@ public class Block extends BlockBase implements IMaterial { diff --git a/patches/server/0106-Entities-can-use-portals-configuration.patch b/patches/server/0105-Entities-can-use-portals-configuration.patch similarity index 93% rename from patches/server/0106-Entities-can-use-portals-configuration.patch rename to patches/server/0105-Entities-can-use-portals-configuration.patch index d2c05eeaf..23b7bc9df 100644 --- a/patches/server/0106-Entities-can-use-portals-configuration.patch +++ b/patches/server/0105-Entities-can-use-portals-configuration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entities can use portals configuration diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7856e81266c9b63eebeb7b302e64c1c697841aae..90b8e9d7fb97b410cb4b7b555033ce3f14acba78 100644 +index a570f8c5d01dbfbfe4f4bfe8b53c1313efc972ae..fdbe014c12a90ca3be389d0f83a96235aff22093 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2585,7 +2585,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2551,7 +2551,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne public void d(BlockPosition blockposition) { if (this.ai()) { this.resetPortalCooldown(); @@ -17,7 +17,7 @@ index 7856e81266c9b63eebeb7b302e64c1c697841aae..90b8e9d7fb97b410cb4b7b555033ce3f if (!this.world.isClientSide && !blockposition.equals(this.ac)) { this.ac = blockposition.immutableCopy(); } -@@ -3166,7 +3166,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3132,7 +3132,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } public boolean canPortal() { diff --git a/patches/server/0107-LivingEntity-broadcastItemBreak.patch b/patches/server/0106-LivingEntity-broadcastItemBreak.patch similarity index 100% rename from patches/server/0107-LivingEntity-broadcastItemBreak.patch rename to patches/server/0106-LivingEntity-broadcastItemBreak.patch diff --git a/patches/server/0108-Customizable-wither-health-and-healing.patch b/patches/server/0107-Customizable-wither-health-and-healing.patch similarity index 100% rename from patches/server/0108-Customizable-wither-health-and-healing.patch rename to patches/server/0107-Customizable-wither-health-and-healing.patch diff --git a/patches/server/0109-Allow-toggling-special-MobSpawners-per-world.patch b/patches/server/0108-Allow-toggling-special-MobSpawners-per-world.patch similarity index 97% rename from patches/server/0109-Allow-toggling-special-MobSpawners-per-world.patch rename to patches/server/0108-Allow-toggling-special-MobSpawners-per-world.patch index 835f6c8eb..5a9411e20 100644 --- a/patches/server/0109-Allow-toggling-special-MobSpawners-per-world.patch +++ b/patches/server/0108-Allow-toggling-special-MobSpawners-per-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow toggling special MobSpawners per world In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this. diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index de31df7d621ca255ff17c4267bccaf3471ad1c21..f46908b949e0b683336bbf52ec2e5e833c43838d 100644 +index 08e4fab02a740bf0c30985e2a858da2ae2caf8d8..d4df33c7cb47c10987431b7c863d429d2a9e82bc 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -92,6 +92,7 @@ import net.minecraft.world.entity.EnumCreatureType; @@ -93,10 +93,10 @@ index 7c8a2151be8a0f48cba1c15d231d5dbdb500b4d6..361771fc4fcf16b1b013c55073401953 if (SpawnerCreature.a(EntityPositionTypes.Surface.ON_GROUND, iworldreader, blockposition2, EntityTypes.WANDERING_TRADER)) { blockposition1 = blockposition2; diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 0167222759972d1221284bb6eb0de6779c3b9a95..edc6e9ea7f6b4fcdab004188e4c6a6e4763a6196 100644 +index b6b4e759975776afcb9d33e650774b9e30d7eb96..a3215b1cccf4d00de888ca4696c03ffb6adf7041 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -258,7 +258,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -255,7 +255,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config diff --git a/patches/server/0110-Raid-cooldown-setting.patch b/patches/server/0109-Raid-cooldown-setting.patch similarity index 100% rename from patches/server/0110-Raid-cooldown-setting.patch rename to patches/server/0109-Raid-cooldown-setting.patch diff --git a/patches/server/0111-Despawn-rate-config-options-per-projectile-type.patch b/patches/server/0110-Despawn-rate-config-options-per-projectile-type.patch similarity index 100% rename from patches/server/0111-Despawn-rate-config-options-per-projectile-type.patch rename to patches/server/0110-Despawn-rate-config-options-per-projectile-type.patch diff --git a/patches/server/0112-Add-option-to-disable-zombie-aggressiveness-towards-.patch b/patches/server/0111-Add-option-to-disable-zombie-aggressiveness-towards-.patch similarity index 100% rename from patches/server/0112-Add-option-to-disable-zombie-aggressiveness-towards-.patch rename to patches/server/0111-Add-option-to-disable-zombie-aggressiveness-towards-.patch diff --git a/patches/server/0113-Persistent-TileEntity-Lore-and-DisplayName.patch b/patches/server/0112-Persistent-TileEntity-Lore-and-DisplayName.patch similarity index 99% rename from patches/server/0113-Persistent-TileEntity-Lore-and-DisplayName.patch rename to patches/server/0112-Persistent-TileEntity-Lore-and-DisplayName.patch index 1a90317e2..4cf355e9b 100644 --- a/patches/server/0113-Persistent-TileEntity-Lore-and-DisplayName.patch +++ b/patches/server/0112-Persistent-TileEntity-Lore-and-DisplayName.patch @@ -61,7 +61,7 @@ index 59d52c252b2e59923b8e513dd4d2e1ec9ce34dc7..4be1c8ee85f411a8b01be50b8cc3dc38 @Nullable diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index fa43eb5e31a9e3c6d6725ef770a7d1b3aec4d663..a835285d230ea0dffa1b28c2a7a006041f2e6b2a 100644 +index 4e0b88e26ad8017d93841c4149a1687c1db4ff0b..f65201f8cbf6d402b4366d63bfa03aacf329860f 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -15,10 +15,15 @@ import net.minecraft.core.EnumDirection; diff --git a/patches/server/0114-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch b/patches/server/0113-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch similarity index 100% rename from patches/server/0114-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch rename to patches/server/0113-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch diff --git a/patches/server/0115-Flying-squids-Oh-my.patch b/patches/server/0114-Flying-squids-Oh-my.patch similarity index 100% rename from patches/server/0115-Flying-squids-Oh-my.patch rename to patches/server/0114-Flying-squids-Oh-my.patch diff --git a/patches/server/0116-Infinity-bow-settings.patch b/patches/server/0115-Infinity-bow-settings.patch similarity index 100% rename from patches/server/0116-Infinity-bow-settings.patch rename to patches/server/0115-Infinity-bow-settings.patch diff --git a/patches/server/0117-Stonecutter-damage.patch b/patches/server/0116-Stonecutter-damage.patch similarity index 96% rename from patches/server/0117-Stonecutter-damage.patch rename to patches/server/0116-Stonecutter-damage.patch index d38b75d06..7eebc4c7b 100644 --- a/patches/server/0117-Stonecutter-damage.patch +++ b/patches/server/0116-Stonecutter-damage.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Stonecutter damage diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 90b8e9d7fb97b410cb4b7b555033ce3f14acba78..a586f486996b3bb59067a6d25ace100c24b63ecf 100644 +index fdbe014c12a90ca3be389d0f83a96235aff22093..b2570c5c4ac819c36f2c236e29a3b3a73e8cd3de 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -925,7 +925,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -891,7 +891,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } // CraftBukkit end diff --git a/patches/server/0118-Configurable-daylight-cycle.patch b/patches/server/0117-Configurable-daylight-cycle.patch similarity index 95% rename from patches/server/0118-Configurable-daylight-cycle.patch rename to patches/server/0117-Configurable-daylight-cycle.patch index 9a8a32a65..60e99ea96 100644 --- a/patches/server/0118-Configurable-daylight-cycle.patch +++ b/patches/server/0117-Configurable-daylight-cycle.patch @@ -18,7 +18,7 @@ index 3086ee023685781d94e2fb99fc8dff5264f01165..74c1047305cac5673e274096709c757e public PacketPlayOutUpdateTime() {} diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index f46908b949e0b683336bbf52ec2e5e833c43838d..801242b2389591df832a90b0c8852059a4c0f04b 100644 +index d4df33c7cb47c10987431b7c863d429d2a9e82bc..ab0e16b8f659ff86f022fef210b97dfa59206b0c 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -64,6 +64,7 @@ import net.minecraft.network.protocol.game.PacketPlayOutExplosion; @@ -45,7 +45,7 @@ index f46908b949e0b683336bbf52ec2e5e833c43838d..801242b2389591df832a90b0c8852059 } // Tuinity start - optimise collision -@@ -1227,7 +1230,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1190,7 +1193,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.nextTickListBlock.nextTick(); // Paper this.nextTickListFluid.nextTick(); // Paper this.worldDataServer.u().a(this.server, i); @@ -68,7 +68,7 @@ index f46908b949e0b683336bbf52ec2e5e833c43838d..801242b2389591df832a90b0c8852059 this.setDayTime(this.worldData.getDayTime() + 1L); } -@@ -1236,6 +1253,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1199,6 +1216,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { public void setDayTime(long i) { this.worldDataServer.setDayTime(i); diff --git a/patches/server/0119-Allow-infinite-and-mending-enchantments-together.patch b/patches/server/0118-Allow-infinite-and-mending-enchantments-together.patch similarity index 100% rename from patches/server/0119-Allow-infinite-and-mending-enchantments-together.patch rename to patches/server/0118-Allow-infinite-and-mending-enchantments-together.patch diff --git a/patches/server/0120-Infinite-fuel-furnace.patch b/patches/server/0119-Infinite-fuel-furnace.patch similarity index 100% rename from patches/server/0120-Infinite-fuel-furnace.patch rename to patches/server/0119-Infinite-fuel-furnace.patch diff --git a/patches/server/0121-Arrows-should-not-reset-despawn-counter.patch b/patches/server/0120-Arrows-should-not-reset-despawn-counter.patch similarity index 100% rename from patches/server/0121-Arrows-should-not-reset-despawn-counter.patch rename to patches/server/0120-Arrows-should-not-reset-despawn-counter.patch diff --git a/patches/server/0122-Add-tablist-suffix-option-for-afk.patch b/patches/server/0121-Add-tablist-suffix-option-for-afk.patch similarity index 100% rename from patches/server/0122-Add-tablist-suffix-option-for-afk.patch rename to patches/server/0121-Add-tablist-suffix-option-for-afk.patch diff --git a/patches/server/0123-Ability-to-re-add-farmland-mechanics-from-Alpha.patch b/patches/server/0122-Ability-to-re-add-farmland-mechanics-from-Alpha.patch similarity index 100% rename from patches/server/0123-Ability-to-re-add-farmland-mechanics-from-Alpha.patch rename to patches/server/0122-Ability-to-re-add-farmland-mechanics-from-Alpha.patch diff --git a/patches/server/0124-Add-adjustable-breeding-cooldown-to-config.patch b/patches/server/0123-Add-adjustable-breeding-cooldown-to-config.patch similarity index 96% rename from patches/server/0124-Add-adjustable-breeding-cooldown-to-config.patch rename to patches/server/0123-Add-adjustable-breeding-cooldown-to-config.patch index c4b672975..619b2e5ea 100644 --- a/patches/server/0124-Add-adjustable-breeding-cooldown-to-config.patch +++ b/patches/server/0123-Add-adjustable-breeding-cooldown-to-config.patch @@ -33,10 +33,10 @@ index 4de0a733819d408e8b9a55b604f455281d7732c5..94b5874c1eb90c02a557179a2a1170b1 entityageable.setBaby(true); entityageable.setPositionRotation(this.locX(), this.locY(), this.locZ(), 0.0F, 0.0F); diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index edc6e9ea7f6b4fcdab004188e4c6a6e4763a6196..2108ba779bbe4d3a060c494f54909952f659ddea 100644 +index a3215b1cccf4d00de888ca4696c03ffb6adf7041..cb58d2635650c20da21583ead18e9f380323205b 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -42,6 +42,7 @@ import net.minecraft.world.DifficultyDamageScaler; +@@ -41,6 +41,7 @@ import net.minecraft.world.DifficultyDamageScaler; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityTypes; @@ -44,7 +44,7 @@ index edc6e9ea7f6b4fcdab004188e4c6a6e4763a6196..2108ba779bbe4d3a060c494f54909952 import net.minecraft.world.entity.decoration.EntityArmorStand; import net.minecraft.world.entity.player.EntityHuman; import net.minecraft.world.item.ItemStack; -@@ -167,6 +168,48 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -164,6 +165,48 @@ public abstract class World implements GeneratorAccess, AutoCloseable { private int tileTickPosition; public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here @@ -93,7 +93,7 @@ index edc6e9ea7f6b4fcdab004188e4c6a6e4763a6196..2108ba779bbe4d3a060c494f54909952 public CraftWorld getWorld() { return this.world; -@@ -259,6 +302,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -256,6 +299,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()), env); // Purpur diff --git a/patches/server/0125-Make-entity-breeding-times-configurable.patch b/patches/server/0124-Make-entity-breeding-times-configurable.patch similarity index 99% rename from patches/server/0125-Make-entity-breeding-times-configurable.patch rename to patches/server/0124-Make-entity-breeding-times-configurable.patch index 9f54bbcc8..367ef4e7c 100644 --- a/patches/server/0125-Make-entity-breeding-times-configurable.patch +++ b/patches/server/0124-Make-entity-breeding-times-configurable.patch @@ -412,7 +412,7 @@ index 14dda6743ed9e6f4880bc560f7ba8892d8e84afe..cba66a08feceeeaf7c123da595fc7b12 public static boolean c(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -index c2e32121f693a6207e6239c26a1fd6e60d0ce434..8c2815c8b11c8db8e6c1d0caf71188322e52094d 100644 +index 9bac45983b55abf9b72f2c45f632cdedd48f81f9..9f2af4b37ffb22034b537cc27b42d520a41d4fe7 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java @@ -71,6 +71,11 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { diff --git a/patches/server/0126-Apply-display-names-from-item-forms-of-entities-to-e.patch b/patches/server/0125-Apply-display-names-from-item-forms-of-entities-to-e.patch similarity index 100% rename from patches/server/0126-Apply-display-names-from-item-forms-of-entities-to-e.patch rename to patches/server/0125-Apply-display-names-from-item-forms-of-entities-to-e.patch diff --git a/patches/server/0127-Set-name-visible-when-using-a-Name-Tag-on-an-Armor-S.patch b/patches/server/0126-Set-name-visible-when-using-a-Name-Tag-on-an-Armor-S.patch similarity index 100% rename from patches/server/0127-Set-name-visible-when-using-a-Name-Tag-on-an-Armor-S.patch rename to patches/server/0126-Set-name-visible-when-using-a-Name-Tag-on-an-Armor-S.patch diff --git a/patches/server/0128-Add-twisting-and-weeping-vines-growth-rates.patch b/patches/server/0127-Add-twisting-and-weeping-vines-growth-rates.patch similarity index 100% rename from patches/server/0128-Add-twisting-and-weeping-vines-growth-rates.patch rename to patches/server/0127-Add-twisting-and-weeping-vines-growth-rates.patch diff --git a/patches/server/0129-Kelp-weeping-and-twisting-vines-configurable-max-gro.patch b/patches/server/0128-Kelp-weeping-and-twisting-vines-configurable-max-gro.patch similarity index 100% rename from patches/server/0129-Kelp-weeping-and-twisting-vines-configurable-max-gro.patch rename to patches/server/0128-Kelp-weeping-and-twisting-vines-configurable-max-gro.patch diff --git a/patches/server/0130-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch b/patches/server/0129-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch similarity index 93% rename from patches/server/0130-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch rename to patches/server/0129-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch index 5349d657e..e417ee9dd 100644 --- a/patches/server/0130-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch +++ b/patches/server/0129-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch @@ -8,10 +8,10 @@ This should help to reduce the amount of dirt, gravel, grass, and etc. that Endermen like to randomly place all over the world. diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 32ed22dbaaed536dd3df0fb59e3c19431ee42540..c04ff259f650b0e5a361c4f17b8b5ff9ecb8ab71 100644 +index a15dbd76e1d1afae7eb3809ef2e0448d8e2ab8e6..cae2b2139e398dd26e9562636f06e096b3e028ae 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -@@ -435,7 +435,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -427,7 +427,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { @Override public boolean isSpecialPersistence() { diff --git a/patches/server/0131-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch b/patches/server/0130-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch similarity index 93% rename from patches/server/0131-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch rename to patches/server/0130-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch index cb267fd44..3e51c3000 100644 --- a/patches/server/0131-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch +++ b/patches/server/0130-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add critical hit check to EntityDamagedByEntityEvent diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index a70c557de56c5ba04cb520108cdb037eb9cad8a9..78442fe87ceaf65b302536c893610aa0269b6dee 100644 +index ba8add51b86fc8a6417c1a9ac7a97ac605a9939b..c2a35fac1065b2b67a0a3ce94432246892f6f4a5 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -170,6 +170,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -169,6 +169,7 @@ public abstract class EntityHuman extends EntityLiving { // Paper start public boolean affectsSpawning = true; // Paper end @@ -16,7 +16,7 @@ index a70c557de56c5ba04cb520108cdb037eb9cad8a9..78442fe87ceaf65b302536c893610aa0 // CraftBukkit start public boolean fauxSleeping; -@@ -1177,6 +1178,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1176,6 +1177,7 @@ public abstract class EntityHuman extends EntityLiving { flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper flag2 = flag2 && !this.isSprinting(); if (flag2) { @@ -24,7 +24,7 @@ index a70c557de56c5ba04cb520108cdb037eb9cad8a9..78442fe87ceaf65b302536c893610aa0 f *= 1.5F; } -@@ -1213,6 +1215,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1212,6 +1214,7 @@ public abstract class EntityHuman extends EntityLiving { Vec3D vec3d = entity.getMot(); boolean flag5 = entity.damageEntity(DamageSource.playerAttack(this), f); diff --git a/patches/server/0132-Add-configurable-snowball-damage.patch b/patches/server/0131-Add-configurable-snowball-damage.patch similarity index 100% rename from patches/server/0132-Add-configurable-snowball-damage.patch rename to patches/server/0131-Add-configurable-snowball-damage.patch diff --git a/patches/server/0133-Zombie-break-door-minimum-difficulty-option.patch b/patches/server/0132-Zombie-break-door-minimum-difficulty-option.patch similarity index 100% rename from patches/server/0133-Zombie-break-door-minimum-difficulty-option.patch rename to patches/server/0132-Zombie-break-door-minimum-difficulty-option.patch diff --git a/patches/server/0134-Add-demo-command.patch b/patches/server/0133-Add-demo-command.patch similarity index 100% rename from patches/server/0134-Add-demo-command.patch rename to patches/server/0133-Add-demo-command.patch diff --git a/patches/server/0135-Left-handed-API.patch b/patches/server/0134-Left-handed-API.patch similarity index 100% rename from patches/server/0135-Left-handed-API.patch rename to patches/server/0134-Left-handed-API.patch diff --git a/patches/server/0136-Origami-Fix-ProtocolLib-issues-on-Java-15.patch b/patches/server/0135-Origami-Fix-ProtocolLib-issues-on-Java-15.patch similarity index 100% rename from patches/server/0136-Origami-Fix-ProtocolLib-issues-on-Java-15.patch rename to patches/server/0135-Origami-Fix-ProtocolLib-issues-on-Java-15.patch diff --git a/patches/server/0137-Changeable-Mob-Left-Handed-Chance.patch b/patches/server/0136-Changeable-Mob-Left-Handed-Chance.patch similarity index 92% rename from patches/server/0137-Changeable-Mob-Left-Handed-Chance.patch rename to patches/server/0136-Changeable-Mob-Left-Handed-Chance.patch index 760e2f8e8..f9bfd9196 100644 --- a/patches/server/0137-Changeable-Mob-Left-Handed-Chance.patch +++ b/patches/server/0136-Changeable-Mob-Left-Handed-Chance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Changeable Mob Left Handed Chance diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 30d76626bd13cfa99df99f2c1346aaac2df339a0..1f2b7727a49aa75987baf2de3f408d0ded007fa7 100644 +index 0ee99a2c9a966eaaaf09879cce2f54bc68eb3151..8c74adf071e1edb640b3f2375bc92567cc2f6086 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -1217,7 +1217,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1208,7 +1208,7 @@ public abstract class EntityInsentient extends EntityLiving { @Nullable public GroupDataEntity prepare(WorldAccess worldaccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) { this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).addModifier(new AttributeModifier("Random spawn bonus", this.random.nextGaussian() * 0.05D, AttributeModifier.Operation.MULTIPLY_BASE)); diff --git a/patches/server/0138-Add-boat-fall-damage-config.patch b/patches/server/0137-Add-boat-fall-damage-config.patch similarity index 100% rename from patches/server/0138-Add-boat-fall-damage-config.patch rename to patches/server/0137-Add-boat-fall-damage-config.patch diff --git a/patches/server/0139-Config-migration-disable-saving-projectiles-to-disk-.patch b/patches/server/0138-Config-migration-disable-saving-projectiles-to-disk-.patch similarity index 100% rename from patches/server/0139-Config-migration-disable-saving-projectiles-to-disk-.patch rename to patches/server/0138-Config-migration-disable-saving-projectiles-to-disk-.patch diff --git a/patches/server/0140-Snow-Golem-rate-of-fire-config.patch b/patches/server/0139-Snow-Golem-rate-of-fire-config.patch similarity index 100% rename from patches/server/0140-Snow-Golem-rate-of-fire-config.patch rename to patches/server/0139-Snow-Golem-rate-of-fire-config.patch diff --git a/patches/server/0141-PaperPR-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0140-PaperPR-Config-option-for-Piglins-guarding-chests.patch similarity index 100% rename from patches/server/0141-PaperPR-Config-option-for-Piglins-guarding-chests.patch rename to patches/server/0140-PaperPR-Config-option-for-Piglins-guarding-chests.patch diff --git a/patches/server/0142-EMC-Configurable-disable-give-dropping.patch b/patches/server/0141-EMC-Configurable-disable-give-dropping.patch similarity index 100% rename from patches/server/0142-EMC-Configurable-disable-give-dropping.patch rename to patches/server/0141-EMC-Configurable-disable-give-dropping.patch diff --git a/patches/server/0143-Config-migration-climbing-should-not-bypass-cramming.patch b/patches/server/0142-Config-migration-climbing-should-not-bypass-cramming.patch similarity index 100% rename from patches/server/0143-Config-migration-climbing-should-not-bypass-cramming.patch rename to patches/server/0142-Config-migration-climbing-should-not-bypass-cramming.patch diff --git a/patches/server/0144-Lobotomize-stuck-villagers.patch b/patches/server/0143-Lobotomize-stuck-villagers.patch similarity index 88% rename from patches/server/0144-Lobotomize-stuck-villagers.patch rename to patches/server/0143-Lobotomize-stuck-villagers.patch index 7533a626c..1f4dbeb21 100644 --- a/patches/server/0144-Lobotomize-stuck-villagers.patch +++ b/patches/server/0143-Lobotomize-stuck-villagers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Lobotomize stuck villagers diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a586f486996b3bb59067a6d25ace100c24b63ecf..829dc166548c7fc2890aa4abb5906586b448306f 100644 +index b2570c5c4ac819c36f2c236e29a3b3a73e8cd3de..6b31a41536a766a53d4e1106c91744573bb94c9b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -206,7 +206,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -18,7 +18,7 @@ index a586f486996b3bb59067a6d25ace100c24b63ecf..829dc166548c7fc2890aa4abb5906586 public float yaw; public float pitch; diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java -index 48e6a4c588ef39a4bde067d79b96a656c68750ce..ac7bad10697c6fde7d512753992d59710aa1e032 100644 +index 148bdbc2cffb002d8b6dd05e70854ab503804949..a1b7ba4f2cef36e9ac7e21c22060090944ba943b 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/NavigationAbstract.java @@ -123,6 +123,7 @@ public abstract class NavigationAbstract { @@ -30,7 +30,7 @@ index 48e6a4c588ef39a4bde067d79b96a656c68750ce..ac7bad10697c6fde7d512753992d5971 // Paper start - add target parameter return this.a(blockposition, null, i); diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index 59215aaaa7237c39c9049aa5d106d83d1a65e392..53cc18543c113efba90df126b3a5a9931954c4d7 100644 +index 85242947bd115f63f8807e1d4e6784fff537e802..df73d1ff1d5c2e878693aabf50105e315a0152c9 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -89,6 +89,7 @@ import net.minecraft.world.level.IWorldReader; @@ -41,10 +41,12 @@ index 59215aaaa7237c39c9049aa5d106d83d1a65e392..53cc18543c113efba90df126b3a5a993 import net.minecraft.world.phys.AxisAlignedBB; import org.apache.logging.log4j.Logger; -@@ -260,11 +261,32 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - - private int behaviorTick = 0; +@@ -258,15 +259,39 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + } + // Spigot End ++ private int behaviorTick = 0; ++ + // Purpur start + boolean lobotomized = false; + @@ -74,15 +76,12 @@ index 59215aaaa7237c39c9049aa5d106d83d1a65e392..53cc18543c113efba90df126b3a5a993 boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0; if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick) // Purpur end -@@ -273,6 +295,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation - this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper - } - } + if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper + else if (shouldRestock()) doRestock(); // Purpur this.world.getMethodProfiler().exit(); if (this.bF) { this.bF = false; -@@ -404,6 +427,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -398,6 +423,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation return true; } @@ -90,7 +89,7 @@ index 59215aaaa7237c39c9049aa5d106d83d1a65e392..53cc18543c113efba90df126b3a5a993 public void fb() { this.fp(); Iterator iterator = this.getOffers().iterator(); -@@ -438,6 +462,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -432,6 +458,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation return this.bD == 0 || this.bD < 2 && this.world.getTime() > this.bC + 2400L; } diff --git a/patches/server/0145-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch b/patches/server/0144-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch similarity index 97% rename from patches/server/0145-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch rename to patches/server/0144-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch index 4c9415a4c..84321464b 100644 --- a/patches/server/0145-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch +++ b/patches/server/0144-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch @@ -8,10 +8,10 @@ farm Nether Wart. Reimplemented based on a feature of the carpet-extra mod. diff --git a/src/main/java/net/minecraft/world/IInventory.java b/src/main/java/net/minecraft/world/IInventory.java -index 8faf3850f4c965feec42f6998563b7265a8f599e..96f814a2946a69e53cc1bcbf5499c5058ff982af 100644 +index 774ba6a923f7e329f6af5efc17e1c46e87ed2d77..b8c73cd0ba916b7bf166a6d2f6b7ab68cd9c939b 100644 --- a/src/main/java/net/minecraft/world/IInventory.java +++ b/src/main/java/net/minecraft/world/IInventory.java -@@ -104,6 +104,7 @@ public interface IInventory extends Clearable { +@@ -38,6 +38,7 @@ public interface IInventory extends Clearable { return true; } @@ -19,7 +19,7 @@ index 8faf3850f4c965feec42f6998563b7265a8f599e..96f814a2946a69e53cc1bcbf5499c505 default int a(Item item) { int i = 0; -@@ -118,6 +119,7 @@ public interface IInventory extends Clearable { +@@ -52,6 +53,7 @@ public interface IInventory extends Clearable { return i; } @@ -186,7 +186,7 @@ index 25c10973c74f98224dd1d2ae5e7178b9781374aa..d50b5632f0e53147ea23109f1ed627b4 behaviorcontroller.removeMemory(MemoryModuleType.SECONDARY_JOB_SITE); } diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index 53cc18543c113efba90df126b3a5a9931954c4d7..ff08528debe1ce89e36b5daa1c9b0ba07b6ecff3 100644 +index df73d1ff1d5c2e878693aabf50105e315a0152c9..d888aa8df65d54a0dce23eaae609aa0d2c3be3d9 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -203,7 +203,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -198,7 +198,7 @@ index 53cc18543c113efba90df126b3a5a9931954c4d7..ff08528debe1ce89e36b5daa1c9b0ba0 } behaviorcontroller.a(Activity.CORE, Behaviors.a(villagerprofession, 0.5F)); -@@ -955,6 +955,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -951,6 +951,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation } public boolean canPlant() { diff --git a/patches/server/0146-Toggle-for-Zombified-Piglin-death-always-counting-as.patch b/patches/server/0145-Toggle-for-Zombified-Piglin-death-always-counting-as.patch similarity index 100% rename from patches/server/0146-Toggle-for-Zombified-Piglin-death-always-counting-as.patch rename to patches/server/0145-Toggle-for-Zombified-Piglin-death-always-counting-as.patch diff --git a/patches/server/0147-Spread-out-and-optimise-player-list-ticks.patch b/patches/server/0146-Spread-out-and-optimise-player-list-ticks.patch similarity index 100% rename from patches/server/0147-Spread-out-and-optimise-player-list-ticks.patch rename to patches/server/0146-Spread-out-and-optimise-player-list-ticks.patch diff --git a/patches/server/0148-Configurable-chance-for-wolves-to-spawn-rabid.patch b/patches/server/0147-Configurable-chance-for-wolves-to-spawn-rabid.patch similarity index 98% rename from patches/server/0148-Configurable-chance-for-wolves-to-spawn-rabid.patch rename to patches/server/0147-Configurable-chance-for-wolves-to-spawn-rabid.patch index 02e5895eb..134e63736 100644 --- a/patches/server/0148-Configurable-chance-for-wolves-to-spawn-rabid.patch +++ b/patches/server/0147-Configurable-chance-for-wolves-to-spawn-rabid.patch @@ -7,10 +7,10 @@ Configurable chance to spawn a wolf that is rabid. Rabid wolves attack all players, mobs, and animals. diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 377f850d2aa29e5cd8903cb65b5d85acbfff2030..f71aefbc7c8d6f78195a248abe4ec8cc8a99f04e 100644 +index ec7a0dd11b4fca286fab3d68bd40e198171e7bd9..f6f65cedffbae3d9bffed492682c6fa588102101 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -2213,6 +2213,7 @@ public abstract class EntityLiving extends Entity { +@@ -2197,6 +2197,7 @@ public abstract class EntityLiving extends Entity { } } diff --git a/patches/server/0149-Configurable-default-wolf-collar-color.patch b/patches/server/0148-Configurable-default-wolf-collar-color.patch similarity index 100% rename from patches/server/0149-Configurable-default-wolf-collar-color.patch rename to patches/server/0148-Configurable-default-wolf-collar-color.patch diff --git a/patches/server/0150-Configurable-entity-base-attributes.patch b/patches/server/0149-Configurable-entity-base-attributes.patch similarity index 99% rename from patches/server/0150-Configurable-entity-base-attributes.patch rename to patches/server/0149-Configurable-entity-base-attributes.patch index 6c296d81c..caec592d4 100644 --- a/patches/server/0150-Configurable-entity-base-attributes.patch +++ b/patches/server/0149-Configurable-entity-base-attributes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable entity base attributes diff --git a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -index a99c2b4281196ad3b93292da52fc4c6bf4207181..bd02320d450a7fd7254f01b1c44ef421c1810ea7 100644 +index bee72578fae2fba56f8e8dcc1142ab54c7ba7cb8..5c9e4724d46b6864cdb85f7d3c8fb0fe37032444 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -@@ -82,6 +82,18 @@ public class EntityBat extends EntityAmbient { +@@ -81,6 +81,18 @@ public class EntityBat extends EntityAmbient { setMot(mot.a(0.9D)); } } @@ -789,10 +789,10 @@ index 93946f4e3cad07e20189a44ce512682b4cbc163b..926a38adb52b7d99ce2a9fcc52eb4878 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index c04ff259f650b0e5a361c4f17b8b5ff9ecb8ab71..a1cc0b414479e693de9428412ba837fd9bf57751 100644 +index cae2b2139e398dd26e9562636f06e096b3e028ae..7c25a7610a5f18e21afead1290e4d879588845af 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -@@ -96,6 +96,11 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -95,6 +95,11 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { public boolean isRidableInWater() { return world.purpurConfig.endermanRidableInWater; } @@ -1319,7 +1319,7 @@ index b8395c7317494adf36010080931a1c8635ab6cfa..aeeee97a87680f072188d1fcc9ec55b5 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -index 8c2815c8b11c8db8e6c1d0caf71188322e52094d..0b6c80e908392025197b68d1ba6b3eed6d69c9b2 100644 +index 9f2af4b37ffb22034b537cc27b42d520a41d4fe7..e9b466bb3172fcae1dee81e7e1b8c069b0a23944 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java @@ -76,6 +76,11 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { @@ -1335,7 +1335,7 @@ index 8c2815c8b11c8db8e6c1d0caf71188322e52094d..0b6c80e908392025197b68d1ba6b3eed @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -index a2e90d890dfe62666c79969b9de9d9cd78ee2cf3..4f2c26ea34c82ec7c4f8ff92dd2e8a1f56a1afa6 100644 +index edac17b1072102abe322d69072c4277e6c21cfbe..f34ee0cf7a31cd7a9ee8f7e7ae76e9008f6da35b 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java @@ -96,6 +96,11 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { @@ -1367,7 +1367,7 @@ index 1370d2d8568a4ed62f2ec3d54abc7d2bebc48f75..201b78ffb5062254a6b3447f217df03d public static AttributeProvider.Builder eS() { diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index ff08528debe1ce89e36b5daa1c9b0ba07b6ecff3..152b35c35d7ec38800b638fcfe5c80ba61530c13 100644 +index d888aa8df65d54a0dce23eaae609aa0d2c3be3d9..b36f62b38888d6eb64d46ac67c89a4189aafcfc4 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java @@ -167,6 +167,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation diff --git a/patches/server/0151-Phantom-flames-on-swoop.patch b/patches/server/0150-Phantom-flames-on-swoop.patch similarity index 100% rename from patches/server/0151-Phantom-flames-on-swoop.patch rename to patches/server/0150-Phantom-flames-on-swoop.patch diff --git a/patches/server/0152-Option-for-chests-to-open-even-with-a-solid-block-on.patch b/patches/server/0151-Option-for-chests-to-open-even-with-a-solid-block-on.patch similarity index 100% rename from patches/server/0152-Option-for-chests-to-open-even-with-a-solid-block-on.patch rename to patches/server/0151-Option-for-chests-to-open-even-with-a-solid-block-on.patch diff --git a/patches/server/0153-Implement-TPSBar.patch b/patches/server/0152-Implement-TPSBar.patch similarity index 96% rename from patches/server/0153-Implement-TPSBar.patch rename to patches/server/0152-Implement-TPSBar.patch index 6f4a6bdc2..d86ba5dd0 100644 --- a/patches/server/0153-Implement-TPSBar.patch +++ b/patches/server/0152-Implement-TPSBar.patch @@ -17,7 +17,7 @@ index 0ea56c863a9a1019b36f7f9f9164301aef12637b..4338b459011bf7a083790b7bb76cf1b2 if (commanddispatcher_servertype.d) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 45722de76788886efa664b1b4124903bf6870e7c..6a561f0a6e076350b96212a1219a9658c4da6531 100644 +index aacc1b82ed178d6c0e499a53ce1aec7e20dad875..ee75fe091f7fd28426b9af329358ea0deb24d589 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -993,6 +993,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 829dc166548c7fc2890aa4abb5906586b448306f..7326d63874e7e1be7d8649c9a4d3bdaa2d0b195f 100644 +index 6b31a41536a766a53d4e1106c91744573bb94c9b..f06f82e14abf2e78db803ce3f0b8ae077e01ab73 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1531,7 +1531,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -1497,7 +1497,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return this.isInWater() || flag; } diff --git a/patches/server/0165-Fix-stuck-in-portals.patch b/patches/server/0164-Fix-stuck-in-portals.patch similarity index 94% rename from patches/server/0165-Fix-stuck-in-portals.patch rename to patches/server/0164-Fix-stuck-in-portals.patch index 9e564ec2f..57f1e97e0 100644 --- a/patches/server/0165-Fix-stuck-in-portals.patch +++ b/patches/server/0164-Fix-stuck-in-portals.patch @@ -17,10 +17,10 @@ index 8a7f75baa730729dd0022fe74da15fe669eced24..c69ef7ee5e40e2557b3a3971c6fb24c9 // CraftBukkit end this.spawnIn(worldserver); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7326d63874e7e1be7d8649c9a4d3bdaa2d0b195f..66754d478fac391dd16d1f9506720cd295d17f9c 100644 +index f06f82e14abf2e78db803ce3f0b8ae077e01ab73..7fa07613527e2d4c87b52ce4680f853f43d70091 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2582,12 +2582,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2548,12 +2548,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return new Vec2F(this.pitch, this.yaw); } diff --git a/patches/server/0166-Config-to-use-infinity-bows-without-arrows.patch b/patches/server/0165-Config-to-use-infinity-bows-without-arrows.patch similarity index 100% rename from patches/server/0166-Config-to-use-infinity-bows-without-arrows.patch rename to patches/server/0165-Config-to-use-infinity-bows-without-arrows.patch diff --git a/patches/server/0167-Toggle-for-water-sensitive-mob-damage.patch b/patches/server/0166-Toggle-for-water-sensitive-mob-damage.patch similarity index 94% rename from patches/server/0167-Toggle-for-water-sensitive-mob-damage.patch rename to patches/server/0166-Toggle-for-water-sensitive-mob-damage.patch index dba6f9b36..4b549f8f0 100644 --- a/patches/server/0167-Toggle-for-water-sensitive-mob-damage.patch +++ b/patches/server/0166-Toggle-for-water-sensitive-mob-damage.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for water sensitive mob damage diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 1f2b7727a49aa75987baf2de3f408d0ded007fa7..36d6e5bf608c6f69a76932bed41a64f58e1e8b72 100644 +index 8c74adf071e1edb640b3f2375bc92567cc2f6086..7cacd2b56fa96411d9fdf96d985d24fe835f9a91 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -861,7 +861,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -854,7 +854,8 @@ public abstract class EntityInsentient extends EntityLiving { if (goalFloat.validConditions()) goalFloat.update(); this.getControllerJump().jumpIfSet(); } @@ -19,10 +19,10 @@ index 1f2b7727a49aa75987baf2de3f408d0ded007fa7..36d6e5bf608c6f69a76932bed41a64f5 } return; diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 87806ef6119699a5f6652652f27c49eb829e1ec0..a67081f4014bf775e3aeea0bf1ab4e3fc9d22b21 100644 +index c0a708130445197be118a463fcb05d64d7e02b3b..4aa16bf47270cfb109f78f5733baf8d9f48368ac 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -2990,6 +2990,7 @@ public abstract class EntityLiving extends Entity { +@@ -2974,6 +2974,7 @@ public abstract class EntityLiving extends Entity { } @@ -57,10 +57,10 @@ index 55b6f483aca8cbb5c30b3759e23c86a699e19569..09f8f792bb800a274f7b127bc925c074 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index d8c568d821b859bac0a9839c42c9596cf964b16e..402a07551d9e78bac5e0f45e30b0abb7a4c82704 100644 +index 2992d173dc870eccdfc5f515d162844f19691d11..a2e0fed960f6dffb0f00c9d6ce91359e3597231c 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -@@ -290,7 +290,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -289,7 +289,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { @Override public boolean dO() { diff --git a/patches/server/0168-Config-to-always-tame-in-Creative.patch b/patches/server/0167-Config-to-always-tame-in-Creative.patch similarity index 100% rename from patches/server/0168-Config-to-always-tame-in-Creative.patch rename to patches/server/0167-Config-to-always-tame-in-Creative.patch diff --git a/patches/server/0169-End-crystal-explosion-options.patch b/patches/server/0168-End-crystal-explosion-options.patch similarity index 100% rename from patches/server/0169-End-crystal-explosion-options.patch rename to patches/server/0168-End-crystal-explosion-options.patch diff --git a/patches/server/0170-Add-unsafe-Entity-serialization-API.patch b/patches/server/0169-Add-unsafe-Entity-serialization-API.patch similarity index 97% rename from patches/server/0170-Add-unsafe-Entity-serialization-API.patch rename to patches/server/0169-Add-unsafe-Entity-serialization-API.patch index 9027e9ac4..9e1a36463 100644 --- a/patches/server/0170-Add-unsafe-Entity-serialization-API.patch +++ b/patches/server/0169-Add-unsafe-Entity-serialization-API.patch @@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java -index e1ef642f06078202fb782ac16b268e6429c5e202..778c981d4458957533fc3ac44095051b279c74e3 100644 +index 2cf4e8f68fa85c4e09effda0da0c3a3f64ae7ba9..c166e0a8e7eadb4f714078f764ef35f7afca543b 100644 --- a/src/main/java/net/minecraft/world/entity/EntityTypes.java +++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java -@@ -534,6 +534,7 @@ public class EntityTypes { +@@ -532,6 +532,7 @@ public class EntityTypes { return this.bf.create(this, world); } diff --git a/patches/server/0171-Add-ghast-allow-griefing-option.patch b/patches/server/0170-Add-ghast-allow-griefing-option.patch similarity index 100% rename from patches/server/0171-Add-ghast-allow-griefing-option.patch rename to patches/server/0170-Add-ghast-allow-griefing-option.patch diff --git a/patches/server/0172-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch b/patches/server/0171-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch similarity index 96% rename from patches/server/0172-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch rename to patches/server/0171-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch index 762512631..106e5015d 100644 --- a/patches/server/0172-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch +++ b/patches/server/0171-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configs for if Wither/Ender Dragon can ride vehicles diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 66754d478fac391dd16d1f9506720cd295d17f9c..666f5a2e5fe82a283dfcb1f25ed58d0a971c73d3 100644 +index 7fa07613527e2d4c87b52ce4680f853f43d70091..63bbfa32dc8e6b76aad0750c2cdd692963adba45 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2432,7 +2432,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2398,7 +2398,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } } diff --git a/patches/server/0173-Dont-run-with-scissors.patch b/patches/server/0172-Dont-run-with-scissors.patch similarity index 100% rename from patches/server/0173-Dont-run-with-scissors.patch rename to patches/server/0172-Dont-run-with-scissors.patch diff --git a/patches/server/0174-One-Punch-Man.patch b/patches/server/0173-One-Punch-Man.patch similarity index 95% rename from patches/server/0174-One-Punch-Man.patch rename to patches/server/0173-One-Punch-Man.patch index 67e9417fe..0289a31c0 100644 --- a/patches/server/0174-One-Punch-Man.patch +++ b/patches/server/0173-One-Punch-Man.patch @@ -5,10 +5,10 @@ Subject: [PATCH] One Punch Man! diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index a67081f4014bf775e3aeea0bf1ab4e3fc9d22b21..2b47287b135fd4a9798379e1f50c31db5e9d865c 100644 +index 4aa16bf47270cfb109f78f5733baf8d9f48368ac..be2a59f25b09feb418ef7168ccf1bdd4bcaec075 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -2032,6 +2032,23 @@ public abstract class EntityLiving extends Entity { +@@ -2016,6 +2016,23 @@ public abstract class EntityLiving extends Entity { ((EntityPlayer) damagesource.getEntity()).a(StatisticList.DAMAGE_DEALT_ABSORBED, Math.round(f2 * 10.0F)); } diff --git a/patches/server/0175-Add-config-for-snow-on-blue-ice.patch b/patches/server/0174-Add-config-for-snow-on-blue-ice.patch similarity index 100% rename from patches/server/0175-Add-config-for-snow-on-blue-ice.patch rename to patches/server/0174-Add-config-for-snow-on-blue-ice.patch diff --git a/patches/server/0176-Configurable-Ender-Pearl-cooldown-damage-and-Endermi.patch b/patches/server/0175-Configurable-Ender-Pearl-cooldown-damage-and-Endermi.patch similarity index 100% rename from patches/server/0176-Configurable-Ender-Pearl-cooldown-damage-and-Endermi.patch rename to patches/server/0175-Configurable-Ender-Pearl-cooldown-damage-and-Endermi.patch diff --git a/patches/server/0177-Config-to-ignore-nearby-mobs-when-sleeping.patch b/patches/server/0176-Config-to-ignore-nearby-mobs-when-sleeping.patch similarity index 100% rename from patches/server/0177-Config-to-ignore-nearby-mobs-when-sleeping.patch rename to patches/server/0176-Config-to-ignore-nearby-mobs-when-sleeping.patch diff --git a/patches/server/0178-Config-for-Enderman-to-aggro-spawned-Endermites.patch b/patches/server/0177-Config-for-Enderman-to-aggro-spawned-Endermites.patch similarity index 94% rename from patches/server/0178-Config-for-Enderman-to-aggro-spawned-Endermites.patch rename to patches/server/0177-Config-for-Enderman-to-aggro-spawned-Endermites.patch index 95fbae18c..7f1e26ff9 100644 --- a/patches/server/0178-Config-for-Enderman-to-aggro-spawned-Endermites.patch +++ b/patches/server/0177-Config-for-Enderman-to-aggro-spawned-Endermites.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Config for Enderman to aggro spawned Endermites By default, Enderman do not attack Endermites unless spawned by an Ender Pearl. diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 402a07551d9e78bac5e0f45e30b0abb7a4c82704..f113d5106bbee6fb0a5267547154f0839d03d089 100644 +index a2e0fed960f6dffb0f00c9d6ce91359e3597231c..25c49f6ded334ffb2d0c3155692879521ec58c09 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -@@ -72,7 +72,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -71,7 +71,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { private static final DataWatcherObject bo = DataWatcher.a(EntityEnderman.class, DataWatcherRegistry.i); private static final DataWatcherObject bp = DataWatcher.a(EntityEnderman.class, DataWatcherRegistry.i); private static final Predicate bq = (entityliving) -> { diff --git a/patches/server/0179-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch b/patches/server/0178-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch similarity index 95% rename from patches/server/0179-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch rename to patches/server/0178-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch index 2dfe053f1..58a00170f 100644 --- a/patches/server/0179-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch +++ b/patches/server/0178-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch @@ -7,7 +7,7 @@ Prevents Enderman from becoming aggresive towards players that are wearing a Dra Adds functionality to a useless item! diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index f113d5106bbee6fb0a5267547154f0839d03d089..bd03e91861237eeda50e607af4e26c1ad2d71297 100644 +index 25c49f6ded334ffb2d0c3155692879521ec58c09..3bb5b360be98ac2f20793c0eb126e39eb2201331 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -50,6 +50,7 @@ import net.minecraft.world.entity.ai.goal.target.PathfinderGoalUniversalAngerRes @@ -18,7 +18,7 @@ index f113d5106bbee6fb0a5267547154f0839d03d089..bd03e91861237eeda50e607af4e26c1a import net.minecraft.world.level.GameRules; import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.IMaterial; -@@ -253,7 +254,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { +@@ -252,7 +253,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { // Paper end ItemStack itemstack = (ItemStack) entityhuman.inventory.armor.get(3); diff --git a/patches/server/0181-Tick-fluids-config.patch b/patches/server/0179-Tick-fluids-config.patch similarity index 100% rename from patches/server/0181-Tick-fluids-config.patch rename to patches/server/0179-Tick-fluids-config.patch diff --git a/patches/server/0182-Config-to-disable-Llama-caravans.patch b/patches/server/0180-Config-to-disable-Llama-caravans.patch similarity index 100% rename from patches/server/0182-Config-to-disable-Llama-caravans.patch rename to patches/server/0180-Config-to-disable-Llama-caravans.patch diff --git a/patches/server/0180-Re-enable-timings-by-default.patch b/patches/server/0180-Re-enable-timings-by-default.patch deleted file mode 100644 index 4c15988b8..000000000 --- a/patches/server/0180-Re-enable-timings-by-default.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath -Date: Thu, 11 Mar 2021 21:37:17 -0600 -Subject: [PATCH] Re-enable timings by default - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 4eb122cfd31902df9789d2e8ff2615207a65ab06..a0ed8ed1d6b89a4f10dff645e09eaff303fb3f8a 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -207,15 +207,6 @@ public class PaperConfig { - public static String timingsServerName; - private static void timings() { - boolean timings = getBoolean("timings.enabled", true); -- // Airplane start -- boolean reallyEnableTimings = getBoolean("timings.really-enabled", false); -- if (timings && !reallyEnableTimings) { -- Bukkit.getLogger().log(Level.WARNING, "[Airplane] To improve performance, timings have been disabled by default"); -- Bukkit.getLogger().log(Level.WARNING, "[Airplane] You can still use timings by using /timings on, but they will not start on server startup unless you set timings.really-enabled to true in paper.yml"); -- Bukkit.getLogger().log(Level.WARNING, "[Airplane] If you would like to disable this message, either set timings.really-enabled to true or timings.enabled to false."); -- } -- timings = reallyEnableTimings; -- // Airplane end - boolean verboseTimings = getBoolean("timings.verbose", true); - TimingsManager.privacy = getBoolean("timings.server-name-privacy", false); - TimingsManager.hiddenConfigs = getList("timings.hidden-config-entries", Lists.newArrayList("database", "settings.bungeecord-addresses", "settings.velocity-support.secret")); diff --git a/patches/server/0183-Config-to-make-Creepers-explode-on-death.patch b/patches/server/0181-Config-to-make-Creepers-explode-on-death.patch similarity index 100% rename from patches/server/0183-Config-to-make-Creepers-explode-on-death.patch rename to patches/server/0181-Config-to-make-Creepers-explode-on-death.patch diff --git a/patches/server/0184-Configurable-ravager-griefable-blocks-list.patch b/patches/server/0182-Configurable-ravager-griefable-blocks-list.patch similarity index 100% rename from patches/server/0184-Configurable-ravager-griefable-blocks-list.patch rename to patches/server/0182-Configurable-ravager-griefable-blocks-list.patch diff --git a/patches/server/0185-Sneak-to-bulk-process-composter.patch b/patches/server/0183-Sneak-to-bulk-process-composter.patch similarity index 100% rename from patches/server/0185-Sneak-to-bulk-process-composter.patch rename to patches/server/0183-Sneak-to-bulk-process-composter.patch diff --git a/patches/server/0186-Config-for-skipping-night.patch b/patches/server/0184-Config-for-skipping-night.patch similarity index 93% rename from patches/server/0186-Config-for-skipping-night.patch rename to patches/server/0184-Config-for-skipping-night.patch index baf8abc15..9f41efd97 100644 --- a/patches/server/0186-Config-for-skipping-night.patch +++ b/patches/server/0184-Config-for-skipping-night.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config for skipping night diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 801242b2389591df832a90b0c8852059a4c0f04b..7e943d9ba04abd964850d9b0109c5c6c9a1e5611 100644 +index ab0e16b8f659ff86f022fef210b97dfa59206b0c..7d0c5d28597c51d332146a82df06ba519711f836 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java -@@ -1044,7 +1044,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1028,7 +1028,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // CraftBukkit end diff --git a/patches/server/0187-Add-config-for-villager-trading.patch b/patches/server/0185-Add-config-for-villager-trading.patch similarity index 96% rename from patches/server/0187-Add-config-for-villager-trading.patch rename to patches/server/0185-Add-config-for-villager-trading.patch index 7e7632073..e2aedf6d6 100644 --- a/patches/server/0187-Add-config-for-villager-trading.patch +++ b/patches/server/0185-Add-config-for-villager-trading.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config for villager trading diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -index 152b35c35d7ec38800b638fcfe5c80ba61530c13..3db9da2c1691053c35333f7eb3691fea26398ecc 100644 +index b36f62b38888d6eb64d46ac67c89a4189aafcfc4..66863b31687a41f84f722c611064f7ad31e02488 100644 --- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java -@@ -373,7 +373,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation +@@ -369,7 +369,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation return tryRide(entityhuman, enumhand); // Purpur } else { if (world.purpurConfig.villagerRidable && itemstack.isEmpty()) return tryRide(entityhuman, enumhand); // Purpur diff --git a/patches/server/0188-Allow-infinity-on-crossbows.patch b/patches/server/0186-Allow-infinity-on-crossbows.patch similarity index 100% rename from patches/server/0188-Allow-infinity-on-crossbows.patch rename to patches/server/0186-Allow-infinity-on-crossbows.patch diff --git a/patches/server/0189-Drowning-Settings.patch b/patches/server/0187-Drowning-Settings.patch similarity index 89% rename from patches/server/0189-Drowning-Settings.patch rename to patches/server/0187-Drowning-Settings.patch index 2fb0ea5a4..e8268de26 100644 --- a/patches/server/0189-Drowning-Settings.patch +++ b/patches/server/0187-Drowning-Settings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Drowning Settings diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 666f5a2e5fe82a283dfcb1f25ed58d0a971c73d3..feb5a6d8a534c4ee19940847cd53ff325335c4d6 100644 +index 63bbfa32dc8e6b76aad0750c2cdd692963adba45..16a317afbe71275b7afd5d7a6bca73e6b3a60015 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2638,7 +2638,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2604,7 +2604,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } public int getDefaultPortalCooldown() { @@ -18,10 +18,10 @@ index 666f5a2e5fe82a283dfcb1f25ed58d0a971c73d3..feb5a6d8a534c4ee19940847cd53ff32 public Iterable bn() { diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 2b47287b135fd4a9798379e1f50c31db5e9d865c..cb18f3c88a0b8ef374cbcf4226848e1541bc8675 100644 +index be2a59f25b09feb418ef7168ccf1bdd4bcaec075..52d2076b3fd222148d307133f5465944ef6c546f 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -394,7 +394,7 @@ public abstract class EntityLiving extends Entity { +@@ -393,7 +393,7 @@ public abstract class EntityLiving extends Entity { if (this.a((Tag) TagsFluid.WATER) && !this.world.getType(new BlockPosition(this.locX(), this.getHeadY(), this.locZ())).a(Blocks.BUBBLE_COLUMN)) { if (!this.canBreatheUnderwater() && !MobEffectUtil.c(this) && !flag1) { // Paper - use OBFHELPER so it can be overridden this.setAirTicks(this.l(this.getAirTicks())); @@ -30,7 +30,7 @@ index 2b47287b135fd4a9798379e1f50c31db5e9d865c..cb18f3c88a0b8ef374cbcf4226848e15 this.setAirTicks(0); Vec3D vec3d = this.getMot(); -@@ -406,7 +406,7 @@ public abstract class EntityLiving extends Entity { +@@ -405,7 +405,7 @@ public abstract class EntityLiving extends Entity { this.world.addParticle(Particles.BUBBLE, this.locX() + d2, this.locY() + d3, this.locZ() + d4, vec3d.x, vec3d.y, vec3d.z); } diff --git a/patches/server/0190-Break-individual-slabs-when-sneaking.patch b/patches/server/0188-Break-individual-slabs-when-sneaking.patch similarity index 100% rename from patches/server/0190-Break-individual-slabs-when-sneaking.patch rename to patches/server/0188-Break-individual-slabs-when-sneaking.patch diff --git a/patches/server/0191-Config-to-disable-hostile-mob-spawn-on-ice.patch b/patches/server/0189-Config-to-disable-hostile-mob-spawn-on-ice.patch similarity index 100% rename from patches/server/0191-Config-to-disable-hostile-mob-spawn-on-ice.patch rename to patches/server/0189-Config-to-disable-hostile-mob-spawn-on-ice.patch diff --git a/patches/server/0192-Config-to-show-Armor-Stand-arms-on-spawn.patch b/patches/server/0190-Config-to-show-Armor-Stand-arms-on-spawn.patch similarity index 100% rename from patches/server/0192-Config-to-show-Armor-Stand-arms-on-spawn.patch rename to patches/server/0190-Config-to-show-Armor-Stand-arms-on-spawn.patch diff --git a/patches/server/0193-Option-to-make-doors-require-redstone.patch b/patches/server/0191-Option-to-make-doors-require-redstone.patch similarity index 100% rename from patches/server/0193-Option-to-make-doors-require-redstone.patch rename to patches/server/0191-Option-to-make-doors-require-redstone.patch diff --git a/patches/server/0194-Config-to-allow-for-unsafe-enchants.patch b/patches/server/0192-Config-to-allow-for-unsafe-enchants.patch similarity index 100% rename from patches/server/0194-Config-to-allow-for-unsafe-enchants.patch rename to patches/server/0192-Config-to-allow-for-unsafe-enchants.patch diff --git a/patches/server/0195-Configurable-sponge-absorption.patch b/patches/server/0193-Configurable-sponge-absorption.patch similarity index 100% rename from patches/server/0195-Configurable-sponge-absorption.patch rename to patches/server/0193-Configurable-sponge-absorption.patch diff --git a/patches/server/0196-Projectile-offset-config.patch b/patches/server/0194-Projectile-offset-config.patch similarity index 100% rename from patches/server/0196-Projectile-offset-config.patch rename to patches/server/0194-Projectile-offset-config.patch diff --git a/patches/server/0197-Config-for-powered-rail-activation-distance.patch b/patches/server/0195-Config-for-powered-rail-activation-distance.patch similarity index 100% rename from patches/server/0197-Config-for-powered-rail-activation-distance.patch rename to patches/server/0195-Config-for-powered-rail-activation-distance.patch diff --git a/patches/server/0198-Piglin-portal-spawn-modifier.patch b/patches/server/0196-Piglin-portal-spawn-modifier.patch similarity index 100% rename from patches/server/0198-Piglin-portal-spawn-modifier.patch rename to patches/server/0196-Piglin-portal-spawn-modifier.patch diff --git a/patches/server/0199-Config-to-change-max-number-of-bees.patch b/patches/server/0197-Config-to-change-max-number-of-bees.patch similarity index 100% rename from patches/server/0199-Config-to-change-max-number-of-bees.patch rename to patches/server/0197-Config-to-change-max-number-of-bees.patch diff --git a/patches/server/0200-Configurable-damage-settings-for-magma-blocks.patch b/patches/server/0198-Configurable-damage-settings-for-magma-blocks.patch similarity index 96% rename from patches/server/0200-Configurable-damage-settings-for-magma-blocks.patch rename to patches/server/0198-Configurable-damage-settings-for-magma-blocks.patch index 1dba24e5a..11a1acc97 100644 --- a/patches/server/0200-Configurable-damage-settings-for-magma-blocks.patch +++ b/patches/server/0198-Configurable-damage-settings-for-magma-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable damage settings for magma blocks diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index feb5a6d8a534c4ee19940847cd53ff325335c4d6..ca07d4caf9f7d82d8ca3d607f48d6eb2b7b60f39 100644 +index 16a317afbe71275b7afd5d7a6bca73e6b3a60015..cc78b16db29498680267d98d755d3cf76e8ea325 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -925,7 +925,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -891,7 +891,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } // CraftBukkit end diff --git a/patches/server/0201-Config-for-wither-explosion-radius.patch b/patches/server/0199-Config-for-wither-explosion-radius.patch similarity index 100% rename from patches/server/0201-Config-for-wither-explosion-radius.patch rename to patches/server/0199-Config-for-wither-explosion-radius.patch diff --git a/patches/server/0202-Add-credits-command.patch b/patches/server/0200-Add-credits-command.patch similarity index 100% rename from patches/server/0202-Add-credits-command.patch rename to patches/server/0200-Add-credits-command.patch diff --git a/patches/server/0203-Gamemode-extra-permissions.patch b/patches/server/0201-Gamemode-extra-permissions.patch similarity index 100% rename from patches/server/0203-Gamemode-extra-permissions.patch rename to patches/server/0201-Gamemode-extra-permissions.patch diff --git a/patches/server/0204-Config-for-changing-the-blocks-that-turn-into-paths.patch b/patches/server/0202-Config-for-changing-the-blocks-that-turn-into-paths.patch similarity index 100% rename from patches/server/0204-Config-for-changing-the-blocks-that-turn-into-paths.patch rename to patches/server/0202-Config-for-changing-the-blocks-that-turn-into-paths.patch diff --git a/patches/server/0205-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch b/patches/server/0203-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch similarity index 100% rename from patches/server/0205-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch rename to patches/server/0203-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch diff --git a/patches/server/0206-Allows-change-broadcast-message-by-player.patch b/patches/server/0204-Allows-change-broadcast-message-by-player.patch similarity index 100% rename from patches/server/0206-Allows-change-broadcast-message-by-player.patch rename to patches/server/0204-Allows-change-broadcast-message-by-player.patch diff --git a/patches/server/0207-Fix-SPIGOT-6278.patch b/patches/server/0205-Fix-SPIGOT-6278.patch similarity index 89% rename from patches/server/0207-Fix-SPIGOT-6278.patch rename to patches/server/0205-Fix-SPIGOT-6278.patch index 09e02de44..92114fd5a 100644 --- a/patches/server/0207-Fix-SPIGOT-6278.patch +++ b/patches/server/0205-Fix-SPIGOT-6278.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix SPIGOT-6278 diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -index 4f2c26ea34c82ec7c4f8ff92dd2e8a1f56a1afa6..42230ba14371ecb39c971f3a2969d1522c0fabc0 100644 +index f34ee0cf7a31cd7a9ee8f7e7ae76e9008f6da35b..77af7152a2e5ff99e98a0063947427c0d18aabcb 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java @@ -200,7 +200,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { diff --git a/patches/server/0208-Implement-Mob-Blindness.patch b/patches/server/0206-Implement-Mob-Blindness.patch similarity index 84% rename from patches/server/0208-Implement-Mob-Blindness.patch rename to patches/server/0206-Implement-Mob-Blindness.patch index 397e4e9ab..490d6c6a0 100644 --- a/patches/server/0208-Implement-Mob-Blindness.patch +++ b/patches/server/0206-Implement-Mob-Blindness.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Implement Mob Blindness Ported from https://github.com/raltsmc/mobblindness diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index cb18f3c88a0b8ef374cbcf4226848e1541bc8675..9e0c00bf0c1fb41d09de39d2a3831b6bc6658259 100644 +index 52d2076b3fd222148d307133f5465944ef6c546f..6b739e67c8054846a4569c0fc91b06206683d78c 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -925,6 +925,18 @@ public abstract class EntityLiving extends Entity { - // Airplane end +@@ -922,6 +922,18 @@ public abstract class EntityLiving extends Entity { + if (entitytypes == EntityTypes.SKELETON && item == Items.SKELETON_SKULL || entitytypes == EntityTypes.ZOMBIE && item == Items.ZOMBIE_HEAD || entitytypes == EntityTypes.CREEPER && item == Items.CREEPER_HEAD) { d0 *= 0.5D; } + diff --git a/patches/server/0209-Hide-hidden-players-from-entity-selector.patch b/patches/server/0207-Hide-hidden-players-from-entity-selector.patch similarity index 100% rename from patches/server/0209-Hide-hidden-players-from-entity-selector.patch rename to patches/server/0207-Hide-hidden-players-from-entity-selector.patch diff --git a/patches/server/0210-Config-for-health-to-impact-Creeper-explosion-radius.patch b/patches/server/0208-Config-for-health-to-impact-Creeper-explosion-radius.patch similarity index 100% rename from patches/server/0210-Config-for-health-to-impact-Creeper-explosion-radius.patch rename to patches/server/0208-Config-for-health-to-impact-Creeper-explosion-radius.patch diff --git a/patches/server/0212-Optimize-collisions.patch b/patches/server/0209-Optimize-collisions.patch similarity index 97% rename from patches/server/0212-Optimize-collisions.patch rename to patches/server/0209-Optimize-collisions.patch index 472756ce6..041659e83 100644 --- a/patches/server/0212-Optimize-collisions.patch +++ b/patches/server/0209-Optimize-collisions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize collisions diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 7e943d9ba04abd964850d9b0109c5c6c9a1e5611..0ec132efc49880d9b230e176bce79732b7231765 100644 +index 7d0c5d28597c51d332146a82df06ba519711f836..fbc7f3e489be0ac5939af29a9aef75a56c38eb4a 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -678,16 +678,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/server/0213-Iron-golem-poppy-calms-anger.patch b/patches/server/0210-Iron-golem-poppy-calms-anger.patch similarity index 100% rename from patches/server/0213-Iron-golem-poppy-calms-anger.patch rename to patches/server/0210-Iron-golem-poppy-calms-anger.patch diff --git a/patches/server/0214-Breedable-parrots.patch b/patches/server/0211-Breedable-parrots.patch similarity index 100% rename from patches/server/0214-Breedable-parrots.patch rename to patches/server/0211-Breedable-parrots.patch diff --git a/patches/server/0211-Extend-Halloween-Optimization.patch b/patches/server/0211-Extend-Halloween-Optimization.patch deleted file mode 100644 index 641dd9b1b..000000000 --- a/patches/server/0211-Extend-Halloween-Optimization.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: DoctaEnkoda -Date: Fri, 7 May 2021 03:35:42 +0200 -Subject: [PATCH] Extend Halloween Optimization - - -diff --git a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -index bd02320d450a7fd7254f01b1c44ef421c1810ea7..33f380c543677b5a382d1e9163cd0bbd3585be4b 100644 ---- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -+++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -@@ -311,17 +311,31 @@ public class EntityBat extends EntityAmbient { - private static boolean isSpookySeason = false; - private static final int ONE_HOUR = 20 * 60 * 60; - private static int lastSpookyCheck = -ONE_HOUR; -- private static boolean eJ() { -+ // Purpur start -+ private static boolean isHalloween = false; -+ private static boolean eJ() { return isSpookySeason(); } -+ -+ public static boolean isSpookySeason() { -+ checkSeason(); -+ return isSpookySeason; -+ } -+ -+ public static boolean isHalloween() { -+ checkSeason(); -+ return isHalloween; -+ } -+ -+ public static void checkSeason() { - if (MinecraftServer.currentTick - lastSpookyCheck > ONE_HOUR) { -- LocalDate localdate = LocalDate.now(); -- int i = localdate.get(ChronoField.DAY_OF_MONTH); -- int j = localdate.get(ChronoField.MONTH_OF_YEAR); -- isSpookySeason = j == 10 && i >= 20 || j == 11 && i <= 3; -+ LocalDate localdate = LocalDate.now(); -+ int day = localdate.get(ChronoField.DAY_OF_MONTH); -+ int month = localdate.get(ChronoField.MONTH_OF_YEAR); -+ isHalloween = month == 10 && day == 31; // Purpur -+ isSpookySeason = month == 10 && day >= 20 || month == 11 && day <= 3; - lastSpookyCheck = MinecraftServer.currentTick; - } -- -- return isSpookySeason; - } -+ // Purpur end - // Airplane end - - @Override -diff --git a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java -index 81059fc3fc22f251b5b08f0cd6814a992cff6b1e..f4c5c7995247b182d01d9232c8060d9fdb97c0a1 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java -+++ b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java -@@ -160,11 +160,7 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR - this.eL(); - this.setCanPickupLoot(this.world.paperConfig.skeletonsAlwaysCanPickUpLoot || this.random.nextFloat() < 0.55F * difficultydamagescaler.d()); // Paper - if (this.getEquipment(EnumItemSlot.HEAD).isEmpty()) { -- LocalDate localdate = LocalDate.now(); -- int i = localdate.get(ChronoField.DAY_OF_MONTH); -- int j = localdate.get(ChronoField.MONTH_OF_YEAR); -- -- if (j == 10 && i == 31 && this.random.nextFloat() < 0.25F) { -+ if (net.minecraft.world.entity.ambient.EntityBat.isHalloween() && this.random.nextFloat() < 0.25F) { // Purpur - this.setSlot(EnumItemSlot.HEAD, new ItemStack(this.random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); - this.dropChanceArmor[EnumItemSlot.HEAD.b()] = 0.0F; - } -diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java b/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java -index 7112db516e62ca75a445482005c524129b84f54c..ef8f6b442304285e2b398c9143e9e98e29330220 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java -+++ b/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java -@@ -585,11 +585,7 @@ public class EntityZombie extends EntityMonster { - } - - if (this.getEquipment(EnumItemSlot.HEAD).isEmpty()) { -- LocalDate localdate = LocalDate.now(); -- int i = localdate.get(ChronoField.DAY_OF_MONTH); -- int j = localdate.get(ChronoField.MONTH_OF_YEAR); -- -- if (j == 10 && i == 31 && this.random.nextFloat() < 0.25F) { -+ if (net.minecraft.world.entity.ambient.EntityBat.isHalloween() && this.random.nextFloat() < 0.25F) { // Purpur - this.setSlot(EnumItemSlot.HEAD, new ItemStack(this.random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); - this.dropChanceArmor[EnumItemSlot.HEAD.b()] = 0.0F; - } diff --git a/patches/server/0215-Configurable-powered-rail-boost-modifier.patch b/patches/server/0212-Configurable-powered-rail-boost-modifier.patch similarity index 100% rename from patches/server/0215-Configurable-powered-rail-boost-modifier.patch rename to patches/server/0212-Configurable-powered-rail-boost-modifier.patch diff --git a/patches/server/0216-Add-config-change-multiplier-critical-damage-value.patch b/patches/server/0213-Add-config-change-multiplier-critical-damage-value.patch similarity index 93% rename from patches/server/0216-Add-config-change-multiplier-critical-damage-value.patch rename to patches/server/0213-Add-config-change-multiplier-critical-damage-value.patch index 751cc7e12..62aa48e37 100644 --- a/patches/server/0216-Add-config-change-multiplier-critical-damage-value.patch +++ b/patches/server/0213-Add-config-change-multiplier-critical-damage-value.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config change multiplier critical damage value diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index 663dfa707dd948df2f25dab287fa4a0580070b75..abac4b996c7935ac6115a9ad96191f2a57afc95f 100644 +index 5f4a9ef27ab1a177a048fbf376d1e353be865e6f..24285b1b2264939fdfa6f7d6311772fa67be8680 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -1189,7 +1189,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1188,7 +1188,7 @@ public abstract class EntityHuman extends EntityLiving { flag2 = flag2 && !this.isSprinting(); if (flag2) { this.isCritical = true; // Purpur diff --git a/patches/server/0217-Option-to-disable-dragon-egg-teleporting.patch b/patches/server/0214-Option-to-disable-dragon-egg-teleporting.patch similarity index 100% rename from patches/server/0217-Option-to-disable-dragon-egg-teleporting.patch rename to patches/server/0214-Option-to-disable-dragon-egg-teleporting.patch diff --git a/patches/server/0218-Config-for-unverified-username-message.patch b/patches/server/0215-Config-for-unverified-username-message.patch similarity index 100% rename from patches/server/0218-Config-for-unverified-username-message.patch rename to patches/server/0215-Config-for-unverified-username-message.patch diff --git a/patches/server/0219-Make-anvil-cumulative-cost-configurable.patch b/patches/server/0216-Make-anvil-cumulative-cost-configurable.patch similarity index 100% rename from patches/server/0219-Make-anvil-cumulative-cost-configurable.patch rename to patches/server/0216-Make-anvil-cumulative-cost-configurable.patch diff --git a/patches/server/0220-ShulkerBox-allow-oversized-stacks.patch b/patches/server/0217-ShulkerBox-allow-oversized-stacks.patch similarity index 100% rename from patches/server/0220-ShulkerBox-allow-oversized-stacks.patch rename to patches/server/0217-ShulkerBox-allow-oversized-stacks.patch diff --git a/patches/server/0221-Bee-can-work-when-raining-or-at-night.patch b/patches/server/0218-Bee-can-work-when-raining-or-at-night.patch similarity index 100% rename from patches/server/0221-Bee-can-work-when-raining-or-at-night.patch rename to patches/server/0218-Bee-can-work-when-raining-or-at-night.patch diff --git a/patches/server/0222-API-for-any-mob-to-burn-daylight.patch b/patches/server/0219-API-for-any-mob-to-burn-daylight.patch similarity index 93% rename from patches/server/0222-API-for-any-mob-to-burn-daylight.patch rename to patches/server/0219-API-for-any-mob-to-burn-daylight.patch index 1da593ac3..e2e62c585 100644 --- a/patches/server/0222-API-for-any-mob-to-burn-daylight.patch +++ b/patches/server/0219-API-for-any-mob-to-burn-daylight.patch @@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight Co-authored by: Encode42 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ca07d4caf9f7d82d8ca3d607f48d6eb2b7b60f39..8cdc1a6e66df7fc4dbe91f986034fd1196819fc7 100644 +index cc78b16db29498680267d98d755d3cf76e8ea325..4c4081a7aa906726e2dbcf0e68bf103c0999050b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1674,7 +1674,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -1640,7 +1640,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } } @@ -18,7 +18,7 @@ index ca07d4caf9f7d82d8ca3d607f48d6eb2b7b60f39..8cdc1a6e66df7fc4dbe91f986034fd11 BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(this.locX(), 0.0D, this.locZ()); if (this.world.isLoaded(blockposition_mutableblockposition)) { -@@ -3899,5 +3899,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3865,5 +3865,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne public boolean processClick(EnumHand hand) { return false; } @@ -37,10 +37,10 @@ index ca07d4caf9f7d82d8ca3d607f48d6eb2b7b60f39..8cdc1a6e66df7fc4dbe91f986034fd11 // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 36d6e5bf608c6f69a76932bed41a64f58e1e8b72..0b2f21aab06aca77110bf8c061692bb2f5c4cb46 100644 +index 7cacd2b56fa96411d9fdf96d985d24fe835f9a91..d96630a64f132eecf5cb4c80302cf9dd6176ad7c 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -1687,6 +1687,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1678,6 +1678,7 @@ public abstract class EntityInsentient extends EntityLiving { public boolean isInDaylight() { return this.eG(); } // Paper - OBFHELPER protected boolean eG() { @@ -48,7 +48,7 @@ index 36d6e5bf608c6f69a76932bed41a64f58e1e8b72..0b2f21aab06aca77110bf8c061692bb2 if (this.world.isDay() && !this.world.isClientSide) { float f = this.aR(); BlockPosition blockposition = this.getVehicle() instanceof EntityBoat ? (new BlockPosition(this.locX(), (double) Math.round(this.locY()), this.locZ())).up() : new BlockPosition(this.locX(), (double) Math.round(this.locY()), this.locZ()); -@@ -1697,6 +1698,9 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1688,6 +1689,9 @@ public abstract class EntityInsentient extends EntityLiving { } return false; @@ -59,10 +59,10 @@ index 36d6e5bf608c6f69a76932bed41a64f58e1e8b72..0b2f21aab06aca77110bf8c061692bb2 @Override diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 9e0c00bf0c1fb41d09de39d2a3831b6bc6658259..6b65b17d6b100adacd628d08a24a68164d2bb9aa 100644 +index 6b739e67c8054846a4569c0fc91b06206683d78c..57660a67003dff6a5515912fe07e79fac1fb9e37 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -238,6 +238,7 @@ public abstract class EntityLiving extends Entity { +@@ -237,6 +237,7 @@ public abstract class EntityLiving extends Entity { public boolean canPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event @@ -70,7 +70,7 @@ index 9e0c00bf0c1fb41d09de39d2a3831b6bc6658259..6b65b17d6b100adacd628d08a24a6816 @Override public float getBukkitYaw() { -@@ -276,6 +277,8 @@ public abstract class EntityLiving extends Entity { +@@ -275,6 +276,8 @@ public abstract class EntityLiving extends Entity { DynamicOpsNBT dynamicopsnbt = DynamicOpsNBT.a; this.bg = this.a(new Dynamic(dynamicopsnbt, dynamicopsnbt.createMap((Map) ImmutableMap.of(dynamicopsnbt.createString("memories"), dynamicopsnbt.emptyMap())))); @@ -79,7 +79,7 @@ index 9e0c00bf0c1fb41d09de39d2a3831b6bc6658259..6b65b17d6b100adacd628d08a24a6816 } protected void initAttributes() {} // Purpur -@@ -709,6 +712,7 @@ public abstract class EntityLiving extends Entity { +@@ -708,6 +711,7 @@ public abstract class EntityLiving extends Entity { dataresult.resultOrPartial(logger::error).ifPresent((nbtbase) -> { nbttagcompound.set("Brain", nbtbase); }); @@ -87,7 +87,7 @@ index 9e0c00bf0c1fb41d09de39d2a3831b6bc6658259..6b65b17d6b100adacd628d08a24a6816 } @Override -@@ -784,6 +788,11 @@ public abstract class EntityLiving extends Entity { +@@ -783,6 +787,11 @@ public abstract class EntityLiving extends Entity { this.bg = this.a(new Dynamic(DynamicOpsNBT.a, nbttagcompound.get("Brain"))); } @@ -99,7 +99,7 @@ index 9e0c00bf0c1fb41d09de39d2a3831b6bc6658259..6b65b17d6b100adacd628d08a24a6816 } // CraftBukkit start -@@ -3017,6 +3026,31 @@ public abstract class EntityLiving extends Entity { +@@ -3001,6 +3010,31 @@ public abstract class EntityLiving extends Entity { this.damageEntity(DamageSource.DROWN, 1.0F); } @@ -180,7 +180,7 @@ index fe07d9798eaae670e218d25fe23256c87c41d686..be5837c4f515cd2587bea22b14a3833a public void setShouldBurnInDay(boolean shouldBurnInDay) { this.shouldBurnInDay = shouldBurnInDay; } // Paper end diff --git a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java -index f4c5c7995247b182d01d9232c8060d9fdb97c0a1..488fb7360ed3e69d35184af08afabcd1b94e7106 100644 +index 81059fc3fc22f251b5b08f0cd6814a992cff6b1e..1676fbb80e5573c2591c1de7a6a858cf4824b48f 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java @@ -67,6 +67,7 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR @@ -215,7 +215,7 @@ index f4c5c7995247b182d01d9232c8060d9fdb97c0a1..488fb7360ed3e69d35184af08afabcd1 super.movementTick(); } -@@ -229,14 +232,14 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR +@@ -233,14 +236,14 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR public void loadData(NBTTagCompound nbttagcompound) { super.loadData(nbttagcompound); this.eL(); @@ -233,7 +233,7 @@ index f4c5c7995247b182d01d9232c8060d9fdb97c0a1..488fb7360ed3e69d35184af08afabcd1 // Paper end diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java b/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java -index ef8f6b442304285e2b398c9143e9e98e29330220..72a0729122a33422ecfbe8c827be6f3c3d193eb2 100644 +index 7112db516e62ca75a445482005c524129b84f54c..bce7b674ef4450c1f6e932cba1b06ae8730cedfe 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityZombie.java @@ -97,11 +97,12 @@ public class EntityZombie extends EntityMonster { diff --git a/patches/server/0223-Fix-advancement-triggers-on-entity-death.patch b/patches/server/0220-Fix-advancement-triggers-on-entity-death.patch similarity index 94% rename from patches/server/0223-Fix-advancement-triggers-on-entity-death.patch rename to patches/server/0220-Fix-advancement-triggers-on-entity-death.patch index 6ea31292e..589f723dc 100644 --- a/patches/server/0223-Fix-advancement-triggers-on-entity-death.patch +++ b/patches/server/0220-Fix-advancement-triggers-on-entity-death.patch @@ -16,7 +16,7 @@ restoring it back to the entity just before the criterion triggers run and then finally clearing the equipment again right after the criterion is done. diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 0b2f21aab06aca77110bf8c061692bb2f5c4cb46..25294a68771cd4c9b1617fa2b743521ccb99b36d 100644 +index d96630a64f132eecf5cb4c80302cf9dd6176ad7c..b4afd71340a0c7e1b6aa2e3f01a6a4fc998f3f16 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -106,9 +106,9 @@ public abstract class EntityInsentient extends EntityLiving { @@ -31,7 +31,7 @@ index 0b2f21aab06aca77110bf8c061692bb2f5c4cb46..25294a68771cd4c9b1617fa2b743521c public final float[] dropChanceArmor; // private boolean canPickUpLoot; // CraftBukkit - moved up to EntityLiving public boolean persistent; -@@ -1013,6 +1013,41 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1004,6 +1004,41 @@ public abstract class EntityInsentient extends EntityLiving { } } @@ -74,10 +74,10 @@ index 0b2f21aab06aca77110bf8c061692bb2f5c4cb46..25294a68771cd4c9b1617fa2b743521c public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack) { switch (enumitemslot.a()) { diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 6b65b17d6b100adacd628d08a24a68164d2bb9aa..2f7352d7ae99ecdefe0f7b56cebf008906607d4d 100644 +index 57660a67003dff6a5515912fe07e79fac1fb9e37..4c527cd68da13633b424e666d693f82dc2a3fc25 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -1560,10 +1560,13 @@ public abstract class EntityLiving extends Entity { +@@ -1557,10 +1557,13 @@ public abstract class EntityLiving extends Entity { } // Paper start @@ -91,7 +91,7 @@ index 6b65b17d6b100adacd628d08a24a68164d2bb9aa..2f7352d7ae99ecdefe0f7b56cebf0089 } if (this.isSleeping()) { this.entityWakeup(); -@@ -2274,6 +2277,12 @@ public abstract class EntityLiving extends Entity { +@@ -2258,6 +2261,12 @@ public abstract class EntityLiving extends Entity { public abstract ItemStack getEquipment(EnumItemSlot enumitemslot); @@ -151,10 +151,10 @@ index ddc1c3383cdc32fa832485f3922c74185731557a..e28a2d983ae7b83f435c9dea606a92e2 public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index abac4b996c7935ac6115a9ad96191f2a57afc95f..0443aaa9fc4058cc4ce61977a89cdf6ea6452b65 100644 +index 24285b1b2264939fdfa6f7d6311772fa67be8680..383b4cacc8c9f4fd5d2a83f683e5174ea5025f61 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -1892,6 +1892,52 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1886,6 +1886,52 @@ public abstract class EntityHuman extends EntityLiving { return enumitemslot == EnumItemSlot.MAINHAND ? this.inventory.getItemInHand() : (enumitemslot == EnumItemSlot.OFFHAND ? (ItemStack) this.inventory.extraSlots.get(0) : (enumitemslot.a() == EnumItemSlot.Function.ARMOR ? (ItemStack) this.inventory.armor.get(enumitemslot.b()) : ItemStack.b)); } diff --git a/patches/server/0224-Config-MobEffect-by-world.patch b/patches/server/0221-Config-MobEffect-by-world.patch similarity index 100% rename from patches/server/0224-Config-MobEffect-by-world.patch rename to patches/server/0221-Config-MobEffect-by-world.patch diff --git a/patches/server/0225-Beacon-Activation-Range-Configurable.patch b/patches/server/0222-Beacon-Activation-Range-Configurable.patch similarity index 100% rename from patches/server/0225-Beacon-Activation-Range-Configurable.patch rename to patches/server/0222-Beacon-Activation-Range-Configurable.patch diff --git a/subprojects/server.gradle.kts b/subprojects/server.gradle.kts index 813508a64..b4aebc9ec 100644 --- a/subprojects/server.gradle.kts +++ b/subprojects/server.gradle.kts @@ -1,10 +1,3 @@ -repositories { - // Airplane libs... - maven("https://jitpack.io") { - content { includeGroupByRegex("com\\.github\\..*") } - } -} - dependencies { implementation("cat.inspiracio", "rhino-js-engine", "1.7.7.1") }