[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug Report\nabout: Report the problem that has occurred in our project.\ntitle: \"[BUG] \"\nlabels: bug\nassignees: ''\n---\n\n**Describe the bug**\nA clear and concise description of the bug.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Set '...' in config to '...'\n2. Do in game '....'\n3. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Server Info (please complete the following information):**\n - All Limbo plugins versions:\n - [e.g. LimboAPI 1.0.4-SNAPSHOT, downloaded from https://github.com/Elytrium/LimboAPI/actions/runs/xxxxxx]\n - [e.g. LimboFilter 1.0.3-rc3, downloaded from https://github.com/Elytrium/LimboAPI/actions/runs/xxxxxx]\n\n - /velocity dump link [e.g. https://dump.velocitypowered.com/abcdef.json]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature Request\nabout: Suggest an idea to improve our project.\ntitle: \"[ENHANCEMENT] \"\nlabels: enhancement\nassignees: ''\n---\n\n**Describe the feature you'd like to have implemented**\nA clear and concise description of what you want to be added.\n\n**Is your feature request related to an existing problem? Please describe.**\nA clear and concise description of what the problem is.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: Java CI with Gradle\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - master\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4.2.2\n      - name: Set up JDK\n        uses: actions/setup-java@v4.7.0\n        with:\n          distribution: temurin\n          java-version: 25\n      - name: Cache generated data\n        uses: actions/cache@v5.0.4\n        with:\n          path: |\n            plugin/build/minecraft/\n            plugin/build/generated/minecraft/mapping/\n          key: minecraft-${{ hashFiles('gradle.properties') }}\n      - name: Build LimboAPI\n        run: ./gradlew build\n      - name: Upload LimboAPI\n        uses: actions/upload-artifact@v4.6.2\n        with:\n          name: LimboAPI\n          path: \"*/build/libs/*.jar\"\n      - uses: dev-drprasad/delete-tag-and-release@v0.2.1\n        if: ${{ github.event_name == 'push' }}\n        with:\n          delete_release: true\n          tag_name: dev-build\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - name: Find git version\n        id: git-version\n        run: echo \"id=$(git rev-parse --short HEAD)\" >> $GITHUB_OUTPUT\n      - name: Find correct JAR\n        if: ${{ github.event_name == 'push' }}\n        id: find-jar\n        run: |\n          output=\"$(find plugin/build/libs/ ! -name \"*-javadoc.jar\" ! -name \"*-sources.jar\" -type f -printf \"%f\\n\")\"\n          echo \"::set-output name=jarname::$output\"\n      - name: Release the build\n        if: ${{ github.event_name == 'push' }}\n        uses: ncipollo/release-action@v1\n        with:\n          artifacts: plugin/build/libs/${{ steps.find-jar.outputs.jarname }}\n          body: ${{ join(github.event.commits.*.message, '\\n') }}\n          prerelease: true\n          name: Dev-build ${{ steps.git-version.outputs.id }}\n          tag: dev-build\n      - name: Upload to Modrinth\n        if: ${{ github.event_name == 'push' }}\n        uses: RubixDev/modrinth-upload@v1.0.0\n        with:\n          token: ${{ secrets.MODRINTH_TOKEN }}\n          file_path: plugin/build/libs/${{ steps.find-jar.outputs.jarname }}\n          name: Dev-build ${{ steps.git-version.outputs.id }}\n          version: ${{ steps.git-version.outputs.id }}\n          changelog: ${{ join(github.event.commits.*.message, '\\n') }}\n          game_versions: 1.7.2\n          release_type: beta\n          loaders: velocity\n          featured: false\n          project_id: TZOteSf2\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "name: Java CI with Gradle\n\non:\n  release:\n    types: [published]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4.2.2\n      - name: Set up JDK\n        uses: actions/setup-java@v4.7.0\n        with:\n          distribution: temurin\n          java-version: 25\n      - name: Cache generated data\n        uses: actions/cache@v5.0.4\n        with:\n          path: |\n            plugin/build/minecraft/\n            plugin/build/generated/minecraft/mapping/\n          key: minecraft-${{ hashFiles('gradle.properties') }}\n      - name: Build LimboAPI\n        run: ./gradlew build\n      - name: Upload LimboAPI\n        uses: actions/upload-artifact@v4.6.2\n        with:\n          name: LimboAPI\n          path: \"*/build/libs/*.jar\"\n      - name: Find correct JAR\n        id: find-jar\n        run: |\n          output=\"$(find plugin/build/libs/ ! -name \"*-javadoc.jar\" ! -name \"*-sources.jar\" -type f -printf \"%f\\n\")\"\n          echo \"::set-output name=jarname::$output\"\n      - name: Upload to the GitHub release\n        uses: actions/upload-release-asset@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          upload_url: ${{ github.event.release.upload_url }}\n          asset_path: plugin/build/libs/${{ steps.find-jar.outputs.jarname }}\n          asset_name: ${{ steps.find-jar.outputs.jarname }}\n          asset_content_type: application/java-archive\n      - name: Upload to Modrinth\n        uses: RubixDev/modrinth-upload@v1.0.0\n        with:\n          token: ${{ secrets.MODRINTH_TOKEN }}\n          file_path: plugin/build/libs/${{ steps.find-jar.outputs.jarname }}\n          name: Release ${{ github.event.release.tag_name }}\n          version: ${{ github.event.release.tag_name }}\n          changelog: ${{ github.event.release.body }}\n          game_versions: 1.7.2\n          release_type: release\n          loaders: velocity\n          featured: true\n          project_id: TZOteSf2\n"
  },
  {
    "path": ".gitignore",
    "content": "# IntelliJ user-specific stuff\n.idea/\n*.iml\n\n# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# Package Files\n*.jar\n*.zip\n*.tar.gz\n*.rar\n\n# Virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml\nhs_err_pid*\n\n*~\n\n# Temporary files which can be created if a process still has a handle open of a deleted file\n.fuse_hidden*\n\n# KDE directory preferences\n.directory\n\n# Linux trash folder which might appear on any partition or disk\n.Trash-*\n\n# .nfs files are created when an open file is removed but is still being accessed\n.nfs*\n\n# General\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Icon must end with two \\r\nIcon\n\n# Thumbnails\n._*\n\n# Files that might appear in the root of a volume\n.DocumentRevisions-V100\n.fseventsd\n.Spotlight-V100\n.TemporaryItems\n.Trashes\n.VolumeIcon.icns\n.com.apple.timemachine.donotpresent\n\n# Directories potentially created on remote AFP share\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\n# Windows thumbnail cache files\nThumbs.db\nThumbs.db:encryptable\nehthumbs.db\nehthumbs_vista.db\n\n# Dump file\n*.stackdump\n\n# Folder config file\n[Dd]esktop.ini\n\n# Recycle Bin used on file shares\n$RECYCLE.BIN/\n\n# Windows Installer files\n*.cab\n*.msi\n*.msix\n*.msm\n*.msp\n\n# Windows shortcuts\n*.lnk\n\n# Gradle\n.gradle\nbuild/\n\n# Gradle Patch\n**/build/\n\n# Common working directory\nrun/\n\n# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)\n!gradle-wrapper.jar\n"
  },
  {
    "path": "HEADER.txt",
    "content": "Copyright (C) 2021 - 2025 Elytrium\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n"
  },
  {
    "path": "HEADER_MCPROTOCOLLIB.txt",
    "content": "This file is part of MCProtocolLib, licensed under the MIT License (MIT).\n\nCopyright (C) 2013-2021 Steveice10\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE\nOR OTHER DEALINGS IN THE SOFTWARE."
  },
  {
    "path": "HEADER_MIXED.txt",
    "content": "Copyright (C) 2021 - 2025 Elytrium\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nThis file contains some parts of Velocity, licensed under the AGPLv3 License (AGPLv3).\n\nCopyright (C) 2018 Velocity Contributors\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <https://www.gnu.org/licenses/>."
  },
  {
    "path": "LICENSE",
    "content": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nour General Public Licenses are intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n  A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate.  Many developers of free software are heartened and\nencouraged by the resulting cooperation.  However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n  The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community.  It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server.  Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n  An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals.  This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU Affero General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Remote Network Interaction; Use with the GNU General Public License.\n\n  Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software.  This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time.  Such new versions\nwill be similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU Affero General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU Affero General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU Affero General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as published\n    by the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n\n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source.  For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code.  There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU AGPL, see\n<https://www.gnu.org/licenses/>.\n"
  },
  {
    "path": "README.md",
    "content": "<img src=\"https://elytrium.net/src/img/elytrium.webp\" alt=\"Elytrium\" align=\"right\">\n\n# LimboAPI\n\n[![Join our Discord](https://img.shields.io/discord/775778822334709780.svg?logo=discord&label=Discord)](https://ely.su/discord)\n![Modrinth Game Versions](https://img.shields.io/modrinth/game-versions/TZOteSf2?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAIkAAAA8CAMAAABl%2FWk9AAABAlBMVEUAAAAApcwAqM4Apc4Ap88Apc4Apc4AqM0Aps0Ap84Apc0ApswApc4Aps0Ap80Aps4Ap80Aps0Ap84Aps0Aps4Aps0EqdAHrNMKrtQNsdcRtNoVttwWtt0buuAbuuAbuuAauuAbuuEauuAbu%2BAbuuAbuuEbu%2BAbuuEau%2BAbuuAbuuEau%2BEauuAbuuAbueAbuuAau%2BEbuuAauuAauuAbuuEauuEau%2BAbuuAau%2BEbu%2BAWtt0bvOAau%2BEZuOEYt94cvOEUtt8YudsVsdYAn90A%2F%2F8CqM8Ap84Bp84Aps0Ap80Aps0Aps0Aps0auuAauuAbuuAbuuAauuAauuAbuuAAps0buuCTPBtaAAAAVHRSTlMAIhwzOj5ESk1aZnB3f4iTnKWqrrW7xMDCxdDa3%2BDc2tbMxcC8uLOvp6KflpCHgXl1b15ZVE5EQDovKSQhHRcRDAgFAgHL1Nne5e30%2FPj08e3q5vwu6%2BLEAAADTUlEQVR42sXXhXLDPAzAcY2ZGcrMzAzjYhK9%2F6N8YA8zW62Xwu9gvOp6yt8JTKmSjXnHA18Jlqn63xAj5IbLGqWWi%2FvH%2BJ2jufwh3oUXPYSGMmlYjFLcN0aRkc%2BJzKACi5DUUSzQBMj22aeuNsxfUTaIjS1qBJkozF3XRS9HBrkczFsGJVwd9vMEcqMazFfLhhIF9vO2Hd%2B5T05n4GAVJJIoEQAmhZ%2BujFl4lYxSH6KYXmY%2Fb4y%2BfevBmIVDEIqiRFTw8%2FGrMQMnIFLuo9iwzg%2FCnz%2B%2F7RnW7YFIACWSwASRm%2BGqXLZAoIASthaPHprojwbh7Xh%2Fkr3NtlrUMsC40UwjVuW1DH%2BVlkaty36exd9uDKn9OUStyKPmQBN6VbbgrxIToybSf5rle0JHrV%2F5iJrQ%2FZtsT1bgbyJTRU1lVd6OdoV23kdc2dnoqkRNa3xETebSUNRjNdvrGcaFoCZ%2BFBsVP6ImNXhRHmUVYKVnWiYyarozVgemioRrQ9U2wA775BxMOr%2Bj5gimCk34kELCnaFqDWCdfXJER80eTLIhvokh4dZQwt%2BJ7jm%2FvoRR40PkG3R%2F6ZXtPV5McrbXZqXcOz1aEUdtGONDiNQHKHXPdo97WQPOStSGJeUCcw%2BzSPz3aEXgt2atBVzHO82W9NpgCX8ATpiGKKaCDh37%2FjIwdQ2F9B8HTx0s4Tvg%2Bz5EyKnjuyFvWzevTxH7Q7DEh0yyYx6C0%2BrAxKYJ7PHGyh%2B1AKDUR8bm5UOYefnjX9tN3J9Y1ztpAiSRlgCmNkKz8ZsxO0cAXT%2BS9CIwOSpq1r3wC4NkawATIaJm3TM7i3Uk%2Bbt8VVzyqFl38H5h0FLAVIaSqFn3fNDmDfUgqV8CJiOJGu14pQNTq42QZG8CE5JEjXIKXVCQQ1oQmKZN%2Fa5xU%2FkgpKWBSapHbQPUtF1IGpT5pqhH7QgUVYZIcrZ4U5Sj1ttvgZo00vxN6KZ1ZO6UotZ7NnvYbwMhjLSBxza7qJ0AoelEwqyjVgdCaYAEMmrqykBJ4VRuZpH3DpACOIXB6wwGWQNaw4YT9dOblq21YJJiH0maP1GDxUigzMgdy9VhcTo%2B%2FG3ojqbLsGh1jRhisQp95Ma%2BWK4Gy1T0DLQlDPEv1X2Xr4VYWO8AAAAASUVORK5CYII%3D)\n![Modrinth Downloads](https://img.shields.io/modrinth/dt/TZOteSf2?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxNCIgdmlld0JveD0iMCAwIDUxMiA1MTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI%2BCiAgPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01MDMuMTYgMzIzLjU2QzUxNC41NSAyODEuNDcgNTE1LjMyIDIzNS45MSA1MDMuMiAxOTAuNzZDNDY2LjU3IDU0LjIyOTkgMzI2LjA0IC0yNi44MDAxIDE4OS4zMyA5Ljc3OTkxQzgzLjgxMDEgMzguMDE5OSAxMS4zODk5IDEyOC4wNyAwLjY4OTk0MSAyMzAuNDdINDMuOTlDNTQuMjkgMTQ3LjMzIDExMy43NCA3NC43Mjk4IDE5OS43NSA1MS43MDk4QzMwNi4wNSAyMy4yNTk4IDQxNS4xMyA4MC42Njk5IDQ1My4xNyAxODEuMzhMNDExLjAzIDE5Mi42NUMzOTEuNjQgMTQ1LjggMzUyLjU3IDExMS40NSAzMDYuMyA5Ni44MTk4TDI5OC41NiAxNDAuNjZDMzM1LjA5IDE1NC4xMyAzNjQuNzIgMTg0LjUgMzc1LjU2IDIyNC45MUMzOTEuMzYgMjgzLjggMzYxLjk0IDM0NC4xNCAzMDguNTYgMzY5LjE3TDMyMC4wOSA0MTIuMTZDMzkwLjI1IDM4My4yMSA0MzIuNCAzMTAuMyA0MjIuNDMgMjM1LjE0TDQ2NC40MSAyMjMuOTFDNDY4LjkxIDI1Mi42MiA0NjcuMzUgMjgxLjE2IDQ2MC41NSAzMDguMDdMNTAzLjE2IDMyMy41NloiIGZpbGw9IiMxYmQ5NmEiLz4KICA8cGF0aCBkPSJNMzIxLjk5IDUwNC4yMkMxODUuMjcgNTQwLjggNDQuNzUwMSA0NTkuNzcgOC4xMTAxMSAzMjMuMjRDMy44NDAxMSAzMDcuMzEgMS4xNyAyOTEuMzMgMCAyNzUuNDZINDMuMjdDNDQuMzYgMjg3LjM3IDQ2LjQ2OTkgMjk5LjM1IDQ5LjY3OTkgMzExLjI5QzUzLjAzOTkgMzIzLjggNTcuNDUgMzM1Ljc1IDYyLjc5IDM0Ny4wN0wxMDEuMzggMzIzLjkyQzk4LjEyOTkgMzE2LjQyIDk1LjM5IDMwOC42IDkzLjIxIDMwMC40N0M2OS4xNyAyMTAuODcgMTIyLjQxIDExOC43NyAyMTIuMTMgOTQuNzYwMUMyMjkuMTMgOTAuMjEwMSAyNDYuMjMgODguNDQwMSAyNjIuOTMgODkuMTUwMUwyNTUuMTkgMTMzQzI0NC43MyAxMzMuMDUgMjM0LjExIDEzNC40MiAyMjMuNTMgMTM3LjI1QzE1Ny4zMSAxNTQuOTggMTE4LjAxIDIyMi45NSAxMzUuNzUgMjg5LjA5QzEzNi44NSAyOTMuMTYgMTM4LjEzIDI5Ny4xMyAxMzkuNTkgMzAwLjk5TDE4OC45NCAyNzEuMzhMMTc0LjA3IDIzMS45NUwyMjAuNjcgMTg0LjA4TDI3OS41NyAxNzEuMzlMMjk2LjYyIDE5Mi4zOEwyNjkuNDcgMjE5Ljg4TDI0NS43OSAyMjcuMzNMMjI4Ljg3IDI0NC43MkwyMzcuMTYgMjY3Ljc5QzIzNy4xNiAyNjcuNzkgMjUzLjk1IDI4NS42MyAyNTMuOTggMjg1LjY0TDI3Ny43IDI3OS4zM0wyOTQuNTggMjYwLjc5TDMzMS40NCAyNDkuMTJMMzQyLjQyIDI3My44MkwzMDQuMzkgMzIwLjQ1TDI0MC42NiAzNDAuNjNMMjEyLjA4IDMwOC44MUwxNjIuMjYgMzM4LjdDMTg3LjggMzY3Ljc4IDIyNi4yIDM4My45MyAyNjYuMDEgMzgwLjU2TDI3Ny41NCA0MjMuNTVDMjE4LjEzIDQzMS40MSAxNjAuMSA0MDYuODIgMTI0LjA1IDM2MS42NEw4NS42Mzk5IDM4NC42OEMxMzYuMjUgNDUxLjE3IDIyMy44NCA0ODQuMTEgMzA5LjYxIDQ2MS4xNkMzNzEuMzUgNDQ0LjY0IDQxOS40IDQwMi41NiA0NDUuNDIgMzQ5LjM4TDQ4OC4wNiAzNjQuODhDNDU3LjE3IDQzMS4xNiAzOTguMjIgNDgzLjgyIDMyMS45OSA1MDQuMjJaIiBmaWxsPSIjMWJkOTZhIi8%2BCjwvc3ZnPg%3D%3D)\n[![Proxy Stats](https://img.shields.io/bstats/servers/12530?logo=minecraft&label=Servers)](https://bstats.org/plugin/velocity/LimboAPI/12530)\n[![Proxy Stats](https://img.shields.io/bstats/players/12530?logo=minecraft&label=Players)](https://bstats.org/plugin/velocity/LimboAPI/12530)\n\nLibrary for sending players to virtual servers (called limbo) \\\n[Описание и обсуждение на русском языке (spigotmc.ru)](https://spigotmc.ru/resources/limboapi-limboauth-limbofilter-virtualnye-servera-dlja-velocity.715/) \\\n[Описание и обсуждение на русском языке (rubukkit.org)](http://rubukkit.org/threads/limboapi-limboauth-limbofilter-virtualnye-servera-dlja-velocity.177904/)\n\nTest server: [``ely.su``](https://hotmc.ru/minecraft-server-203216)\n\n## See also\n\n- [LimboAuth](https://github.com/Elytrium/LimboAuth) - Auth System built in virtual server (Limbo). Uses BCrypt, has TOTP 2FA feature. Supports literally any database due to OrmLite.\n- [LimboFilter](https://github.com/Elytrium/LimboFilter) - Most powerful bot filtering solution for Minecraft proxies. Built with LimboAPI.\n\n## Features of LimboAPI\n\n- Send to the Limbo server during login process\n- Send to the Limbo server during play process\n- Send maps, items to player's virtual inventory\n- Display player's XP\n- Send Title, Chat, ActionBar\n- Load world from world files like .schematic\n- and more...\n\n## How to\n\n- Include ``limboapi-api`` to your Maven/Gradle project as compile-only\n- Subscribe to ``LoginLimboRegisterEvent`` to send players to the Limbo server during login process\n- Use ``LimboFactory`` to send players to the Limbo server during play process\n\n## How to include it\n\n#### Setup your project via adding our maven repository to your pom.xml or build.gradle file.\n\n- Maven:\n\n```xml\n    <repositories>\n        <repository>\n            <id>elytrium-repo</id>\n            <url>https://maven.elytrium.net/repo/</url>\n        </repository>\n    </repositories>\n\n    <dependencies>\n        <dependency>\n            <groupId>net.elytrium.limboapi</groupId>\n            <artifactId>api</artifactId>\n            <version>1.1.26</version>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n```\n\n- Gradle:\n\n```groovy\n    repositories {\n        maven {\n            setName(\"elytrium-repo\")\n            setUrl(\"https://maven.elytrium.net/repo/\")\n        }\n    }\n\n    dependencies {\n        compileOnly(\"net.elytrium.limboapi:api:1.1.26\")\n    }\n```\n\n## Used Open Source projects\n\n- [ProtocolSupport](https://github.com/ProtocolSupport/ProtocolSupport) - for modern->legacy block mappings\n- [ViaVersion](https://github.com/ViaVersion/ViaVersion) - for modern string->integer block mappings\n\n## Demo\n\n- [LimboAuth](https://github.com/Elytrium/LimboAuth) - The auth plugin, that uses LimboAPI as a dependency at the basic level.\n- [LimboFilter](https://github.com/Elytrium/LimboFilter) - The antibot solution, that uses LimboAPI as a dependency, using almost all available API methods, like Low-level Minecraft packet control.\n\n## Donation\n\nYour donations are really appreciated. Donations wallets/links/cards:\n\n- MasterCard Debit Card (Tinkoff Bank): ``5536 9140 0599 1975``\n- Qiwi Wallet: ``PFORG`` or [this link](https://my.qiwi.com/form/Petr-YSpyiLt9c6)\n- YooMoney Wallet: ``4100 1721 8467 044`` or [this link](https://yoomoney.ru/quickpay/shop-widget?writer=seller&targets=Donation&targets-hint=&default-sum=&button-text=11&payment-type-choice=on&mobile-payment-type-choice=on&hint=&successURL=&quickpay=shop&account=410017218467044)\n- Monero (XMR): 86VQyCz68ApebfFgrzRFAuYLdvd3qG8iT9RHcru9moQkJR9W2Q89Gt3ecFQcFu6wncGwGJsMS9E8Bfr9brztBNbX7Q2rfYS\n"
  },
  {
    "path": "VERSION",
    "content": "1.1.26\n"
  },
  {
    "path": "api/HEADER.txt",
    "content": "Copyright (C) 2021 - 2025 Elytrium\n\nThe LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\nreference the LICENSE file in the api top-level directory."
  },
  {
    "path": "api/LICENSE",
    "content": "Copyright 2021 Elytrium\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  {
    "path": "api/build.gradle.kts",
    "content": "@file:Suppress(\"GroovyAssignabilityCheck\")\n\nimport net.minecraftforge.licenser.LicenseExtension\nimport net.minecraftforge.licenser.LicenseProperties\nimport org.gradle.kotlin.dsl.closureOf\n\nplugins {\n    `java-library`\n    `maven-publish`\n}\n\ntasks.withType<JavaCompile> {\n    options.release.set(21)\n    options.encoding = \"UTF-8\"\n}\n\ndependencies {\n    compileOnly(libs.minecraft.velocity.api)\n    api(libs.elytrium.commons.config)\n    api(libs.elytrium.commons.utils)\n    api(libs.elytrium.commons.velocity)\n    api(libs.elytrium.commons.kyori)\n    api(libs.minecraft.adventure.nbt)\n\n    compileOnly(libs.tool.spotbugs.annotations)\n}\n\nextensions.configure<LicenseExtension> {\n    matching(\n        \"**/mcprotocollib/**\",\n        closureOf<LicenseProperties> {\n            setHeader(rootProject.file(\"HEADER_MCPROTOCOLLIB.txt\"))\n        }\n    )\n    setHeader(file(\"HEADER.txt\"))\n}\n\ntasks.named<Javadoc>(\"javadoc\") {\n    options.encoding = \"UTF-8\"\n    (options as? StandardJavadocDocletOptions)?.apply {\n        source = \"21\"\n        links(\"https://docs.oracle.com/en/java/javase/11/docs/api/\")\n        addStringOption(\"Xdoclint:none\", \"-quiet\")\n        if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) {\n            addBooleanOption(\"-no-module-directories\", true)\n        }\n    }\n}\n\nval sourcesJar by tasks.registering(Jar::class) {\n    archiveClassifier.set(\"sources\")\n    from(sourceSets.main.get().allSource)\n}\n\nval javadocJar by tasks.registering(Jar::class) {\n    archiveClassifier.set(\"javadoc\")\n    from(tasks.javadoc)\n}\n\npublishing {\n    repositories {\n        maven {\n            credentials {\n                username = System.getenv(\"ELYTRIUM_MAVEN_USERNAME\")\n                password = System.getenv(\"ELYTRIUM_MAVEN_PASSWORD\")\n            }\n            name = \"elytrium-repo\"\n            url = uri(\"https://maven.elytrium.net/repo/\")\n        }\n    }\n\n    publications.create<MavenPublication>(\"publication\") {\n        from(components[\"java\"])\n\n        artifact(javadocJar)\n        artifact(sourcesJar)\n    }\n}\n\nartifacts {\n    archives(javadocJar)\n    archives(sourcesJar)\n}\n\n@Suppress(\"UNCHECKED_CAST\")\nval getCurrentShortRevision = rootProject.extra[\"getCurrentShortRevision\"] as () -> String\n\n\nval versionStringProvider = provider {\n    if (version.toString().contains(\"-\")) {\n        \"${version} (git-${getCurrentShortRevision()})\"\n    } else {\n        version.toString()\n    }\n}\n\nval copyTask by tasks.register<Copy>(\"generateTemplates\") {\n    val versionString = versionStringProvider.get()\n    inputs.property(\"version\", versionString)\n    from(file(\"src/main/templates\"))\n    into(layout.buildDirectory.dir(\"generated/sources/templates\"))\n    expand(\"version\" to versionString)\n}\n\nsourceSets.main.configure {\n    java.srcDir(copyTask.outputs)\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/Limbo.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api;\n\nimport com.velocitypowered.api.command.Command;\nimport com.velocitypowered.api.command.CommandMeta;\nimport com.velocitypowered.api.proxy.Player;\nimport java.util.function.Supplier;\nimport net.elytrium.limboapi.api.command.LimboCommandMeta;\nimport net.elytrium.limboapi.api.player.GameMode;\nimport net.elytrium.limboapi.api.protocol.PacketDirection;\nimport net.elytrium.limboapi.api.protocol.packets.PacketMapping;\n\npublic interface Limbo {\n\n  void spawnPlayer(Player player, LimboSessionHandler handler);\n\n  void respawnPlayer(Player player);\n\n  long getCurrentOnline();\n\n  Limbo setName(String name);\n\n  Limbo setReadTimeout(int millis);\n\n  Limbo setWorldTime(long ticks);\n\n  Limbo setGameMode(GameMode gameMode);\n\n  Limbo setShouldRejoin(boolean shouldRejoin);\n\n  Limbo setShouldRespawn(boolean shouldRespawn);\n\n  @Deprecated\n  Limbo setShouldUpdateTags(boolean shouldUpdateTags);\n\n  Limbo setReducedDebugInfo(boolean reducedDebugInfo);\n\n  Limbo setViewDistance(int viewDistance);\n\n  Limbo setSimulationDistance(int simulationDistance);\n\n  Limbo setMaxSuppressPacketLength(int maxSuppressPacketLength);\n\n  Limbo registerCommand(LimboCommandMeta commandMeta);\n\n  Limbo registerCommand(CommandMeta commandMeta, Command command);\n\n  Limbo registerPacket(PacketDirection direction, Class<?> packetClass, Supplier<?> packetSupplier, PacketMapping[] packetMappings);\n\n  void dispose();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/LimboFactory.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.proxy.Player;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.file.Path;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.chunk.BuiltInBiome;\nimport net.elytrium.limboapi.api.chunk.Dimension;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\nimport net.elytrium.limboapi.api.chunk.VirtualChunk;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport net.elytrium.limboapi.api.file.BuiltInWorldFileType;\nimport net.elytrium.limboapi.api.file.WorldFile;\nimport net.elytrium.limboapi.api.material.Block;\nimport net.elytrium.limboapi.api.material.Item;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.protocol.PreparedPacket;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.elytrium.limboapi.api.protocol.packets.PacketFactory;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\n\npublic interface LimboFactory {\n\n  /**\n   * Creates new virtual block from Block enum.\n   *\n   * @param block Block from Block enum.\n   *\n   * @return new virtual block.\n   */\n  VirtualBlock createSimpleBlock(Block block);\n\n  /**\n   * Creates new virtual block from id and data.\n   *\n   * @param legacyID Legacy block id. (1.12.2 and lower)\n   *\n   * @return new virtual block.\n   */\n  VirtualBlock createSimpleBlock(short legacyID);\n\n  /**\n   * Creates new virtual block from id and data.\n   *\n   * @param modernID Modern block id.\n   *\n   * @return new virtual block.\n   */\n  VirtualBlock createSimpleBlock(String modernID);\n\n  /**\n   * Creates new virtual block from id and data.\n   *\n   * @param modernID Modern block id.\n   * @param properties Modern properties like {\"waterlogged\": \"true\"}.\n   *\n   * @return new virtual block.\n   */\n  VirtualBlock createSimpleBlock(String modernID, Map<String, String> properties);\n\n  /**\n   * Creates new virtual block from id and data.\n   *\n   * @param legacyID Block id.\n   * @param modern   Use the latest supported version ids or 1.12.2 and lower.\n   *\n   * @return new virtual block.\n   */\n  VirtualBlock createSimpleBlock(short legacyID, boolean modern);\n\n  /**\n   * Creates new virtual customizable block.\n   *\n   * @param solid          Defines if the block is solid or not.\n   * @param air            Defines if the block is the air.\n   * @param motionBlocking Defines if the block blocks motions. (1.14+)\n   * @param id             Block protocol id.\n   *\n   * @return new virtual block.\n   */\n  VirtualBlock createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, short id);\n\n  /**\n   * Creates new virtual customizable block.\n   *\n   * @param solid          Defines if the block is solid or not.\n   * @param air            Defines if the block is the air.\n   * @param motionBlocking Defines if the block blocks motions. (1.14+)\n   * @param modernID       Block id.\n   * @param properties     Modern properties like {\"waterlogged\": \"true\"}.\n   *\n   * @return new virtual block.\n   */\n  VirtualBlock createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, Map<String, String> properties);\n\n  /**\n   * Creates new virtual world.\n   *\n   * @param dimension World dimension.\n   * @param posX      Spawn location. (X)\n   * @param posY      Spawn location. (Y)\n   * @param posZ      Spawn location. (Z)\n   * @param yaw       Spawn rotation. (Yaw)\n   * @param pitch     Spawn rotation. (Pitch)\n   *\n   * @return new virtual world.\n   */\n  VirtualWorld createVirtualWorld(Dimension dimension, double posX, double posY, double posZ, float yaw, float pitch);\n\n  /**\n   * Creates new virtual chunk with plain biomes set as default.\n   * You need to provide the chunk location, you can get it using {@code blockCoordinate >> 4}.\n   *\n   * @param posX Chunk location. (X)\n   * @param posZ Chunk location. (Z)\n   *\n   * @return new virtual chunk.\n   */\n  @Deprecated\n  VirtualChunk createVirtualChunk(int posX, int posZ);\n\n  /**\n   * Creates new virtual chunk.\n   * You need to provide the chunk location, you can get it using {@code blockCoordinate >> 4}.\n   *\n   * @param posX         Chunk location. (X)\n   * @param posZ         Chunk location. (Z)\n   * @param defaultBiome Default biome to fill it.\n   *\n   * @return new virtual chunk.\n   */\n  VirtualChunk createVirtualChunk(int posX, int posZ, VirtualBiome defaultBiome);\n\n  /**\n   * Creates new virtual chunk.\n   * You need to provide the chunk location, you can get it using ({@code block_coordinate >> 4})\n   *\n   * @param posX         Chunk location. (X)\n   * @param posZ         Chunk location. (Z)\n   * @param defaultBiome Default biome to fill it.\n   *\n   * @return new virtual chunk.\n   */\n  VirtualChunk createVirtualChunk(int posX, int posZ, BuiltInBiome defaultBiome);\n\n  /**\n   * Creates new virtual server.\n   *\n   * @param world Virtual world.\n   *\n   * @return new virtual server.\n   */\n  Limbo createLimbo(VirtualWorld world);\n\n\n  /**\n   * Releases a thread after PreparedPacket#build executions.\n   * Used to free compression libraries.\n   */\n  void releasePreparedPacketThread(Thread thread);\n\n  /**\n   * Creates new prepared packet builder.\n   *\n   * @return new prepared packet.\n   */\n  PreparedPacket createPreparedPacket();\n\n  /**\n   * Creates new prepared packet builder.\n   *\n   * @param minVersion Minimum version to prepare.\n   * @param maxVersion Maximum version to prepare.\n   *\n   * @return new prepared packet.\n   */\n  PreparedPacket createPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion);\n\n  /**\n   * Creates new prepared packet builder for the CONFIG state.\n   *\n   * @return new prepared packet.\n   */\n  PreparedPacket createConfigPreparedPacket();\n\n  /**\n   * Creates new prepared packet builder for the CONFIG state.\n   *\n   * @param minVersion Minimum version to prepare.\n   * @param maxVersion Maximum version to prepare.\n   *\n   * @return new prepared packet.\n   */\n  PreparedPacket createConfigPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion);\n\n  /**\n   * Pass the player to the next Login Limbo, without spawning at current Limbo.\n   *\n   * @param player Player to pass.\n   */\n  void passLoginLimbo(Player player);\n\n  /**\n   * Creates new virtual item from Item enum.\n   *\n   * @param item Item from item enum.\n   *\n   * @return new virtual item.\n   */\n  VirtualItem getItem(Item item);\n\n  /**\n   * Creates new virtual item from Item enum.\n   *\n   * @param itemID Modern item identifier.\n   *\n   * @return new virtual item.\n   */\n  VirtualItem getItem(String itemID);\n\n  /**\n   * Creates new virtual item from Item enum.\n   *\n   * @param itemLegacyID Legacy item ID\n   *\n   * @return new virtual item.\n   */\n  VirtualItem getLegacyItem(int itemLegacyID);\n\n  /**\n   * Creates new item component map.\n   *\n   * @return new item component map\n   */\n  ItemComponentMap createItemComponentMap();\n\n  VirtualBlockEntity getBlockEntity(String entityID);\n\n  /**\n   * A factory to instantiate Minecraft packet objects.\n   */\n  PacketFactory getPacketFactory();\n\n  ProtocolVersion getPrepareMinVersion();\n\n  ProtocolVersion getPrepareMaxVersion();\n\n  /**\n   * Opens world file (a.k.a. schematic file)\n   *\n   * @param apiType World file type\n   * @param file World file\n   * @return Ready to use WorldFile\n   */\n  WorldFile openWorldFile(BuiltInWorldFileType apiType, Path file) throws IOException;\n\n\n  /**\n   * Opens world file (a.k.a. schematic file)\n   *\n   * @param apiType World file type\n   * @param stream World file stream\n   * @return Ready to use WorldFile\n   */\n  WorldFile openWorldFile(BuiltInWorldFileType apiType, InputStream stream) throws IOException;\n\n\n  /**\n   * Opens world file (a.k.a. schematic file)\n   *\n   * @param apiType World file type\n   * @param tag World file NBT tag\n   * @return Ready to use WorldFile\n   */\n  WorldFile openWorldFile(BuiltInWorldFileType apiType, CompoundBinaryTag tag);\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/LimboSessionHandler.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api;\n\nimport net.elytrium.limboapi.api.player.LimboPlayer;\n\npublic interface LimboSessionHandler {\n\n  default void onSpawn(Limbo server, LimboPlayer player) {\n\n  }\n\n  default void onConfig(Limbo server, LimboPlayer player) {\n\n  }\n\n  default void onMove(double posX, double posY, double posZ) {\n\n  }\n\n  default void onMove(double posX, double posY, double posZ, float yaw, float pitch) {\n\n  }\n\n  default void onRotate(float yaw, float pitch) {\n\n  }\n\n  default void onGround(boolean onGround) {\n\n  }\n\n  default void onTeleport(int teleportID) {\n\n  }\n\n  default void onChat(String chat) {\n\n  }\n\n  /**\n   * @param packet Any velocity built-in packet or any packet registered via {@link Limbo#registerPacket}.\n   */\n  default void onGeneric(Object packet) {\n\n  }\n\n  default void onDisconnect() {\n\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/BlockEntityVersion.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.Arrays;\nimport java.util.EnumMap;\nimport java.util.EnumSet;\nimport java.util.Map;\nimport java.util.Set;\nimport net.elytrium.limboapi.api.utils.EnumUniverse;\n\npublic enum BlockEntityVersion {\n  LEGACY(EnumSet.range(ProtocolVersion.MINECRAFT_1_7_2, ProtocolVersion.MINECRAFT_1_18_2)),\n  MINECRAFT_1_19(EnumSet.of(ProtocolVersion.MINECRAFT_1_19)),\n  MINECRAFT_1_19_1(EnumSet.of(ProtocolVersion.MINECRAFT_1_19_1)),\n  MINECRAFT_1_19_3(EnumSet.of(ProtocolVersion.MINECRAFT_1_19_3)),\n  MINECRAFT_1_19_4(EnumSet.of(ProtocolVersion.MINECRAFT_1_19_4)),\n  MINECRAFT_1_20(EnumSet.of(ProtocolVersion.MINECRAFT_1_20)),\n  MINECRAFT_1_20_2(EnumSet.of(ProtocolVersion.MINECRAFT_1_20_2)),\n  MINECRAFT_1_20_3(EnumSet.of(ProtocolVersion.MINECRAFT_1_20_3)),\n  MINECRAFT_1_20_5(EnumSet.of(ProtocolVersion.MINECRAFT_1_20_5)),\n  MINECRAFT_1_21(EnumSet.of(ProtocolVersion.MINECRAFT_1_21)),\n  MINECRAFT_1_21_2(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_2)),\n  MINECRAFT_1_21_4(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_4)),\n  MINECRAFT_1_21_5(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_5)),\n  MINECRAFT_1_21_6(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_6)),\n  MINECRAFT_1_21_7(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_7)),\n  MINECRAFT_1_21_9(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_9)),\n  MINECRAFT_1_21_11(EnumSet.of(ProtocolVersion.MINECRAFT_1_21_11)),\n  MINECRAFT_26_1(EnumSet.of(ProtocolVersion.MINECRAFT_26_1));\n\n  private static final EnumMap<ProtocolVersion, BlockEntityVersion> MC_VERSION_TO_ITEM_VERSIONS = new EnumMap<>(ProtocolVersion.class);\n  private static final Map<String, BlockEntityVersion> KEY_LOOKUP = Map.copyOf(EnumUniverse.createProtocolLookup(values()));\n\n  private final Set<ProtocolVersion> versions;\n\n  BlockEntityVersion(ProtocolVersion... versions) {\n    this.versions = EnumSet.copyOf(Arrays.asList(versions));\n  }\n\n  BlockEntityVersion(Set<ProtocolVersion> versions) {\n    this.versions = versions;\n  }\n\n  public ProtocolVersion getMinSupportedVersion() {\n    return this.versions.iterator().next();\n  }\n\n  public Set<ProtocolVersion> getVersions() {\n    return this.versions;\n  }\n\n  static {\n    for (BlockEntityVersion version : BlockEntityVersion.values()) {\n      for (ProtocolVersion protocolVersion : version.getVersions()) {\n        MC_VERSION_TO_ITEM_VERSIONS.put(protocolVersion, version);\n      }\n    }\n  }\n\n  public static BlockEntityVersion parse(String from) {\n    return KEY_LOOKUP.getOrDefault(from, LEGACY);\n  }\n\n  public static BlockEntityVersion from(ProtocolVersion protocolVersion) {\n    return MC_VERSION_TO_ITEM_VERSIONS.get(protocolVersion);\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/BuiltInBiome.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\npublic enum BuiltInBiome {\n\n  PLAINS,\n  SWAMP,\n  SWAMP_HILLS,\n  NETHER_WASTES,\n  THE_END\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/Dimension.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\npublic enum Dimension {\n\n  OVERWORLD(\"minecraft:overworld\", 0, 0, 28, true, BuiltInBiome.PLAINS), // (384 + 64) / 16\n  NETHER(\"minecraft:the_nether\", -1, 1, 16, false, BuiltInBiome.NETHER_WASTES), // 256 / 16\n  THE_END(\"minecraft:the_end\", 1, 2, 16, false, BuiltInBiome.THE_END); // 256 / 16\n\n  private final String key;\n  private final int legacyID;\n  private final int modernID;\n  private final int maxSections;\n  private final boolean hasLegacySkyLight;\n  private final BuiltInBiome defaultBiome;\n\n  Dimension(String key, int legacyID, int modernID, int maxSections, boolean hasLegacySkyLight, BuiltInBiome defaultBiome) {\n    this.key = key;\n    this.legacyID = legacyID;\n    this.modernID = modernID;\n    this.maxSections = maxSections;\n    this.hasLegacySkyLight = hasLegacySkyLight;\n    this.defaultBiome = defaultBiome;\n  }\n\n  public String getKey() {\n    return this.key;\n  }\n\n  public int getLegacyID() {\n    return this.legacyID;\n  }\n\n  public int getModernID() {\n    return this.modernID;\n  }\n\n  public int getMaxSections() {\n    return this.maxSections;\n  }\n\n  public boolean hasLegacySkyLight() {\n    return this.hasLegacySkyLight;\n  }\n\n  public BuiltInBiome getDefaultBiome() {\n    return this.defaultBiome;\n  }\n}\n\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/VirtualBiome.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\npublic interface VirtualBiome {\n\n  String getName();\n\n  int getID();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/VirtualBlock.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport net.elytrium.limboapi.api.material.WorldVersion;\n\npublic interface VirtualBlock {\n\n  short getModernID();\n\n  String getModernStringID();\n\n  @Deprecated\n  short getID(ProtocolVersion version);\n\n  short getBlockID(WorldVersion version);\n\n  short getBlockID(ProtocolVersion version);\n\n  boolean isSupportedOn(ProtocolVersion version);\n\n  boolean isSupportedOn(WorldVersion version);\n\n  short getBlockStateID(ProtocolVersion version);\n\n  boolean isSolid();\n\n  boolean isAir();\n\n  boolean isMotionBlocking();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/VirtualBlockEntity.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\n\npublic interface VirtualBlockEntity {\n\n  int getID(ProtocolVersion version);\n\n  int getID(BlockEntityVersion version);\n\n  boolean isSupportedOn(ProtocolVersion version);\n\n  boolean isSupportedOn(BlockEntityVersion version);\n\n  String getModernID();\n\n  Entry getEntry(int posX, int posY, int posZ, CompoundBinaryTag nbt);\n\n  interface Entry {\n\n    VirtualBlockEntity getBlockEntity();\n\n    int getPosX();\n\n    int getPosY();\n\n    int getPosZ();\n\n    CompoundBinaryTag getNbt();\n\n    int getID(ProtocolVersion version);\n\n    int getID(BlockEntityVersion version);\n\n    boolean isSupportedOn(ProtocolVersion version);\n\n    boolean isSupportedOn(BlockEntityVersion version);\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/VirtualChunk.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\nimport net.elytrium.limboapi.api.chunk.data.ChunkSnapshot;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport org.checkerframework.checker.nullness.qual.NonNull;\nimport org.checkerframework.checker.nullness.qual.Nullable;\nimport org.checkerframework.common.value.qual.IntRange;\n\npublic interface VirtualChunk {\n\n  void setBlock(int posX, int posY, int posZ, @Nullable VirtualBlock block);\n\n  void setBlockEntity(int posX, int posY, int posZ, @Nullable CompoundBinaryTag nbt, @Nullable VirtualBlockEntity blockEntity);\n\n  void setBlockEntity(VirtualBlockEntity.Entry blockEntityEntry);\n\n  @NonNull\n  VirtualBlock getBlock(int posX, int posY, int posZ);\n\n  void setBiome2D(int posX, int posZ, @NonNull VirtualBiome biome);\n\n  void setBiome3D(int posX, int posY, int posZ, @NonNull VirtualBiome biome);\n\n  @NonNull\n  VirtualBiome getBiome(int posX, int posY, int posZ);\n\n  void setBlockLight(int posX, int posY, int posZ, byte light);\n\n  byte getBlockLight(int posX, int posY, int posZ);\n\n  void setSkyLight(int posX, int posY, int posZ, byte light);\n\n  byte getSkyLight(int posX, int posY, int posZ);\n\n  void fillBlockLight(@IntRange(from = 0, to = 15) int level);\n\n  void fillSkyLight(@IntRange(from = 0, to = 15) int level);\n\n  int getPosX();\n\n  int getPosZ();\n\n  ChunkSnapshot getFullChunkSnapshot();\n\n  ChunkSnapshot getPartialChunkSnapshot(long previousUpdate);\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/VirtualWorld.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk;\n\nimport java.util.List;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport org.checkerframework.checker.nullness.qual.NonNull;\nimport org.checkerframework.checker.nullness.qual.Nullable;\nimport org.checkerframework.common.value.qual.IntRange;\n\npublic interface VirtualWorld {\n\n  void setBlockEntity(int posX, int posY, int posZ, @Nullable CompoundBinaryTag nbt, @Nullable VirtualBlockEntity blockEntity);\n\n  @NonNull\n  VirtualBlock getBlock(int posX, int posY, int posZ);\n\n  void setBiome2d(int posX, int posZ, @NonNull VirtualBiome biome);\n\n  void setBiome3d(int posX, int posY, int posZ, @NonNull VirtualBiome biome);\n\n  VirtualBiome getBiome(int posX, int posY, int posZ);\n\n  byte getBlockLight(int posX, int posY, int posZ);\n\n  void setBlockLight(int posX, int posY, int posZ, byte light);\n\n  void fillBlockLight(@IntRange(from = 0, to = 15) int level);\n\n  void fillSkyLight(@IntRange(from = 0, to = 15) int level);\n\n  List<VirtualChunk> getChunks();\n\n  List<List<VirtualChunk>> getOrderedChunks();\n\n  @Nullable\n  VirtualChunk getChunk(int posX, int posZ);\n\n  VirtualChunk getChunkOrNew(int posX, int posZ);\n\n  @NonNull\n  Dimension getDimension();\n\n  double getSpawnX();\n\n  double getSpawnY();\n\n  double getSpawnZ();\n\n  float getYaw();\n\n  float getPitch();\n\n  void setBlock(int posX, int posY, int posZ, @Nullable VirtualBlock block);\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/data/BlockSection.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk.data;\n\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic interface BlockSection {\n\n  void setBlockAt(int posX, int posY, int posZ, @Nullable VirtualBlock block);\n\n  VirtualBlock getBlockAt(int posX, int posY, int posZ);\n\n  BlockSection getSnapshot();\n\n  long getLastUpdate();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/data/BlockStorage.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk.data;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\npublic interface BlockStorage {\n\n  void write(Object byteBufObject, ProtocolVersion version, int pass);\n\n  void set(int posX, int posY, int posZ, @NonNull VirtualBlock block);\n\n  @NonNull\n  VirtualBlock get(int posX, int posY, int posZ);\n\n  int getDataLength(ProtocolVersion version);\n\n  BlockStorage copy();\n\n  static int index(int posX, int posY, int posZ) {\n    return posY << 8 | posZ << 4 | posX;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/data/ChunkSnapshot.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk.data;\n\nimport java.util.List;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\n\npublic interface ChunkSnapshot {\n\n  VirtualBlock getBlock(int posX, int posY, int posZ);\n\n  int getPosX();\n\n  int getPosZ();\n\n  boolean isFullChunk();\n\n  BlockSection[] getSections();\n\n  LightSection[] getLight();\n\n  VirtualBiome[] getBiomes();\n\n  List<VirtualBlockEntity.Entry> getBlockEntityEntries();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/data/LightSection.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk.data;\n\nimport net.elytrium.limboapi.api.mcprotocollib.NibbleArray3D;\n\npublic interface LightSection {\n\n  void setBlockLight(int posX, int posY, int posZ, byte light);\n\n  NibbleArray3D getBlockLight();\n\n  byte getBlockLight(int posX, int posY, int posZ);\n\n  void setSkyLight(int posX, int posY, int posZ, byte light);\n\n  NibbleArray3D getSkyLight();\n\n  byte getSkyLight(int posX, int posY, int posZ);\n\n  long getLastUpdate();\n\n  LightSection copy();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/chunk/util/CompactStorage.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.chunk.util;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\n\npublic interface CompactStorage {\n\n  void set(int index, int value);\n\n  int get(int index);\n\n  void write(Object byteBufObject, ProtocolVersion version);\n\n  int getBitsPerEntry();\n\n  @Deprecated(forRemoval = true)\n  default int getDataLength() {\n    return this.getDataLength(ProtocolVersion.MINIMUM_VERSION);\n  }\n\n  int getDataLength(ProtocolVersion version);\n\n  long[] getData();\n\n  CompactStorage copy();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/command/LimboCommandMeta.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.command;\n\nimport com.google.common.collect.ImmutableList;\nimport com.mojang.brigadier.tree.CommandNode;\nimport com.velocitypowered.api.command.CommandMeta;\nimport com.velocitypowered.api.command.CommandSource;\nimport java.util.Collection;\nimport java.util.Objects;\nimport org.checkerframework.checker.nullness.qual.NonNull;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic class LimboCommandMeta implements CommandMeta {\n\n  @NonNull\n  private final Collection<String> aliases;\n  @NonNull\n  private final Collection<CommandNode<CommandSource>> hints;\n  @Nullable // Why?..\n  private final Object plugin;\n\n  public LimboCommandMeta(@NonNull Collection<String> aliases) {\n    this(aliases, null, null);\n  }\n\n  public LimboCommandMeta(@NonNull Collection<String> aliases, @Nullable Collection<CommandNode<CommandSource>> hints) {\n    this(aliases, hints, null);\n  }\n\n  public LimboCommandMeta(@NonNull Collection<String> aliases, @Nullable Collection<CommandNode<CommandSource>> hints, @Nullable Object plugin) {\n    this.aliases = aliases;\n    this.hints = Objects.requireNonNullElse(hints, ImmutableList.of());\n    this.plugin = plugin;\n  }\n\n  @NonNull\n  @Override\n  public Collection<String> getAliases() {\n    return this.aliases;\n  }\n\n  @NonNull\n  @Override\n  public Collection<CommandNode<CommandSource>> getHints() {\n    return this.hints;\n  }\n\n  @Nullable\n  @Override\n  public Object getPlugin() {\n    return this.plugin;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/event/LoginLimboRegisterEvent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.event;\n\nimport com.google.common.base.Preconditions;\nimport com.velocitypowered.api.event.player.KickedFromServerEvent;\nimport com.velocitypowered.api.proxy.Player;\nimport java.util.Queue;\nimport java.util.concurrent.LinkedBlockingQueue;\nimport java.util.function.Function;\n\n/**\n * This event is fired during login process before the player has been authenticated, e.g. to enable or disable custom authentication.\n */\npublic class LoginLimboRegisterEvent {\n\n  private final Player player;\n  private final Queue<Runnable> onJoinCallbacks;\n  private Function<KickedFromServerEvent, Boolean> onKickCallback;\n\n  public LoginLimboRegisterEvent(Player player) {\n    this.player = Preconditions.checkNotNull(player, \"player\");\n    this.onJoinCallbacks = new LinkedBlockingQueue<>();\n  }\n\n  public Player getPlayer() {\n    return this.player;\n  }\n\n  @Override\n  public String toString() {\n    return \"LoginLimboRegisterEvent{\"\n        + \"player=\" + this.player\n        + \"}\";\n  }\n\n  public Queue<Runnable> getOnJoinCallbacks() {\n    return this.onJoinCallbacks;\n  }\n\n\n  public Function<KickedFromServerEvent, Boolean> getOnKickCallback() {\n    return this.onKickCallback;\n  }\n\n  public void addOnJoinCallback(Runnable callback) {\n    this.onJoinCallbacks.add(callback);\n  }\n\n  /**\n   * @deprecated Use {@link LoginLimboRegisterEvent#addOnJoinCallback(Runnable)} instead\n   */\n  @Deprecated\n  public void addCallback(Runnable callback) {\n    this.onJoinCallbacks.add(callback);\n  }\n\n  public void setOnKickCallback(Function<KickedFromServerEvent, Boolean> callback) {\n    this.onKickCallback = callback;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/file/BuiltInWorldFileType.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.file;\n\npublic enum BuiltInWorldFileType {\n  SCHEMATIC,\n  WORLDEDIT_SCHEM,\n  STRUCTURE\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/file/WorldFile.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.file;\n\nimport net.elytrium.limboapi.api.LimboFactory;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport org.checkerframework.common.value.qual.IntRange;\n\npublic interface WorldFile {\n\n  default void toWorld(LimboFactory factory, VirtualWorld world, int offsetX, int offsetY, int offsetZ) {\n    this.toWorld(factory, world, offsetX, offsetY, offsetZ, 15);\n  }\n\n  void toWorld(LimboFactory factory, VirtualWorld world, int offsetX, int offsetY, int offsetZ, @IntRange(from = 0, to = 15) int lightLevel);\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/material/Block.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.material;\n\npublic enum Block {\n\n  AIR(0),\n  STONE(1),\n  GRASS(2),\n  DIRT(3),\n  COBBLESTONE(4),\n  PLANKS(5),\n  SAPLING(6),\n  BEDROCK(7),\n  FLOWING_WATER(8),\n  WATER(9),\n  FLOWING_LAVA(10),\n  LAVA(11),\n  SAND(12),\n  GRAVEL(13),\n  GOLD_ORE(14),\n  IRON_ORE(15),\n  COAL_ORE(16),\n  LOG(17),\n  LEAVES(18),\n  SPONGE(19),\n  GLASS(20),\n  LAPIS_ORE(21),\n  LAPIS_BLOCK(22),\n  DISPENSER(23),\n  SANDSTONE(24),\n  NOTEBLOCK(25),\n  BED(26),\n  GOLDEN_RAIL(27),\n  DETECTOR_RAIL(28),\n  STICKY_PISTON(29),\n  WEB(30),\n  TALLGRASS(31),\n  DEADBUSH(32),\n  PISTON(33),\n  PISTON_HEAD(34),\n  WOOL(35),\n  PISTON_EXTENSION(36),\n  YELLOW_FLOWER(37),\n  RED_FLOWER(38),\n  BROWN_MUSHROOM(39),\n  RED_MUSHROOM(40),\n  GOLD_BLOCK(41),\n  IRON_BLOCK(42),\n  DOUBLE_STONE_SLAB(43),\n  STONE_SLAB(44),\n  BRICK_BLOCK(45),\n  TNT(46),\n  BOOKSHELF(47),\n  MOSSY_COBBLESTONE(48),\n  OBSIDIAN(49),\n  TORCH(50),\n  FIRE(51),\n  MOB_SPAWNER(52),\n  OAK_STAIRS(53),\n  CHEST(54),\n  REDSTONE_WIRE(55),\n  DIAMOND_ORE(56),\n  DIAMOND_BLOCK(57),\n  CRAFTING_TABLE(58),\n  WHEAT(59),\n  FARMLAND(60),\n  FURNACE(61),\n  LIT_FURNACE(62),\n  STANDING_SIGN(63),\n  WOODEN_DOOR(64),\n  LADDER(65),\n  RAIL(66),\n  STONE_STAIRS(67),\n  WALL_SIGN(68),\n  LEVER(69),\n  STONE_PRESSURE_PLATE(70),\n  IRON_DOOR(71),\n  WOODEN_PRESSURE_PLATE(72),\n  REDSTONE_ORE(73),\n  LIT_REDSTONE_ORE(74),\n  UNLIT_REDSTONE_TORCH(75),\n  REDSTONE_TORCH(76),\n  STONE_BUTTON(77),\n  SNOW_LAYER(78),\n  ICE(79),\n  SNOW(80),\n  CACTUS(81),\n  CLAY(82),\n  REEDS(83),\n  JUKEBOX(84),\n  FENCE(85),\n  PUMPKIN(86),\n  NETHERRACK(87),\n  SOUL_SAND(88),\n  GLOWSTONE(89),\n  PORTAL(90),\n  LIT_PUMPKIN(91),\n  CAKE(92),\n  UNPOWERED_REPEATER(93),\n  POWERED_REPEATER(94),\n  STAINED_GLASS(95),\n  TRAPDOOR(96),\n  MONSTER_EGG(97),\n  STONEBRICK(98),\n  BROWN_MUSHROOM_BLOCK(99),\n  RED_MUSHROOM_BLOCK(100),\n  IRON_BARS(101),\n  GLASS_PANE(102),\n  MELON_BLOCK(103),\n  PUMPKIN_STEM(104),\n  MELON_STEM(105),\n  VINE(106),\n  FENCE_GATE(107),\n  BRICK_STAIRS(108),\n  STONE_BRICK_STAIRS(109),\n  MYCELIUM(110),\n  WATERLILY(111),\n  NETHER_BRICK(112),\n  NETHER_BRICK_FENCE(113),\n  NETHER_BRICK_STAIRS(114),\n  NETHER_WART(115),\n  ENCHANTING_TABLE(116),\n  BREWING_STAND(117),\n  CAULDRON(118),\n  END_PORTAL(119),\n  END_PORTAL_FRAME(120),\n  END_STONE(121),\n  DRAGON_EGG(122),\n  REDSTONE_LAMP(123),\n  LIT_REDSTONE_LAMP(124),\n  DOUBLE_WOODEN_SLAB(125),\n  WOODEN_SLAB(126),\n  COCOA(127),\n  SANDSTONE_STAIRS(128),\n  EMERALD_ORE(129),\n  ENDER_CHEST(130),\n  TRIPWIRE_HOOK(131),\n  TRIPWIRE(132),\n  EMERALD_BLOCK(133),\n  SPRUCE_STAIRS(134),\n  BIRCH_STAIRS(135),\n  JUNGLE_STAIRS(136),\n  COMMAND_BLOCK(137),\n  BEACON(138),\n  COBBLESTONE_WALL(139),\n  FLOWER_POT(140),\n  CARROTS(141),\n  POTATOES(142),\n  WOODEN_BUTTON(143),\n  SKULL(144),\n  ANVIL(145),\n  TRAPPED_CHEST(146),\n  LIGHT_WEIGHTED_PRESSURE_PLATE(147),\n  HEAVY_WEIGHTED_PRESSURE_PLATE(148),\n  UNPOWERED_COMPARATOR(149),\n  POWERED_COMPARATOR(150),\n  DAYLIGHT_DETECTOR(151),\n  REDSTONE_BLOCK(152),\n  QUARTZ_ORE(153),\n  HOPPER(154),\n  QUARTZ_BLOCK(155),\n  QUARTZ_STAIRS(156),\n  ACTIVATOR_RAIL(157),\n  DROPPER(158),\n  STAINED_HARDENED_CLAY(159),\n  STAINED_GLASS_PANE(160),\n  LEAVES2(161),\n  LOG2(162),\n  ACACIA_STAIRS(163),\n  DARK_OAK_STAIRS(164),\n  SLIME(165),\n  BARRIER(166),\n  IRON_TRAPDOOR(167),\n  PRISMARINE(168),\n  SEA_LANTERN(169),\n  HAY_BLOCK(170),\n  CARPET(171),\n  HARDENED_CLAY(172),\n  COAL_BLOCK(173),\n  PACKED_ICE(174),\n  DOUBLE_PLANT(175),\n  STANDING_BANNER(176),\n  WALL_BANNER(177),\n  DAYLIGHT_DETECTOR_INVERTED(178),\n  RED_SANDSTONE(179),\n  RED_SANDSTONE_STAIRS(180),\n  DOUBLE_STONE_SLAB2(181),\n  STONE_SLAB2(182),\n  SPRUCE_FENCE_GATE(183),\n  BIRCH_FENCE_GATE(184),\n  JUNGLE_FENCE_GATE(185),\n  DARK_OAK_FENCE_GATE(186),\n  ACACIA_FENCE_GATE(187),\n  SPRUCE_FENCE(188),\n  BIRCH_FENCE(189),\n  JUNGLE_FENCE(190),\n  DARK_OAK_FENCE(191),\n  ACACIA_FENCE(192),\n  SPRUCE_DOOR(193),\n  BIRCH_DOOR(194),\n  JUNGLE_DOOR(195),\n  ACACIA_DOOR(196),\n  DARK_OAK_DOOR(197),\n  END_ROD(198),\n  CHORUS_PLANT(199),\n  CHORUS_FLOWER(200),\n  PURPUR_BLOCK(201),\n  PURPUR_PILLAR(202),\n  PURPUR_STAIRS(203),\n  PURPUR_DOUBLE_SLAB(204),\n  PURPUR_SLAB(205),\n  END_BRICKS(206),\n  BEETROOTS(207),\n  GRASS_PATH(208),\n  END_GATEWAY(209),\n  REPEATING_COMMAND_BLOCK(210),\n  CHAIN_COMMAND_BLOCK(211),\n  FROSTED_ICE(212),\n  MAGMA(213),\n  NETHER_WART_BLOCK(214),\n  RED_NETHER_BRICK(215),\n  BONE_BLOCK(216),\n  STRUCTURE_VOID(217),\n  OBSERVER(218),\n  WHITE_SHULKER_BOX(219),\n  ORANGE_SHULKER_BOX(220),\n  MAGENTA_SHULKER_BOX(221),\n  LIGHT_BLUE_SHULKER_BOX(222),\n  YELLOW_SHULKER_BOX(223),\n  LIME_SHULKER_BOX(224),\n  PINK_SHULKER_BOX(225),\n  GRAY_SHULKER_BOX(226),\n  SILVER_SHULKER_BOX(227),\n  CYAN_SHULKER_BOX(228),\n  PURPLE_SHULKER_BOX(229),\n  BLUE_SHULKER_BOX(230),\n  BROWN_SHULKER_BOX(231),\n  GREEN_SHULKER_BOX(232),\n  RED_SHULKER_BOX(233),\n  BLACK_SHULKER_BOX(234),\n  WHITE_GLAZED_TERRACOTTA(235),\n  ORANGE_GLAZED_TERRACOTTA(236),\n  MAGENTA_GLAZED_TERRACOTTA(237),\n  LIGHT_BLUE_GLAZED_TERRACOTTA(238),\n  YELLOW_GLAZED_TERRACOTTA(239),\n  LIME_GLAZED_TERRACOTTA(240),\n  PINK_GLAZED_TERRACOTTA(241),\n  GRAY_GLAZED_TERRACOTTA(242),\n  SILVER_GLAZED_TERRACOTTA(243),\n  CYAN_GLAZED_TERRACOTTA(244),\n  PURPLE_GLAZED_TERRACOTTA(245),\n  BLUE_GLAZED_TERRACOTTA(246),\n  BROWN_GLAZED_TERRACOTTA(247),\n  GREEN_GLAZED_TERRACOTTA(248),\n  RED_GLAZED_TERRACOTTA(249),\n  BLACK_GLAZED_TERRACOTTA(250),\n  CONCRETE(251),\n  CONCRETE_POWDER(252),\n  STRUCTURE_BLOCK(255);\n\n  private final int id;\n\n  Block(int id) {\n    this.id = id;\n  }\n\n  public int getID() {\n    return this.id;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/material/Item.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.material;\n\npublic enum Item {\n\n  AIR(0),\n  STONE(1),\n  GRASS(2),\n  DIRT(3),\n  COBBLESTONE(4),\n  PLANKS(5),\n  SAPLING(6),\n  BEDROCK(7),\n  SAND(12),\n  GRAVEL(13),\n  GOLD_ORE(14),\n  IRON_ORE(15),\n  COAL_ORE(16),\n  LOG(17),\n  LEAVES(18),\n  SPONGE(19),\n  GLASS(20),\n  LAPIS_ORE(21),\n  LAPIS_BLOCK(22),\n  DISPENSER(23),\n  SANDSTONE(24),\n  NOTEBLOCK(25),\n  GOLDEN_RAIL(27),\n  DETECTOR_RAIL(28),\n  STICKY_PISTON(29),\n  WEB(30),\n  TALLGRASS(31),\n  DEADBUSH(32),\n  PISTON(33),\n  WOOL(35),\n  YELLOW_FLOWER(37),\n  RED_FLOWER(38),\n  BROWN_MUSHROOM(39),\n  RED_MUSHROOM(40),\n  GOLD_BLOCK(41),\n  IRON_BLOCK(42),\n  STONE_SLAB(44),\n  BRICK_BLOCK(45),\n  TNT(46),\n  BOOKSHELF(47),\n  MOSSY_COBBLESTONE(48),\n  OBSIDIAN(49),\n  TORCH(50),\n  MOB_SPAWNER(52),\n  OAK_STAIRS(53),\n  CHEST(54),\n  DIAMOND_ORE(56),\n  DIAMOND_BLOCK(57),\n  CRAFTING_TABLE(58),\n  FARMLAND(60),\n  FURNACE(61),\n  LADDER(65),\n  RAIL(66),\n  STONE_STAIRS(67),\n  LEVER(69),\n  STONE_PRESSURE_PLATE(70),\n  WOODEN_PRESSURE_PLATE(72),\n  REDSTONE_ORE(73),\n  REDSTONE_TORCH(76),\n  STONE_BUTTON(77),\n  SNOW_LAYER(78),\n  ICE(79),\n  SNOW(80),\n  CACTUS(81),\n  CLAY(82),\n  JUKEBOX(84),\n  FENCE(85),\n  PUMPKIN(86),\n  NETHERRACK(87),\n  SOUL_SAND(88),\n  GLOWSTONE(89),\n  LIT_PUMPKIN(91),\n  STAINED_GLASS(95),\n  TRAPDOOR(96),\n  STONEBRICK(98),\n  BROWN_MUSHROOM_BLOCK(99),\n  RED_MUSHROOM_BLOCK(100),\n  IRON_BARS(101),\n  GLASS_PANE(102),\n  MELON_BLOCK(103),\n  VINE(106),\n  FENCE_GATE(107),\n  BRICK_STAIRS(108),\n  STONE_BRICK_STAIRS(109),\n  MYCELIUM(110),\n  WATERLILY(111),\n  NETHER_BRICK(112),\n  NETHER_BRICK_FENCE(113),\n  NETHER_BRICK_STAIRS(114),\n  ENCHANTING_TABLE(116),\n  END_PORTAL_FRAME(120),\n  END_STONE(121),\n  DRAGON_EGG(122),\n  REDSTONE_LAMP(123),\n  WOODEN_SLAB(126),\n  SANDSTONE_STAIRS(128),\n  EMERALD_ORE(129),\n  ENDER_CHEST(130),\n  TRIPWIRE_HOOK(131),\n  EMERALD_BLOCK(133),\n  SPRUCE_STAIRS(134),\n  BIRCH_STAIRS(135),\n  JUNGLE_STAIRS(136),\n  COMMAND_BLOCK(137),\n  BEACON(138),\n  COBBLESTONE_WALL(139),\n  WOODEN_BUTTON(143),\n  ANVIL(145),\n  TRAPPED_CHEST(146),\n  LIGHT_WEIGHTED_PRESSURE_PLATE(147),\n  HEAVY_WEIGHTED_PRESSURE_PLATE(148),\n  DAYLIGHT_DETECTOR(151),\n  REDSTONE_BLOCK(152),\n  QUARTZ_ORE(153),\n  HOPPER(154),\n  QUARTZ_BLOCK(155),\n  QUARTZ_STAIRS(156),\n  ACTIVATOR_RAIL(157),\n  DROPPER(158),\n  STAINED_HARDENED_CLAY(159),\n  STAINED_GLASS_PANE(160),\n  LEAVES2(161),\n  LOG2(162),\n  ACACIA_STAIRS(163),\n  DARK_OAK_STAIRS(164),\n  SLIME(165),\n  BARRIER(166),\n  IRON_TRAPDOOR(167),\n  PRISMARINE(168),\n  SEA_LANTERN(169),\n  HAY_BLOCK(170),\n  CARPET(171),\n  HARDENED_CLAY(172),\n  COAL_BLOCK(173),\n  PACKED_ICE(174),\n  DOUBLE_PLANT(175),\n  RED_SANDSTONE(179),\n  RED_SANDSTONE_STAIRS(180),\n  STONE_SLAB2(182),\n  SPRUCE_FENCE_GATE(183),\n  BIRCH_FENCE_GATE(184),\n  JUNGLE_FENCE_GATE(185),\n  DARK_OAK_FENCE_GATE(186),\n  ACACIA_FENCE_GATE(187),\n  SPRUCE_FENCE(188),\n  BIRCH_FENCE(189),\n  JUNGLE_FENCE(190),\n  DARK_OAK_FENCE(191),\n  ACACIA_FENCE(192),\n  IRON_SHOVEL(256),\n  IRON_PICKAXE(257),\n  IRON_AXE(258),\n  FLINT_AND_STEEL(259),\n  APPLE(260),\n  BOW(261),\n  ARROW(262),\n  COAL(263),\n  DIAMOND(264),\n  IRON_INGOT(265),\n  GOLD_INGOT(266),\n  IRON_SWORD(267),\n  WOODEN_SWORD(268),\n  WOODEN_SHOVEL(269),\n  WOODEN_PICKAXE(270),\n  WOODEN_AXE(271),\n  STONE_SWORD(272),\n  STONE_SHOVEL(273),\n  STONE_PICKAXE(274),\n  STONE_AXE(275),\n  DIAMOND_SWORD(276),\n  DIAMOND_SHOVEL(277),\n  DIAMOND_PICKAXE(278),\n  DIAMOND_AXE(279),\n  STICK(280),\n  BOWL(281),\n  MUSHROOM_STEW(282),\n  GOLDEN_SWORD(283),\n  GOLDEN_SHOVEL(284),\n  GOLDEN_PICKAXE(285),\n  GOLDEN_AXE(286),\n  STRING(287),\n  FEATHER(288),\n  GUNPOWDER(289),\n  WOODEN_HOE(290),\n  STONE_HOE(291),\n  IRON_HOE(292),\n  DIAMOND_HOE(293),\n  GOLDEN_HOE(294),\n  WHEAT_SEEDS(295),\n  WHEAT(296),\n  BREAD(297),\n  LEATHER_HELMET(298),\n  LEATHER_CHESTPLATE(299),\n  LEATHER_LEGGINGS(300),\n  LEATHER_BOOTS(301),\n  CHAINMAIL_HELMET(302),\n  CHAINMAIL_CHESTPLATE(303),\n  CHAINMAIL_LEGGINGS(304),\n  CHAINMAIL_BOOTS(305),\n  IRON_HELMET(306),\n  IRON_CHESTPLATE(307),\n  IRON_LEGGINGS(308),\n  IRON_BOOTS(309),\n  DIAMOND_HELMET(310),\n  DIAMOND_CHESTPLATE(311),\n  DIAMOND_LEGGINGS(312),\n  DIAMOND_BOOTS(313),\n  GOLDEN_HELMET(314),\n  GOLDEN_CHESTPLATE(315),\n  GOLDEN_LEGGINGS(316),\n  GOLDEN_BOOTS(317),\n  FLINT(318),\n  PORKCHOP(319),\n  COOKED_PORKCHOP(320),\n  PAINTING(321),\n  GOLDEN_APPLE(322),\n  SIGN(323),\n  WOODEN_DOOR(324),\n  BUCKET(325),\n  WATER_BUCKET(326),\n  LAVA_BUCKET(327),\n  MINECART(328),\n  SADDLE(329),\n  IRON_DOOR(330),\n  REDSTONE(331),\n  SNOWBALL(332),\n  BOAT(333),\n  LEATHER(334),\n  MILK_BUCKET(335),\n  BRICK(336),\n  CLAY_BALL(337),\n  REEDS(338),\n  PAPER(339),\n  BOOK(340),\n  SLIME_BALL(341),\n  CHEST_MINECART(342),\n  FURNACE_MINECART(343),\n  EGG(344),\n  COMPASS(345),\n  FISHING_ROD(346),\n  CLOCK(347),\n  GLOWSTONE_DUST(348),\n  FISH(349),\n  COOKED_FISH(350),\n  DYE(351),\n  BONE(352),\n  SUGAR(353),\n  CAKE(354),\n  BED(355),\n  REPEATER(356),\n  COOKIE(357),\n  FILLED_MAP(358),\n  SHEARS(359),\n  MELON(360),\n  PUMPKIN_SEEDS(361),\n  MELON_SEEDS(362),\n  BEEF(363),\n  COOKED_BEEF(364),\n  CHICKEN(365),\n  COOKED_CHICKEN(366),\n  ROTTEN_FLESH(367),\n  ENDER_PEARL(368),\n  BLAZE_ROD(369),\n  GHAST_TEAR(370),\n  GOLD_NUGGET(371),\n  NETHER_WART(372),\n  POTION(373),\n  GLASS_BOTTLE(374),\n  SPIDER_EYE(375),\n  FERMENTED_SPIDER_EYE(376),\n  BLAZE_POWDER(377),\n  MAGMA_CREAM(378),\n  BREWING_STAND(379),\n  CAULDRON(380),\n  ENDER_EYE(381),\n  SPECKLED_MELON(382),\n  SPAWN_EGG(383),\n  EXPERIENCE_BOTTLE(384),\n  FIRE_CHARGE(385),\n  WRITABLE_BOOK(386),\n  WRITTEN_BOOK(387),\n  EMERALD(388),\n  ITEM_FRAME(389),\n  FLOWER_POT(390),\n  CARROT(391),\n  POTATO(392),\n  BAKED_POTATO(393),\n  POISONOUS_POTATO(394),\n  MAP(395),\n  GOLDEN_CARROT(396),\n  SKULL(397),\n  CARROT_ON_A_STICK(398),\n  NETHER_STAR(399),\n  PUMPKIN_PIE(400),\n  FIREWORKS(401),\n  FIREWORK_CHARGE(402),\n  ENCHANTED_BOOK(403),\n  COMPARATOR(404),\n  NETHERBRICK(405),\n  QUARTZ(406),\n  TNT_MINECART(407),\n  HOPPER_MINECART(408),\n  PRISMARINE_SHARD(409),\n  PRISMARINE_CRYSTALS(410),\n  RABBIT(411),\n  COOKED_RABBIT(412),\n  RABBIT_STEW(413),\n  RABBIT_FOOT(414),\n  RABBIT_HIDE(415),\n  ARMOR_STAND(416),\n  IRON_HORSE_ARMOR(417),\n  GOLDEN_HORSE_ARMOR(418),\n  DIAMOND_HORSE_ARMOR(419),\n  LEAD(420),\n  NAME_TAG(421),\n  COMMAND_BLOCK_MINECART(422),\n  MUTTON(423),\n  COOKED_MUTTON(424),\n  BANNER(425),\n  SPRUCE_DOOR(427),\n  BIRCH_DOOR(428),\n  JUNGLE_DOOR(429),\n  ACACIA_DOOR(430),\n  DARK_OAK_DOOR(431),\n  RECORD_13(2256),\n  RECORD_CAT(2257),\n  RECORD_BLOCKS(2258),\n  RECORD_CHIRP(2259),\n  RECORD_FAR(2260),\n  RECORD_MALL(2261),\n  RECORD_MELLOHI(2262),\n  RECORD_STAL(2263),\n  RECORD_STRAD(2264),\n  RECORD_WARD(2265),\n  RECORD_11(2266),\n  RECORD_WAIT(2267);\n\n  private final int id;\n\n  Item(int id) {\n    this.id = id;\n  }\n\n  @Deprecated\n  public int getID() {\n    return this.id;\n  }\n\n  public int getLegacyID() {\n    return this.id;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/material/VirtualItem.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.material;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\n\npublic interface VirtualItem {\n\n  short getID(ProtocolVersion version);\n\n  short getID(WorldVersion version);\n\n  boolean isSupportedOn(ProtocolVersion version);\n\n  boolean isSupportedOn(WorldVersion version);\n\n  String getModernID();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/material/WorldVersion.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.material;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.Arrays;\nimport java.util.EnumMap;\nimport java.util.EnumSet;\nimport java.util.Map;\nimport java.util.Set;\nimport net.elytrium.limboapi.api.utils.EnumUniverse;\n\npublic enum WorldVersion {\n  LEGACY(EnumSet.range(ProtocolVersion.MINECRAFT_1_7_2, ProtocolVersion.MINECRAFT_1_12_2)),\n  MINECRAFT_1_13(ProtocolVersion.MINECRAFT_1_13),\n  MINECRAFT_1_13_2(ProtocolVersion.MINECRAFT_1_13_1, ProtocolVersion.MINECRAFT_1_13_2),\n  MINECRAFT_1_14(EnumSet.range(ProtocolVersion.MINECRAFT_1_14, ProtocolVersion.MINECRAFT_1_14_4)),\n  MINECRAFT_1_15(EnumSet.range(ProtocolVersion.MINECRAFT_1_15, ProtocolVersion.MINECRAFT_1_15_2)),\n  MINECRAFT_1_16(ProtocolVersion.MINECRAFT_1_16, ProtocolVersion.MINECRAFT_1_16_1),\n  MINECRAFT_1_16_2(EnumSet.range(ProtocolVersion.MINECRAFT_1_16_2, ProtocolVersion.MINECRAFT_1_16_4)),\n  MINECRAFT_1_17(EnumSet.range(ProtocolVersion.MINECRAFT_1_17, ProtocolVersion.MINECRAFT_1_18_2)),\n  MINECRAFT_1_19(EnumSet.range(ProtocolVersion.MINECRAFT_1_19, ProtocolVersion.MINECRAFT_1_19_1)),\n  MINECRAFT_1_19_3(ProtocolVersion.MINECRAFT_1_19_3),\n  MINECRAFT_1_19_4(EnumSet.range(ProtocolVersion.MINECRAFT_1_19_4, ProtocolVersion.MINECRAFT_1_20)),\n  MINECRAFT_1_20(EnumSet.range(ProtocolVersion.MINECRAFT_1_20, ProtocolVersion.MINECRAFT_1_20_2)),\n  MINECRAFT_1_20_3(ProtocolVersion.MINECRAFT_1_20_3),\n  MINECRAFT_1_20_5(EnumSet.range(ProtocolVersion.MINECRAFT_1_20_5, ProtocolVersion.MINECRAFT_1_21)),\n  MINECRAFT_1_21_2(ProtocolVersion.MINECRAFT_1_21_2),\n  MINECRAFT_1_21_4(ProtocolVersion.MINECRAFT_1_21_4),\n  MINECRAFT_1_21_5(ProtocolVersion.MINECRAFT_1_21_5),\n  MINECRAFT_1_21_6(ProtocolVersion.MINECRAFT_1_21_6),\n  MINECRAFT_1_21_7(ProtocolVersion.MINECRAFT_1_21_7),\n  MINECRAFT_1_21_9(ProtocolVersion.MINECRAFT_1_21_9),\n  MINECRAFT_1_21_11(ProtocolVersion.MINECRAFT_1_21_11),\n  MINECRAFT_26_1(EnumSet.range(ProtocolVersion.MINECRAFT_26_1, ProtocolVersion.MAXIMUM_VERSION));\n\n  private static final EnumMap<ProtocolVersion, WorldVersion> MC_VERSION_TO_ITEM_VERSIONS = new EnumMap<>(ProtocolVersion.class);\n  private static final Map<String, WorldVersion> KEY_LOOKUP = Map.copyOf(EnumUniverse.createProtocolLookup(values()));\n\n  private final Set<ProtocolVersion> versions;\n\n  WorldVersion(ProtocolVersion... versions) {\n    this.versions = EnumSet.copyOf(Arrays.asList(versions));\n  }\n\n  WorldVersion(Set<ProtocolVersion> versions) {\n    this.versions = versions;\n  }\n\n  public ProtocolVersion getMinSupportedVersion() {\n    return this.versions.iterator().next();\n  }\n\n  public Set<ProtocolVersion> getVersions() {\n    return this.versions;\n  }\n\n  static {\n    for (WorldVersion version : WorldVersion.values()) {\n      for (ProtocolVersion protocolVersion : version.getVersions()) {\n        MC_VERSION_TO_ITEM_VERSIONS.put(protocolVersion, version);\n      }\n    }\n  }\n\n  public static WorldVersion parse(String from) {\n    return KEY_LOOKUP.getOrDefault(from, LEGACY);\n  }\n\n  public static WorldVersion from(ProtocolVersion protocolVersion) {\n    return MC_VERSION_TO_ITEM_VERSIONS.get(protocolVersion);\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/mcprotocollib/NibbleArray3D.java",
    "content": "/*\n * This file is part of MCProtocolLib, licensed under the MIT License (MIT).\n *\n * Copyright (C) 2013-2021 Steveice10\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE\n * OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\npackage net.elytrium.limboapi.api.mcprotocollib;\n\nimport java.util.Arrays;\nimport net.elytrium.limboapi.api.chunk.data.BlockStorage;\n\npublic class NibbleArray3D {\n\n  private final byte[] data;\n\n  public NibbleArray3D(int size) {\n    this.data = new byte[size >> 1];\n  }\n\n  public NibbleArray3D(int size, int defaultValue) {\n    this.data = new byte[size >> 1];\n    this.fill(defaultValue);\n  }\n\n  public NibbleArray3D(byte[] array) {\n    this.data = array;\n  }\n\n  public byte[] getData() {\n    return this.data;\n  }\n\n  public int get(int posX, int posY, int posZ) {\n    int key = BlockStorage.index(posX, posY, posZ);\n    int index = key >> 1;\n    return (key & 1) == 0 ? this.data[index] & 15 : this.data[index] >> 4 & 15;\n  }\n\n  public void set(int posX, int posY, int posZ, int value) {\n    this.set(BlockStorage.index(posX, posY, posZ), value);\n  }\n\n  public void set(int key, int val) {\n    int index = key >> 1;\n    if ((key & 1) == 0) {\n      this.data[index] = (byte) (this.data[index] & 240 | val & 15);\n    } else {\n      this.data[index] = (byte) (this.data[index] & 15 | (val & 15) << 4);\n    }\n  }\n\n  public void fill(int value) {\n    for (int index = 0; index < this.data.length << 1; ++index) {\n      this.set(index, value);\n    }\n  }\n\n  public NibbleArray3D copy() {\n    return new NibbleArray3D(Arrays.copyOf(this.data, this.data.length));\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/player/GameMode.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.player;\n\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic enum GameMode {\n\n  SURVIVAL,\n  CREATIVE,\n  ADVENTURE,\n  SPECTATOR;\n\n  /**\n   * Cached {@link #values()} array to avoid constant array allocation.\n   */\n  private static final GameMode[] VALUES = values();\n\n  /**\n   * Get the ID of this {@link GameMode}.\n   *\n   * @return The ID.\n   *\n   * @see #getByID(int)\n   */\n  public short getID() {\n    return (short) this.ordinal();\n  }\n\n  /**\n   * Get a {@link GameMode} by its' ID.\n   *\n   * @param id The ID.\n   *\n   * @return The {@link GameMode}, or {@code null} if it does not exist.\n   *\n   * @see #getID()\n   */\n  @Nullable\n  public static GameMode getByID(int id) {\n    return VALUES[id];\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/player/LimboPlayer.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.player;\n\nimport com.velocitypowered.api.proxy.Player;\nimport com.velocitypowered.api.proxy.server.RegisteredServer;\nimport java.awt.image.BufferedImage;\nimport java.util.concurrent.ScheduledExecutorService;\nimport net.elytrium.limboapi.api.Limbo;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\n\npublic interface LimboPlayer {\n\n  void writePacket(Object packetObj);\n\n  void writePacketAndFlush(Object packetObj);\n\n  void flushPackets();\n\n  void closeWith(Object packetObj);\n\n  ScheduledExecutorService getScheduledExecutor();\n\n  void sendImage(BufferedImage image);\n\n  void sendImage(BufferedImage image, boolean sendItem);\n\n  void sendImage(int mapID, BufferedImage image);\n\n  void sendImage(int mapID, BufferedImage image, boolean sendItem);\n\n  void sendImage(int mapID, BufferedImage image, boolean sendItem, boolean resize);\n\n  void setInventory(VirtualItem item, int count);\n\n  void setInventory(VirtualItem item, int slot, int count);\n\n  void setInventory(int slot, VirtualItem item, int count, int data, CompoundBinaryTag nbt);\n\n  void setInventory(int slot, VirtualItem item, int count, int data, ItemComponentMap map);\n\n  void setGameMode(GameMode gameMode);\n\n  void teleport(double posX, double posY, double posZ, float yaw, float pitch);\n\n  void disableFalling();\n\n  void enableFalling();\n\n  void disconnect();\n\n  void disconnect(RegisteredServer server);\n\n  void sendAbilities();\n\n  void sendAbilities(int abilities, float flySpeed, float walkSpeed);\n\n  void sendAbilities(byte abilities, float flySpeed, float walkSpeed);\n\n  byte getAbilities();\n\n  GameMode getGameMode();\n\n  Limbo getServer();\n\n  Player getProxyPlayer();\n\n  int getPing();\n\n  void setWorldTime(long ticks);\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/PacketDirection.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol;\n\npublic enum PacketDirection {\n\n  CLIENTBOUND,\n  SERVERBOUND\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/PreparedPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.List;\nimport java.util.function.Function;\n\npublic interface PreparedPacket {\n\n  <T> PreparedPacket prepare(T packet);\n\n  <T> PreparedPacket prepare(T[] packets);\n\n  <T> PreparedPacket prepare(List<T> packets);\n\n  <T> PreparedPacket prepare(T packet, ProtocolVersion from);\n\n  <T> PreparedPacket prepare(T packet, ProtocolVersion from, ProtocolVersion to);\n\n  <T> PreparedPacket prepare(T[] packets, ProtocolVersion from);\n\n  <T> PreparedPacket prepare(T[] packets, ProtocolVersion from, ProtocolVersion to);\n\n  <T> PreparedPacket prepare(List<T> packets, ProtocolVersion from);\n\n  <T> PreparedPacket prepare(List<T> packets, ProtocolVersion from, ProtocolVersion to);\n\n  <T> PreparedPacket prepare(Function<ProtocolVersion, T> packet);\n\n  <T> PreparedPacket prepare(Function<ProtocolVersion, T> packet, ProtocolVersion from);\n\n  <T> PreparedPacket prepare(Function<ProtocolVersion, T> packet, ProtocolVersion from, ProtocolVersion to);\n\n  PreparedPacket build();\n\n  void release();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/item/ItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.item;\n\npublic interface ItemComponent<T> {\n\n  String getName();\n\n  ItemComponent<T> setValue(T value);\n\n  T getValue();\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/item/ItemComponentMap.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.item;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.List;\n\npublic interface ItemComponentMap {\n\n  <T> ItemComponentMap add(ProtocolVersion version, String name, T value);\n\n  ItemComponentMap remove(ProtocolVersion version, String name);\n\n  List<ItemComponent> getAdded();\n\n  List<ItemComponent> getRemoved();\n\n  void read(ProtocolVersion version, Object buffer);\n\n  void write(ProtocolVersion version, Object buffer);\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/map/MapPalette.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.map;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.awt.image.BufferedImage;\n\n@Deprecated(forRemoval = true)\npublic class MapPalette {\n\n  public static int[] imageToBytes(BufferedImage image) {\n    return net.elytrium.limboapi.api.protocol.packets.data.MapPalette.imageToBytes(image);\n  }\n\n  public static int[] imageToBytes(BufferedImage image, ProtocolVersion version) {\n    return net.elytrium.limboapi.api.protocol.packets.data.MapPalette.imageToBytes(image, version);\n  }\n\n  public static byte tryFastMatchColor(int rgb, ProtocolVersion version) {\n    return net.elytrium.limboapi.api.protocol.packets.data.MapPalette.tryFastMatchColor(rgb, version);\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/packets/PacketFactory.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.packets;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.List;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.chunk.Dimension;\nimport net.elytrium.limboapi.api.chunk.data.ChunkSnapshot;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.material.WorldVersion;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.elytrium.limboapi.api.protocol.packets.data.AbilityFlags;\nimport net.elytrium.limboapi.api.protocol.packets.data.MapData;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic interface PacketFactory {\n\n  Object createChangeGameStatePacket(int reason, float value);\n\n  Object createChunkDataPacket(ChunkSnapshot chunkSnapshot, boolean legacySkyLight, int maxSections);\n\n  Object createChunkDataPacket(ChunkSnapshot chunkSnapshot, Dimension dimension);\n\n  Object createChunkUnloadPacket(int posX, int posZ);\n\n  Object createDefaultSpawnPositionPacket(int posX, int posY, int posZ, float angle);\n\n  Object createDefaultSpawnPositionPacket(String dimension, int posX, int posY, int posZ, float yaw, float pitch);\n\n  Object createMapDataPacket(int mapID, byte scale, MapData mapData);\n\n  /**\n   * @param flags See {@link AbilityFlags}. (e.g. {@code AbilityFlags.ALLOW_FLYING | AbilityFlags.CREATIVE_MODE})\n   */\n  Object createPlayerAbilitiesPacket(int flags, float flySpeed, float walkSpeed);\n\n  /**\n   * @param flags See {@link AbilityFlags}. (e.g. {@code AbilityFlags.ALLOW_FLYING | AbilityFlags.CREATIVE_MODE})\n   */\n  Object createPlayerAbilitiesPacket(byte flags, float flySpeed, float walkSpeed);\n\n  Object createPositionRotationPacket(double posX, double posY, double posZ, float yaw, float pitch,\n      boolean onGround, int teleportID, boolean dismountVehicle);\n\n  Object createSetExperiencePacket(float expBar, int level, int totalExp);\n\n  Object createSetSlotPacket(int windowID, int slot, VirtualItem item, int count, int data, @Nullable CompoundBinaryTag nbt);\n\n  Object createSetSlotPacket(int windowID, int slot, VirtualItem item, int count, int data, @Nullable ItemComponentMap map);\n\n  Object createTimeUpdatePacket(long worldAge, long timeOfDay);\n\n  Object createUpdateViewPositionPacket(int posX, int posZ);\n\n  Object createUpdateTagsPacket(WorldVersion version);\n\n  Object createUpdateTagsPacket(ProtocolVersion version);\n\n  Object createUpdateTagsPacket(Map<String, Map<String, List<Integer>>> tags);\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/packets/PacketMapping.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.packets;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic class PacketMapping {\n\n  private final int id;\n  private final ProtocolVersion protocolVersion;\n  @Nullable\n  private final ProtocolVersion lastValidProtocolVersion;\n  private final boolean encodeOnly;\n\n  public PacketMapping(int id, ProtocolVersion protocolVersion, boolean encodeOnly) {\n    this(id, protocolVersion, null, encodeOnly);\n  }\n\n  public PacketMapping(int id, ProtocolVersion protocolVersion, @Nullable ProtocolVersion lastValidProtocolVersion, boolean encodeOnly) {\n    this.id = id;\n    this.protocolVersion = protocolVersion;\n    this.lastValidProtocolVersion = lastValidProtocolVersion;\n    this.encodeOnly = encodeOnly;\n  }\n\n  public int getID() {\n    return this.id;\n  }\n\n  public ProtocolVersion getProtocolVersion() {\n    return this.protocolVersion;\n  }\n\n  @Nullable\n  public ProtocolVersion getLastValidProtocolVersion() {\n    return this.lastValidProtocolVersion;\n  }\n\n  public boolean isEncodeOnly() {\n    return this.encodeOnly;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/packets/data/AbilityFlags.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.packets.data;\n\n/**\n * For PlayerAbilities packet.\n */\npublic class AbilityFlags {\n\n  public static final int INVULNERABLE = 1;\n  public static final int FLYING = 2;\n  public static final int ALLOW_FLYING = 4;\n  public static final int CREATIVE_MODE = 8;\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/packets/data/BiomeData.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.packets.data;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.data.ChunkSnapshot;\n\n/**\n * For ChunkData packet.\n */\npublic class BiomeData {\n\n  private final int[] post115Biomes = new int[1024];\n  private final byte[] pre115Biomes = new byte[256];\n\n  public BiomeData(ChunkSnapshot chunk) {\n    VirtualBiome[] biomes = chunk.getBiomes();\n    for (int i = 0; i < biomes.length; ++i) {\n      this.post115Biomes[i] = biomes[i].getID();\n    }\n\n    // Down sample 4x4x4 3D biomes to 2D XZ.\n    Map<Integer, Integer> samples = new HashMap<>(64);\n    for (int posX = 0; posX < 16; posX += 4) {\n      for (int posZ = 0; posZ < 16; posZ += 4) {\n        samples.clear();\n        for (int posY = 0; posY < 256; posY += 16) {\n          VirtualBiome biome = biomes[/*SimpleChunk.getBiomeIndex(posX, posY, posZ)*/(posY >> 2 & 63) << 4 | (posZ >> 2 & 3) << 2 | posX >> 2 & 3];\n          samples.put(biome.getID(), samples.getOrDefault(biome.getID(), 0) + 1);\n        }\n        int id = samples.entrySet()\n            .stream()\n            .max(Map.Entry.comparingByValue())\n            .orElseThrow()\n            .getKey();\n        for (int i = posX; i < posX + 4; ++i) {\n          for (int j = posZ; j < posZ + 4; ++j) {\n            this.pre115Biomes[(j << 4) + i] = (byte) id;\n          }\n        }\n      }\n    }\n  }\n\n  public int[] getPost115Biomes() {\n    return this.post115Biomes;\n  }\n\n  public byte[] getPre115Biomes() {\n    return this.pre115Biomes;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/packets/data/MapData.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.packets.data;\n\n/**\n * For MapData packet.\n */\npublic class MapData {\n\n  public static final int MAP_DIM_SIZE = 128;\n  public static final int MAP_SIZE = MAP_DIM_SIZE * MAP_DIM_SIZE; // 128² == 16384\n\n  private final int columns;\n  private final int rows;\n  private final int posX;\n  private final int posY;\n  private final byte[] data;\n\n  public MapData(byte[] data) {\n    this(0, data);\n  }\n\n  public MapData(int posX, byte[] data) {\n    this(MAP_DIM_SIZE, MAP_DIM_SIZE, posX, 0, data);\n  }\n\n  public MapData(int columns, int rows, int posX, int posY, byte[] data) {\n    this.columns = columns;\n    this.rows = rows;\n    this.posX = posX;\n    this.posY = posY;\n    this.data = data;\n  }\n\n  public int getColumns() {\n    return this.columns;\n  }\n\n  public int getRows() {\n    return this.rows;\n  }\n\n  public int getX() {\n    return this.posX;\n  }\n\n  public int getY() {\n    return this.posY;\n  }\n\n  public byte[] getData() {\n    return this.data;\n  }\n\n  @Override\n  public String toString() {\n    return \"MapData{\"\n        + \"columns=\" + this.columns\n        + \", rows=\" + this.rows\n        + \", posX=\" + this.posX\n        + \", posY=\" + this.posY\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/protocol/packets/data/MapPalette.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.protocol.packets.data;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.awt.image.BufferedImage;\nimport java.io.IOError;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.EnumMap;\nimport java.util.EnumSet;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Objects;\n\npublic class MapPalette {\n\n  private static final Map<MapVersion, byte[]> REMAP_BUFFERS = new EnumMap<>(MapVersion.class);\n  private static final byte[] MAIN_BUFFER = readBuffer(\"/mapping/colors_main_map\");\n\n  /**\n   * @deprecated Use {@link java.awt.Color#WHITE} instead.\n   */\n  @Deprecated\n  public static final byte WHITE = 34;\n  public static final byte TRANSPARENT = 0;\n\n  static {\n    for (MapVersion version : MapVersion.values()) {\n      REMAP_BUFFERS.put(version, readBuffer(\"/mapping/colors_\" + version.toString().toLowerCase(Locale.ROOT) + \"_map\"));\n    }\n  }\n\n  private static byte[] readBuffer(String filename) {\n    try (InputStream stream = MapPalette.class.getResourceAsStream(filename)) {\n      return Objects.requireNonNull(stream).readAllBytes();\n    } catch (IOException e) {\n      throw new IOError(e);\n    }\n  }\n\n  /**\n   * Convert an Image to a byte[] using the palette.\n   * Uses reduced set of colors, to support more colors use {@link MapPalette#imageToBytes(BufferedImage, ProtocolVersion)}\n   *\n   * @param image The image to convert.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static int[] imageToBytes(BufferedImage image) {\n    return imageToBytes(image, ProtocolVersion.MINIMUM_VERSION);\n  }\n\n  /**\n   * Convert an Image to a byte[] using the palette.\n   *\n   * @param image   The image to convert.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static int[] imageToBytes(BufferedImage image, ProtocolVersion version) {\n    int[] result = image.getRGB(0, 0, image.getWidth(), image.getHeight(), null, 0, image.getWidth());\n    return imageToBytes(result, result, version);\n  }\n\n  /**\n   * Convert an image to a byte[] using the palette.\n   *\n   * @param image   The image to convert.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static int[] imageToBytes(int[] image, ProtocolVersion version) {\n    return imageToBytes(image, new int[image.length], version);\n  }\n\n  /**\n   * Convert an image to a byte[] using the palette.\n   *\n   * @param from    The image to convert.\n   * @param to      Output image.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static int[] imageToBytes(int[] from, int[] to, ProtocolVersion version) {\n    for (int i = 0; i < from.length; ++i) {\n      to[i] = tryFastMatchColor(from[i], version);\n    }\n\n    return to;\n  }\n\n  /**\n   * Convert an image to a byte[] using the palette.\n   *\n   * @param from    The image to convert.\n   * @param to      Output image.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static byte[] imageToBytes(int[] from, byte[] to, ProtocolVersion version) {\n    for (int i = 0; i < from.length; ++i) {\n      to[i] = tryFastMatchColor(from[i], version);\n    }\n\n    return to;\n  }\n\n  /**\n   * Get the index of the closest matching color in the palette to the given\n   * color. Uses caching and downscaling of color values.\n   *\n   * @param rgb The Color to match.\n   *\n   * @return The index in the palette.\n   */\n  public static byte tryFastMatchColor(int rgb, ProtocolVersion version) {\n    if (getAlpha(rgb) < 128) {\n      return TRANSPARENT;\n    } else {\n      MapVersion mapVersion = MapVersion.fromProtocolVersion(version);\n      byte originalColorID = MAIN_BUFFER[rgb & 0xFFFFFF];\n      if (mapVersion == MapVersion.MAXIMUM_VERSION) {\n        return originalColorID;\n      } else {\n        return remapByte(REMAP_BUFFERS.get(mapVersion), originalColorID);\n      }\n    }\n  }\n\n  private static int getAlpha(int rgb) {\n    return (rgb & 0xFF000000) >>> 24;\n  }\n\n  /**\n   * Convert an image from MapVersion.MAXIMUM_VERSION to the desired version\n   *\n   * @param image   The image to convert.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static int[] convertImage(int[] image, MapVersion version) {\n    return convertImage(image, new int[image.length], version);\n  }\n\n  /**\n   * Convert an image from MapVersion.MAXIMUM_VERSION to the desired version\n   *\n   * @param from    The image to convert.\n   * @param to      Output image.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static int[] convertImage(int[] from, int[] to, MapVersion version) {\n    byte[] remapBuffer = REMAP_BUFFERS.get(version);\n    for (int i = 0; i < from.length; ++i) {\n      to[i] = remapByte(remapBuffer, (byte) from[i]);\n    }\n\n    return to;\n  }\n\n  /**\n   * Convert an image from MapVersion.MAXIMUM_VERSION to the desired version\n   *\n   * @param from    The image to convert.\n   * @param to      Output image.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static byte[] convertImage(byte[] from, byte[] to, MapVersion version) {\n    byte[] remapBuffer = REMAP_BUFFERS.get(version);\n    for (int i = 0; i < from.length; ++i) {\n      to[i] = remapByte(remapBuffer, from[i]);\n    }\n\n    return to;\n  }\n\n  /**\n   * Convert an image from MapVersion.MAXIMUM_VERSION to the desired version\n   *\n   * @param from    The image to convert.\n   * @param to      Output image.\n   * @param version The ProtocolVersion to support more colors.\n   *\n   * @return A byte[] containing the pixels of the image.\n   */\n  public static byte[] convertImage(int[] from, byte[] to, MapVersion version) {\n    byte[] remapBuffer = REMAP_BUFFERS.get(version);\n    for (int i = 0; i < from.length; ++i) {\n      to[i] = remapByte(remapBuffer, (byte) from[i]);\n    }\n\n    return to;\n  }\n\n  private static byte remapByte(byte[] remapBuffer, byte oldByte) {\n    return remapBuffer[Byte.toUnsignedInt(oldByte)];\n  }\n\n  public enum MapVersion {\n\n    MINIMUM_VERSION(EnumSet.range(ProtocolVersion.MINECRAFT_1_7_2, ProtocolVersion.MINECRAFT_1_7_6)),\n    MINECRAFT_1_8(EnumSet.range(ProtocolVersion.MINECRAFT_1_8, ProtocolVersion.MINECRAFT_1_11_1)),\n    MINECRAFT_1_12(EnumSet.range(ProtocolVersion.MINECRAFT_1_12, ProtocolVersion.MINECRAFT_1_15_2)),\n    MINECRAFT_1_16(EnumSet.range(ProtocolVersion.MINECRAFT_1_16, ProtocolVersion.MINECRAFT_1_16_4)),\n    MINECRAFT_1_17(EnumSet.range(ProtocolVersion.MINECRAFT_1_17, ProtocolVersion.MAXIMUM_VERSION));\n\n    private static final EnumMap<ProtocolVersion, MapVersion> VERSIONS_MAP = new EnumMap<>(ProtocolVersion.class);\n\n    public static final MapVersion MAXIMUM_VERSION = MINECRAFT_1_17;\n\n    private final EnumSet<ProtocolVersion> versions;\n\n    MapVersion(EnumSet<ProtocolVersion> versions) {\n      this.versions = versions;\n    }\n\n    public EnumSet<ProtocolVersion> getVersions() {\n      return this.versions;\n    }\n\n    static {\n      for (MapVersion value : MapVersion.values()) {\n        value.versions.forEach(version -> VERSIONS_MAP.put(version, value));\n      }\n    }\n\n    public static MapVersion fromProtocolVersion(ProtocolVersion version) {\n      return VERSIONS_MAP.get(version);\n    }\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/utils/EnumUniverse.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.utils;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic final class EnumUniverse {\n\n  private EnumUniverse() {\n\n  }\n\n  public static <T extends Enum<T>> Map<String, T> createProtocolLookup(T[] values) {\n    Map<String, T> lookup = new HashMap<>();\n    for (T value : values) {\n      if (value.name().startsWith(\"MINECRAFT_\")) {\n        lookup.put(value.name().substring(\"MINECRAFT_\".length()).replace(\"_\", \".\"), value);\n      }\n    }\n    return lookup;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/utils/OverlayMap.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.utils;\n\nimport java.util.Map;\nimport org.jetbrains.annotations.NotNull;\nimport org.jetbrains.annotations.Nullable;\n\npublic abstract class OverlayMap<K, V> implements Map<K, V> {\n\n  protected boolean override = false;\n  protected final Map<K, V> parent;\n  protected final Map<K, V> overlay;\n\n  public OverlayMap(Map<K, V> parent, Map<K, V> overlay) {\n    this.parent = parent;\n    this.overlay = overlay;\n  }\n\n  @Override\n  public int size() {\n    return this.parent.size() + this.overlay.size();\n  }\n\n  @Override\n  public boolean isEmpty() {\n    return this.parent.isEmpty() && this.overlay.isEmpty();\n  }\n\n  @Override\n  public boolean containsKey(Object o) {\n    if (this.override) {\n      return this.overlay.containsKey(o);\n    }\n\n    return this.parent.containsKey(o) || this.overlay.containsKey(o);\n  }\n\n  @Override\n  public boolean containsValue(Object o) {\n    if (this.override) {\n      return this.overlay.containsValue(o);\n    }\n\n    return this.parent.containsValue(o) || this.overlay.containsValue(o);\n  }\n\n  @Override\n  @SuppressWarnings(\"SuspiciousMethodCalls\")\n  public V get(Object o) {\n    if (this.overlay.containsKey(o)) {\n      return this.overlay.get(o);\n    }\n\n    return this.parent.get(o);\n  }\n\n  @Nullable\n  @Override\n  public V put(K k, V v) {\n    return this.overlay.put(k, v);\n  }\n\n  @Override\n  public V remove(Object o) {\n    return this.overlay.remove(o);\n  }\n\n  @Override\n  public void putAll(@NotNull Map<? extends K, ? extends V> map) {\n    this.overlay.putAll(map);\n  }\n\n  @Override\n  public void clear() {\n    this.overlay.clear();\n  }\n\n  public boolean isOverride() {\n    return this.override;\n  }\n\n  public void setOverride(boolean override) {\n    this.override = override;\n  }\n}\n"
  },
  {
    "path": "api/src/main/java/net/elytrium/limboapi/api/utils/OverlayVanillaMap.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi.api.utils;\n\nimport com.google.common.collect.Streams;\nimport java.util.Collection;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport org.jetbrains.annotations.NotNull;\n\npublic class OverlayVanillaMap<K, V> extends OverlayMap<K, V> {\n\n  public OverlayVanillaMap(Map<K, V> parent, Map<K, V> overlay) {\n    super(parent, overlay);\n  }\n\n  @Override\n  public Set<K> keySet() {\n    return Streams.concat(this.parent.keySet().stream(), this.overlay.keySet().stream()).collect(Collectors.toSet());\n  }\n\n  @NotNull\n  @Override\n  public Collection<V> values() {\n    return Streams.concat(this.parent.values().stream(), this.overlay.values().stream()).collect(Collectors.toList());\n  }\n\n  @NotNull\n  @Override\n  public Set<Entry<K, V>> entrySet() {\n    return Streams.concat(this.parent.entrySet().stream(), this.overlay.entrySet().stream()).collect(Collectors.toSet());\n  }\n}\n"
  },
  {
    "path": "api/src/main/templates/net/elytrium/limboapi/BuildConstants.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * The LimboAPI (excluding the LimboAPI plugin) is licensed under the terms of the MIT License. For more details,\n * reference the LICENSE file in the api top-level directory.\n */\n\npackage net.elytrium.limboapi;\n\n// The constants are replaced before compilation.\npublic class BuildConstants {\n\n  public static final String LIMBO_VERSION = \"${version}\";\n}\n"
  },
  {
    "path": "build.gradle.kts",
    "content": "import com.github.spotbugs.snom.SpotBugsExtension\nimport com.github.spotbugs.snom.SpotBugsTask\n\nplugins {\n    java\n    checkstyle\n    alias(libs.plugins.gradle.spotbugs) apply false\n    alias(libs.plugins.gradle.licenser) apply false\n}\n\nallprojects {\n    apply(plugin = \"checkstyle\")\n    apply(plugin = \"com.github.spotbugs\")\n    apply(plugin = \"net.minecraftforge.licenser\")\n\n    group = \"net.elytrium.limboapi\"\n    version = \"1.1.27-SNAPSHOT\"\n\n    tasks.withType<JavaCompile> {\n        sourceCompatibility = JavaVersion.VERSION_21.toString()\n        targetCompatibility = JavaVersion.VERSION_21.toString()\n    }\n\n    checkstyle {\n        toolVersion = \"10.12.1\"\n        configFile = file(\"$rootDir/config/checkstyle/checkstyle.xml\")\n        configProperties = mapOf(\"configDirectory\" to \"$rootDir/config/checkstyle\")\n        maxErrors = 0\n        maxWarnings = 0\n    }\n\n    extensions.configure<SpotBugsExtension> {\n        excludeFilter.set(file(\"${rootDir}/config/spotbugs/suppressions.xml\"))\n    }\n\n    tasks.withType<SpotBugsTask>() {\n        reports.create(\"html\") {\n            required.set(true)\n            outputLocation.set(layout.buildDirectory.file(\"reports/spotbugs/main/spotbugs.html\"))\n            setStylesheet(\"fancy-hist.xsl\")\n        }\n    }\n}\n\nfun getCurrentShortRevision(): String {\n    val isWindows = System.getProperty(\"os.name\")\n        .lowercase()\n        .contains(\"win\")\n\n    val process = if (isWindows) {\n        ProcessBuilder(\"cmd\", \"/c\", \"git rev-parse --short HEAD\")\n    } else {\n        ProcessBuilder(\"bash\", \"-c\", \"git rev-parse --short HEAD\")\n    }\n    return process\n        .start()\n        .inputStream\n        .bufferedReader()\n        .readText()\n        .trim()\n}\n\n// Make the function available to subprojects via extra properties\nextra[\"getCurrentShortRevision\"] = ::getCurrentShortRevision\n"
  },
  {
    "path": "config/checkstyle/checkstyle.xml",
    "content": "<?xml version=\"1.0\"?>\n<!DOCTYPE module PUBLIC\n        \"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\"\n        \"https://checkstyle.org/dtds/configuration_1_3.dtd\">\n\n<!--\n    Checkstyle configuration that checks the Google coding conventions from Google Java Style\n    that can be found at https://google.github.io/styleguide/javaguide.html\n    Checkstyle is very configurable. Be sure to read the documentation at\n    http://checkstyle.org (or in your downloaded distribution).\n    To completely disable a check, just comment it out or delete it from the file.\n    To suppress certain violations please review suppression filters.\n    Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.\n -->\n\n<module name=\"Checker\">\n    <property name=\"charset\" value=\"UTF-8\"/>\n\n    <property name=\"severity\" value=\"warning\"/>\n\n    <property name=\"fileExtensions\" value=\"java, properties, xml\"/>\n    <!-- Excludes all 'module-info.java' files              -->\n    <!-- See https://checkstyle.org/config_filefilters.html -->\n    <module name=\"BeforeExecutionExclusionFileFilter\">\n        <property name=\"fileNamePattern\" value=\"module\\-info\\.java$\"/>\n    </module>\n    <!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->\n    <module name=\"SuppressionFilter\">\n        <property name=\"file\" value=\"${configDirectory}/suppressions.xml\"/>\n    </module>\n\n    <!-- Checks for whitespace                               -->\n    <!-- See http://checkstyle.org/config_whitespace.html -->\n    <module name=\"FileTabCharacter\">\n        <property name=\"eachLine\" value=\"true\"/>\n    </module>\n\n    <module name=\"LineLength\">\n        <property name=\"fileExtensions\" value=\"java\"/>\n        <property name=\"max\" value=\"155\"/>\n        <property name=\"ignorePattern\" value=\"^package.*|^import.*|a href|href|http://|https://|ftp://\"/>\n    </module>\n\n    <module name=\"NewlineAtEndOfFile\"/>\n\n    <module name=\"TreeWalker\">\n        <module name=\"MissingOverride\"/>\n        <module name=\"RedundantImport\"/>\n        <module name=\"UnusedImports\"/>\n        <module name=\"RequireThis\">\n            <property name=\"validateOnlyOverlapping\" value=\"false\"/>\n        </module>\n\n        <module name=\"OuterTypeFilename\"/>\n        <module name=\"IllegalTokenText\">\n            <property name=\"tokens\" value=\"STRING_LITERAL, CHAR_LITERAL\"/>\n            <property name=\"format\"\n                      value=\"\\\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\\\(0(10|11|12|14|15|42|47)|134)\"/>\n            <property name=\"message\"\n                      value=\"Consider using special escape sequence instead of octal value or Unicode escaped value.\"/>\n        </module>\n        <module name=\"AvoidEscapedUnicodeCharacters\">\n            <property name=\"allowEscapesForControlCharacters\" value=\"true\"/>\n            <property name=\"allowByTailComment\" value=\"true\"/>\n            <property name=\"allowNonPrintableEscapes\" value=\"true\"/>\n        </module>\n        <module name=\"AvoidStarImport\"/>\n        <module name=\"OneTopLevelClass\"/>\n        <module name=\"NoLineWrap\">\n            <property name=\"tokens\" value=\"PACKAGE_DEF, IMPORT, STATIC_IMPORT\"/>\n        </module>\n        <module name=\"EmptyBlock\">\n            <property name=\"option\" value=\"TEXT\"/>\n            <property name=\"tokens\"\n                      value=\"LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH\"/>\n        </module>\n        <module name=\"NeedBraces\">\n            <property name=\"tokens\"\n                      value=\"LITERAL_DO, LITERAL_ELSE, LITERAL_FOR, LITERAL_IF, LITERAL_WHILE\"/>\n        </module>\n        <module name=\"LeftCurly\">\n            <property name=\"tokens\"\n                      value=\"ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF,\n                    INTERFACE_DEF, LAMBDA, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT,\n                    LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF,\n                    LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF,\n                    OBJBLOCK, STATIC_INIT, RECORD_DEF, COMPACT_CTOR_DEF\"/>\n        </module>\n        <module name=\"RightCurly\">\n            <property name=\"id\" value=\"RightCurlySame\"/>\n            <property name=\"tokens\"\n                      value=\"LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,\n                    LITERAL_DO\"/>\n        </module>\n        <module name=\"RightCurly\">\n            <property name=\"id\" value=\"RightCurlyAlone\"/>\n            <property name=\"option\" value=\"alone\"/>\n            <property name=\"tokens\"\n                      value=\"CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,\n                    INSTANCE_INIT, ANNOTATION_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF,\n                    COMPACT_CTOR_DEF\"/>\n        </module>\n        <module name=\"SuppressionXpathSingleFilter\">\n            <!-- suppresion is required till https://github.com/checkstyle/checkstyle/issues/7541 -->\n            <property name=\"id\" value=\"RightCurlyAlone\"/>\n            <property name=\"query\" value=\"//RCURLY[parent::SLIST[count(./*)=1]\n                                     or preceding-sibling::*[last()][self::LCURLY]]\"/>\n        </module>\n        <module name=\"WhitespaceAfter\">\n            <property name=\"tokens\"\n                      value=\"COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE,\n                    LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE\"/>\n        </module>\n        <module name=\"WhitespaceAround\">\n            <property name=\"allowEmptyConstructors\" value=\"true\"/>\n            <property name=\"allowEmptyLambdas\" value=\"true\"/>\n            <property name=\"allowEmptyMethods\" value=\"true\"/>\n            <property name=\"allowEmptyTypes\" value=\"true\"/>\n            <property name=\"allowEmptyLoops\" value=\"true\"/>\n            <property name=\"ignoreEnhancedForColon\" value=\"false\"/>\n            <property name=\"tokens\"\n                      value=\"ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR,\n                    BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND,\n                    LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,\n                    LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED,\n                    LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN,\n                    NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,\n                    SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND\"/>\n            <message key=\"ws.notFollowed\"\n                     value=\"WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)\"/>\n            <message key=\"ws.notPreceded\"\n                     value=\"WhitespaceAround: ''{0}'' is not preceded with whitespace.\"/>\n        </module>\n        <module name=\"OneStatementPerLine\"/>\n        <module name=\"MultipleVariableDeclarations\"/>\n        <module name=\"ArrayTypeStyle\"/>\n        <module name=\"MissingSwitchDefault\"/>\n        <module name=\"FallThrough\"/>\n        <module name=\"UpperEll\"/>\n        <module name=\"ModifierOrder\"/>\n        <module name=\"EmptyLineSeparator\">\n            <property name=\"tokens\"\n                      value=\"PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF,\n                    STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF,\n                    COMPACT_CTOR_DEF\"/>\n            <property name=\"allowNoEmptyLineBetweenFields\" value=\"true\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <property name=\"id\" value=\"SeparatorWrapDot\"/>\n            <property name=\"tokens\" value=\"DOT\"/>\n            <property name=\"option\" value=\"nl\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <property name=\"id\" value=\"SeparatorWrapComma\"/>\n            <property name=\"tokens\" value=\"COMMA\"/>\n            <property name=\"option\" value=\"EOL\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/259 -->\n            <property name=\"id\" value=\"SeparatorWrapEllipsis\"/>\n            <property name=\"tokens\" value=\"ELLIPSIS\"/>\n            <property name=\"option\" value=\"EOL\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/258 -->\n            <property name=\"id\" value=\"SeparatorWrapArrayDeclarator\"/>\n            <property name=\"tokens\" value=\"ARRAY_DECLARATOR\"/>\n            <property name=\"option\" value=\"EOL\"/>\n        </module>\n        <module name=\"SeparatorWrap\">\n            <property name=\"id\" value=\"SeparatorWrapMethodRef\"/>\n            <property name=\"tokens\" value=\"METHOD_REF\"/>\n            <property name=\"option\" value=\"nl\"/>\n        </module>\n        <module name=\"PackageName\">\n            <property name=\"format\" value=\"^[a-z]+(\\.[a-z][a-z0-9]*)*$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Package name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"TypeName\">\n            <property name=\"tokens\" value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF,\n                    ANNOTATION_DEF, RECORD_DEF\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"MemberName\">\n            <property name=\"format\" value=\"^[a-z][a-z0-9][a-zA-Z0-9]*$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Member name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"ParameterName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Parameter name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"LambdaParameterName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Lambda parameter name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"CatchParameterName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Catch parameter name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"LocalVariableName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Local variable name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"PatternVariableName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Pattern variable name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"ClassTypeParameterName\">\n            <property name=\"format\" value=\"(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Class type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"RecordComponentName\">\n            <property name=\"format\" value=\"^[a-z]([a-z0-9][a-zA-Z0-9]*)?$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Record component name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"RecordTypeParameterName\">\n            <property name=\"format\" value=\"(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Record type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"MethodTypeParameterName\">\n            <property name=\"format\" value=\"(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Method type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"InterfaceTypeParameterName\">\n            <property name=\"format\" value=\"(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Interface type name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"NoFinalizer\"/>\n        <module name=\"GenericWhitespace\">\n            <message key=\"ws.followed\"\n                     value=\"GenericWhitespace ''{0}'' is followed by whitespace.\"/>\n            <message key=\"ws.preceded\"\n                     value=\"GenericWhitespace ''{0}'' is preceded with whitespace.\"/>\n            <message key=\"ws.illegalFollow\"\n                     value=\"GenericWhitespace ''{0}'' should followed by whitespace.\"/>\n            <message key=\"ws.notPreceded\"\n                     value=\"GenericWhitespace ''{0}'' is not preceded with whitespace.\"/>\n        </module>\n        <module name=\"Indentation\">\n            <property name=\"basicOffset\" value=\"2\"/>\n            <property name=\"braceAdjustment\" value=\"2\"/>\n            <property name=\"caseIndent\" value=\"2\"/>\n            <property name=\"throwsIndent\" value=\"4\"/>\n            <property name=\"lineWrappingIndentation\" value=\"4\"/>\n            <property name=\"arrayInitIndent\" value=\"2\"/>\n        </module>\n        <module name=\"AbbreviationAsWordInName\">\n            <property name=\"ignoreFinal\" value=\"false\"/>\n            <property name=\"allowedAbbreviationLength\" value=\"2\"/>\n            <property name=\"tokens\"\n                      value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF, ANNOTATION_FIELD_DEF,\n                    PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF, PATTERN_VARIABLE_DEF, RECORD_DEF,\n                    RECORD_COMPONENT_DEF\"/>\n        </module>\n        <module name=\"NoWhitespaceBeforeCaseDefaultColon\"/>\n        <module name=\"OverloadMethodsDeclarationOrder\"/>\n        <module name=\"VariableDeclarationUsageDistance\"/>\n        <module name=\"CustomImportOrder\">\n            <property name=\"sortImportsInGroupAlphabetically\" value=\"true\"/>\n            <property name=\"separateLineBetweenGroups\" value=\"true\"/>\n            <property name=\"customImportOrderRules\" value=\"STATIC###THIRD_PARTY_PACKAGE\"/>\n            <property name=\"tokens\" value=\"IMPORT, STATIC_IMPORT, PACKAGE_DEF\"/>\n        </module>\n        <module name=\"MethodParamPad\">\n            <property name=\"tokens\"\n                      value=\"CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF,\n                    SUPER_CTOR_CALL, ENUM_CONSTANT_DEF, RECORD_DEF\"/>\n        </module>\n        <module name=\"NoWhitespaceBefore\">\n            <property name=\"tokens\"\n                      value=\"COMMA, SEMI, POST_INC, POST_DEC, DOT,\n                    LABELED_STAT, METHOD_REF\"/>\n            <property name=\"allowLineBreaks\" value=\"true\"/>\n        </module>\n        <module name=\"ParenPad\">\n            <property name=\"tokens\"\n                      value=\"ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, DOT, ENUM_CONSTANT_DEF,\n                    EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW,\n                    LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL,\n                    METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, LAMBDA,\n                    RECORD_DEF\"/>\n        </module>\n        <module name=\"OperatorWrap\">\n            <property name=\"option\" value=\"NL\"/>\n            <property name=\"tokens\"\n                      value=\"BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,\n                    LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF,\n                    TYPE_EXTENSION_AND \"/>\n        </module>\n        <module name=\"AnnotationLocation\">\n            <property name=\"id\" value=\"AnnotationLocationMostCases\"/>\n            <property name=\"tokens\"\n                      value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF,\n                      RECORD_DEF, COMPACT_CTOR_DEF\"/>\n        </module>\n        <module name=\"AnnotationLocation\">\n            <property name=\"id\" value=\"AnnotationLocationVariables\"/>\n            <property name=\"tokens\" value=\"VARIABLE_DEF\"/>\n            <property name=\"allowSamelineMultipleAnnotations\" value=\"true\"/>\n        </module>\n        <module name=\"NonEmptyAtclauseDescription\"/>\n        <module name=\"InvalidJavadocPosition\"/>\n        <module name=\"JavadocTagContinuationIndentation\"/>\n        <module name=\"SummaryJavadoc\">\n            <property name=\"forbiddenSummaryFragments\"\n                      value=\"^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )\"/>\n        </module>\n        <module name=\"JavadocParagraph\"/>\n        <module name=\"RequireEmptyLineBeforeBlockTagGroup\"/>\n        <module name=\"AtclauseOrder\">\n            <property name=\"tagOrder\" value=\"@param, @return, @throws, @deprecated\"/>\n            <property name=\"target\"\n                      value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF\"/>\n        </module>\n        <module name=\"JavadocMethod\">\n            <property name=\"accessModifiers\" value=\"public\"/>\n            <property name=\"allowMissingParamTags\" value=\"true\"/>\n            <property name=\"allowMissingReturnTag\" value=\"true\"/>\n            <property name=\"allowedAnnotations\" value=\"Override, Test\"/>\n            <property name=\"tokens\" value=\"METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF\"/>\n        </module>\n        <module name=\"MissingJavadocMethod\">\n            <property name=\"scope\" value=\"public\"/>\n            <property name=\"minLineCount\" value=\"2\"/>\n            <property name=\"allowedAnnotations\" value=\"Override, Test\"/>\n            <property name=\"tokens\" value=\"METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF,\n                                   COMPACT_CTOR_DEF\"/>\n        </module>\n        <module name=\"MissingJavadocType\">\n            <property name=\"scope\" value=\"protected\"/>\n            <property name=\"tokens\"\n                      value=\"CLASS_DEF, INTERFACE_DEF, ENUM_DEF,\n                      RECORD_DEF, ANNOTATION_DEF\"/>\n            <property name=\"excludeScope\" value=\"nothing\"/>\n        </module>\n        <module name=\"MethodName\">\n            <property name=\"format\" value=\"^[a-z][a-z0-9][a-zA-Z0-9_]*$\"/>\n            <message key=\"name.invalidPattern\"\n                     value=\"Method name ''{0}'' must match pattern ''{1}''.\"/>\n        </module>\n        <module name=\"SingleLineJavadoc\"/>\n        <module name=\"EmptyCatchBlock\">\n            <property name=\"exceptionVariableName\" value=\"expected\"/>\n        </module>\n        <module name=\"CommentsIndentation\">\n            <property name=\"tokens\" value=\"SINGLE_LINE_COMMENT, BLOCK_COMMENT_BEGIN\"/>\n        </module>\n        <!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->\n        <module name=\"SuppressionXpathFilter\">\n            <property name=\"file\" value=\"${org.checkstyle.google.suppressionxpathfilter.config}\"\n                      default=\"checkstyle-xpath-suppressions.xml\"/>\n            <property name=\"optional\" value=\"true\"/>\n        </module>\n    </module>\n</module>\n"
  },
  {
    "path": "config/checkstyle/suppressions.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE suppressions PUBLIC\n        \"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN\"\n        \"http://checkstyle.org/dtds/suppressions_1_2.dtd\">\n\n<suppressions>\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*\" checks=\"SummaryJavadoc\"/>\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*\" checks=\"MissingJavadocType\"/>\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*\" checks=\"MissingJavadocMethod\"/>\n\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*[\\\\/]Settings.java\" checks=\"TypeName\"/>\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*[\\\\/]Settings.java\" checks=\"LineLength\"/>\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*[\\\\/]Settings.java\" checks=\"MemberName\"/>\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*[\\\\/]Settings.java\" checks=\"RequireThis\"/>\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/].*[\\\\/]Settings.java\" checks=\"AbbreviationAsWordInName\"/>\n\n    <suppress files=\".*[\\\\/]net[\\\\/]elytrium[\\\\/]limboapi[\\\\/]server[\\\\/]LimboPlayerImpl.java\" checks=\"Indentation\"/>\n</suppressions>\n"
  },
  {
    "path": "config/spotbugs/suppressions.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<FindBugsFilter>\n    <Match>\n        <Bug pattern=\"EI_EXPOSE_REP\"/>\n    </Match>\n    <Match>\n        <Bug pattern=\"EI_EXPOSE_REP2\"/>\n    </Match>\n    <Match>\n        <Bug pattern=\"THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION\"/>\n    </Match>\n    <Match>\n        <Bug pattern=\"THROWS_METHOD_THROWS_CLAUSE_THROWABLE\"/>\n    </Match>\n    <Match>\n        <Bug pattern=\"CT_CONSTRUCTOR_THROW\"/>\n    </Match>\n    <Match>\n        <Bug pattern=\"AT_STALE_THREAD_WRITE_OF_PRIMITIVE\"/>\n    </Match>\n</FindBugsFilter>\n"
  },
  {
    "path": "gradle/libs.versions.toml",
    "content": "[versions]\nelytrium-commons = \"1.2.3\" # https://github.com/Elytrium/elytrium-java-commons\nelytrium-fastprepare = \"1.0.13\" #https://github.com/Elytrium/FastPrepareAPI\ngradle-licenser = \"1.2.0\" # https://github.com/CadixDev/licenser\ngradle-shadow = \"9.4.0\" # https://github.com/GradleUp/shadow\ngradle-spotbugs = \"6.4.8\" # https://github.com/spotbugs/spotbugs-gradle-plugin\nminecraft-adventure = \"4.15.0\" # https://github.com/KyoriPowered/adventure\nminecraft-bstats = \"3.0.0\" # https://github.com/Bastian/bStats\nminecraft-velocity = \"3.5.0-SNAPSHOT\" # https://github.com/PaperMC/Velocity\ntool-commons-io = \"2.6\" # https://github.com/apache/commons-io\ntool-fastutil = \"8.5.11\" # https://github.com/vigna/fastutil/\ntool-google-guava = \"28.0-jre\" # https://github.com/google/guava\ntool-netty = \"4.1.86.Final\" # https://github.com/netty/netty\ntool-spotbugs-annotations = \"4.7.3\" # https://github.com/spotbugs/spotbugs\n\n[libraries]\nelytrium-commons-config = { module = \"net.elytrium.commons:config\", version.ref = \"elytrium-commons\" }\nelytrium-commons-kyori = { module = \"net.elytrium.commons:kyori\", version.ref = \"elytrium-commons\" }\nelytrium-commons-utils = { module = \"net.elytrium.commons:utils\", version.ref = \"elytrium-commons\" }\nelytrium-commons-velocity = { module = \"net.elytrium.commons:velocity\", version.ref = \"elytrium-commons\" }\nelytrium-fastprepare = { module = \"net.elytrium:fastprepare\", version.ref = \"elytrium-fastprepare\" }\nminecraft-adventure-nbt = { module = \"net.kyori:adventure-nbt\", version.ref = \"minecraft-adventure\" }\nminecraft-bstats-velocity = { module = \"org.bstats:bstats-velocity\", version.ref = \"minecraft-bstats\" }\nminecraft-velocity-api = { module = \"com.velocitypowered:velocity-api\", version.ref = \"minecraft-velocity\" }\nminecraft-velocity-native = { module = \"com.velocitypowered:velocity-native\", version.ref = \"minecraft-velocity\" }\nminecraft-velocity-proxy = { module = \"com.velocitypowered:velocity-proxy\", version.ref = \"minecraft-velocity\" }\ntool-commons-io = { module = \"commons-io:commons-io\", version.ref = \"tool-commons-io\" }\ntool-fastutil = { module = \"it.unimi.dsi:fastutil-core\", version.ref = \"tool-fastutil\" }\ntool-google-guava = { module = \"com.google.guava:guava\", version.ref = \"tool-google-guava\" }\ntool-netty-codec = { module = \"io.netty:netty-codec\", version.ref = \"tool-netty\" }\ntool-netty-handler = { module = \"io.netty:netty-handler\", version.ref = \"tool-netty\" }\ntool-spotbugs-annotations = { module = \"com.github.spotbugs:spotbugs-annotations\", version.ref = \"tool-spotbugs-annotations\" }\n\n[plugins]\ngradle-licenser = { id = \"net.minecraftforge.licenser\", version.ref = \"gradle-licenser\" }\ngradle-shadow = { id = \"com.gradleup.shadow\", version.ref = \"gradle-shadow\" }\ngradle-spotbugs = { id = \"com.github.spotbugs\", version.ref = \"gradle-spotbugs\" }\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-9.4.1-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "org.gradle.jvmargs=-Xmx4096m\nmanifestUrl=https://launchermeta.mojang.com/mc/game/version_manifest.json\n\n# 1 week\ncacheValidMillis=604800000\n\n# Change to invalidate mappings cache on CI\ngameVersion=26.1"
  },
  {
    "path": "gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\nAPP_HOME=$( cd \"${APP_HOME:-./}\" && pwd -P ) || exit\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=${0##*/}\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n# Collect all arguments for the java command;\n#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of\n#     shell script including quotes and variable substitutions, so put them in\n#     double quotes to make sure that they get re-expanded; and\n#   * put everything else in single quotes, so that it's not re-expanded.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        org.gradle.wrapper.GradleWrapperMain \\\n        \"$@\"\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n\n@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto execute\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "plugin/build.gradle",
    "content": "//file:noinspection GroovyAssignabilityCheck\n\nbuildscript() {\n  dependencies() {\n    classpath(libs.tool.commons.io)\n    classpath(libs.tool.google.guava)\n  }\n}\n\nplugins() {\n  id(\"java\")\n  alias(libs.plugins.gradle.shadow)\n}\n\ncompileJava() {\n  getOptions().getRelease().set(21)\n  getOptions().setEncoding(\"UTF-8\")\n}\n\ndependencies() {\n  implementation(project(\":api\"))\n  implementation(libs.elytrium.commons.config)\n  implementation(libs.elytrium.commons.utils)\n  implementation(libs.elytrium.commons.velocity)\n  implementation(libs.elytrium.commons.kyori)\n\n  implementation(libs.elytrium.fastprepare)\n  compileOnly(libs.minecraft.velocity.api)\n  annotationProcessor(libs.minecraft.velocity.api)\n  compileOnly(libs.minecraft.velocity.proxy) // From Elytrium Repo.\n  compileOnly(libs.minecraft.velocity.native)\n\n  // Needs for some velocity methods.\n  compileOnly(libs.tool.netty.codec)\n  compileOnly(libs.tool.netty.handler)\n  compileOnly(libs.tool.fastutil)\n\n  implementation(libs.minecraft.bstats.velocity)\n\n  compileOnly(libs.tool.spotbugs.annotations)\n}\n\nshadowJar() {\n  getArchiveClassifier().set(\"\")\n  setArchiveFileName(\"limboapi-${project.version}.jar\")\n\n  exclude(\"META-INF/versions/**\")\n  exclude(\"net/kyori/**\")\n\n  relocate(\"org.bstats\", \"net.elytrium.limboapi.thirdparty.org.bstats\")\n  relocate(\"net.elytrium.fastprepare\", \"net.elytrium.limboapi.thirdparty.fastprepare\")\n  relocate(\"net.elytrium.commons.velocity\", \"net.elytrium.limboapi.thirdparty.commons.velocity\")\n  relocate(\"net.elytrium.commons.kyori\", \"net.elytrium.limboapi.thirdparty.commons.kyori\")\n  relocate(\"net.elytrium.commons.config\", \"net.elytrium.limboapi.thirdparty.commons.config\")\n}\n\nlicense() {\n  matching(\"**/mcprotocollib/**\") {\n    header = rootProject.file(\"HEADER_MCPROTOCOLLIB.txt\")\n  }\n\n  matching(\"**/LoginListener.java\") {\n    header = rootProject.file(\"HEADER_MIXED.txt\")\n  }\n\n  matching(\"**/KickListener.java\") {\n    header = rootProject.file(\"HEADER_MIXED.txt\")\n  }\n\n  matching(\"**/LoginTasksQueue.java\") {\n    header = rootProject.file(\"HEADER_MIXED.txt\")\n  }\n\n  matching(\"**/MinecraftLimitedCompressDecoder.java\") {\n    header = rootProject.file(\"HEADER_MIXED.txt\")\n  }\n\n  header = rootProject.file(\"HEADER.txt\")\n}\n\ntasks.register(\"finalize\") {\n  doLast {\n    file(\"build/libs/${project.name}-${project.version}.jar\").delete()\n  }\n}\n\nassemble.dependsOn(shadowJar)\nbuild.finalizedBy(finalize)\n\nimport groovy.io.FileType\nimport groovy.json.JsonOutput\nimport groovy.json.JsonSlurper\nimport org.apache.commons.io.FilenameUtils\nimport org.apache.commons.io.FileUtils\nimport com.google.common.hash.Hashing\nimport com.google.common.io.Files\n\nimport java.nio.file.Path\nimport java.util.function.Function\nimport java.util.stream.Collectors\n\nenum MinecraftVersion {\n  MINECRAFT_1_7_2(4),\n  MINECRAFT_1_7_6(5),\n  MINECRAFT_1_8(47),\n  MINECRAFT_1_9(107),\n  MINECRAFT_1_9_1(108),\n  MINECRAFT_1_9_2(109),\n  MINECRAFT_1_9_4(110),\n  MINECRAFT_1_10(210),\n  MINECRAFT_1_11(315),\n  MINECRAFT_1_11_1(316),\n  MINECRAFT_1_12(335),\n  MINECRAFT_1_12_1(338),\n  MINECRAFT_1_12_2(340),\n  MINECRAFT_1_13(393),\n  MINECRAFT_1_13_1(401),\n  MINECRAFT_1_13_2(404),\n  MINECRAFT_1_14(477),\n  MINECRAFT_1_14_1(480),\n  MINECRAFT_1_14_2(485),\n  MINECRAFT_1_14_3(490),\n  MINECRAFT_1_14_4(498),\n  MINECRAFT_1_15(573),\n  MINECRAFT_1_15_1(575),\n  MINECRAFT_1_15_2(578),\n  MINECRAFT_1_16(735),\n  MINECRAFT_1_16_1(736),\n  MINECRAFT_1_16_2(751),\n  MINECRAFT_1_16_3(753),\n  MINECRAFT_1_16_4(754),\n  MINECRAFT_1_17(755),\n  MINECRAFT_1_17_1(756),\n  MINECRAFT_1_18(757),\n  MINECRAFT_1_18_2(758),\n  MINECRAFT_1_19(759),\n  MINECRAFT_1_19_1(760),\n  MINECRAFT_1_19_3(761),\n  MINECRAFT_1_19_4(762),\n  MINECRAFT_1_20(763),\n  MINECRAFT_1_20_2(764),\n  MINECRAFT_1_20_3(765),\n  MINECRAFT_1_20_5(766),\n  MINECRAFT_1_21(767),\n  MINECRAFT_1_21_2(768),\n  MINECRAFT_1_21_4(769),\n  MINECRAFT_1_21_5(770),\n  MINECRAFT_1_21_6(771),\n  MINECRAFT_1_21_7(772),\n  MINECRAFT_1_21_9(773),\n  MINECRAFT_1_21_11(774),\n  MINECRAFT_26_1(774)\n\n  public static final List<MinecraftVersion> WORLD_VERSIONS = List.of(\n    MINECRAFT_1_13,\n    MINECRAFT_1_13_2,\n    MINECRAFT_1_14,\n    MINECRAFT_1_15,\n    MINECRAFT_1_16,\n    MINECRAFT_1_16_2,\n    MINECRAFT_1_17,\n    MINECRAFT_1_19,\n    MINECRAFT_1_19_3,\n    MINECRAFT_1_19_4,\n    MINECRAFT_1_20,\n    MINECRAFT_1_20_3,\n    MINECRAFT_1_20_5,\n    MINECRAFT_1_21_2,\n    MINECRAFT_1_21_4,\n    MINECRAFT_1_21_5,\n    MINECRAFT_1_21_6,\n    MINECRAFT_1_21_7,\n    MINECRAFT_1_21_9,\n    MINECRAFT_1_21_11,\n    MINECRAFT_26_1\n  )\n\n  public static final MinecraftVersion MINIMUM_VERSION = MINECRAFT_1_7_2\n  public static final MinecraftVersion MAXIMUM_VERSION = values()[values().length - 1]\n\n  static MinecraftVersion fromVersionName(String name) {\n    return valueOf(\"MINECRAFT_\" + name.replace('.', '_'))\n  }\n\n  // Cache version name to reduce memory usage in general\n  final String versionName = this.toString().substring(10).replace('_', '.')\n  final int protocolVersion\n\n  MinecraftVersion(int protocolVersion) {\n    this.protocolVersion = protocolVersion\n  }\n\n  int getProtocolVersion() {\n    return this.protocolVersion\n  }\n\n  String getVersionName() {\n    return this.versionName\n  }\n}\n\nproject.ext.dataDirectory = new File(this.getLayout().getBuildDirectory().get().getAsFile(), \"minecraft\")\nproject.ext.generatedDir = new File(this.getLayout().getBuildDirectory().get().getAsFile(), \"generated/minecraft\")\nproject.ext.versionManifestFile = new File(dataDirectory, \"manifest.json\")\n\nsourceSets {\n  main {\n    resources {\n      srcDirs += generatedDir\n    }\n  }\n}\n\ntasks.register(\"downloadManifest\") {\n  this.println(\"> Downloading version manifest...\")\n  versionManifestFile.getParentFile().mkdirs()\n  if (checkIsCacheValid(versionManifestFile)) {\n    FileUtils.copyURLToFile(new URL(manifestUrl), versionManifestFile)\n  }\n}\n\nboolean checkIsCacheValid(File file) {\n  if (file.exists() && System.currentTimeMillis() - file.lastModified() < Long.parseLong(cacheValidMillis)) {\n    println(\"> Found cached \" + file.getName())\n    return false\n  }\n\n  return true\n}\nFile downloadVersionManifest(String version) {\n  this.println(\"> Downloading ${version} manifest...\")\n\n  Object manifest = new JsonSlurper().parse(versionManifestFile)\n  def optional = manifest.versions.stream().filter({ it.id == version }).findFirst()\n  if (optional.empty()) {\n    throw new RuntimeException(\"Couldn't find version: ${version}\")\n  }\n\n  File output = new File(dataDirectory, \"${version}/manifest.json\")\n  output.getParentFile().mkdirs()\n  FileUtils.copyURLToFile(new URL(optional.get().url), output)\n  return output\n}\n\n@SuppressWarnings('GrMethodMayBeStatic')\nFile getGeneratedCache(MinecraftVersion version) {\n  File generated = new File(dataDirectory, \"${version.getVersionName()}/generated\")\n  return new File(generated, \"reports/blocks.json\").exists()\n          && new File(generated, \"reports/${version >= MinecraftVersion.MINECRAFT_1_14 ? \"registries\" : \"items\"}.json\").exists()\n          && new File(generated, \"data/minecraft/tags\").exists()\n          ? generated : null\n}\n\nstatic boolean validateServer(File file, String expected) {\n  if (file == null || !file.exists()) {\n    return false\n  }\n\n  def hash = Files.asByteSource(file).hash(Hashing.sha1())\n  StringBuilder hashBuilder = new StringBuilder()\n  hash.asBytes().each({hashBuilder.append(Integer.toString((it & 0xFF) + 0x100, 16).substring(1))})\n  return hashBuilder.toString() == expected\n}\n\nFile getServerJar(String version) {\n  File manifestFile = this.downloadVersionManifest(version)\n  Object manifest = new JsonSlurper().parse(manifestFile)\n\n  File jarFile = new File(dataDirectory, \"${version}/server.jar\")\n  if (!validateServer(jarFile, manifest.downloads.server.sha1)) {\n    this.println(\"> Downloading ${version} server...\")\n    jarFile.getParentFile().mkdirs()\n    FileUtils.copyURLToFile(new URL(manifest.downloads.server.url), jarFile)\n  }\n\n  return jarFile\n}\n\nFile generateData(MinecraftVersion version) {\n  File cache = getGeneratedCache(version)\n  if (cache != null) {\n    return cache\n  }\n\n  File jarFile = this.getServerJar(version.getVersionName())\n  File parent = jarFile.getParentFile()\n  File targetDir = new File(parent, \"generated\")\n\n  try {\n    FileUtils.deleteDirectory(targetDir)\n  } catch (IOException ignored) {\n    // Ignored.\n  }\n\n  String command\n  if (version >= MinecraftVersion.MINECRAFT_1_18) {\n    command = \"\\\"%s\\\" -DbundlerMainClass=net.minecraft.data.Main -jar \\\"${jarFile.getAbsolutePath()}\\\" --reports --server\"\n  } else {\n    command = \"\\\"%s\\\" -cp \\\"${jarFile.getAbsolutePath()}\\\" net.minecraft.data.Main --reports --server\"\n  }\n\n  List<String> commandLine;\n  if (System.getProperty(\"os.name\").toLowerCase().contains(\"win\")) {\n    File java = new File(System.getProperty(\"java.home\"), \"bin/java.exe\")\n    commandLine = [\"cmd\", \"/c\", String.format(command, java)]\n  } else {\n    File java = new File(System.getProperty(\"java.home\"), \"bin/java\")\n    commandLine = [\"bash\", \"-c\", String.format(command, java)]\n  }\n  commandLine.execute([], parent).waitFor()\n\n  // Remove/compact files, reduces disk usage from ~2.9gb to ~92mb (or ~9.5mb on a compressed filesystem)\n  jarFile.delete()\n  FileUtils.deleteDirectory(new File(parent, \"logs\"))\n  FileUtils.deleteDirectory(new File(parent, \"libraries\"))\n  FileUtils.deleteDirectory(new File(parent, \"versions\"))\n\n  new File(targetDir, \"reports/commands.json\").delete()\n\n  FileUtils.deleteDirectory(new File(targetDir, \".cache\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"reports/biome_parameters\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"reports/biomes\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"reports/worldgen\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"reports/minecraft/components/item\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/datapacks\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/advancements\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/advancement\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/recipes\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/recipe\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/loot_tables\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/loot_table\"))\n  FileUtils.deleteDirectory(new File(targetDir, \"data/minecraft/worldgen\"))\n\n  java.nio.file.Files.walk(parent.toPath(), 32).forEach { it ->\n    if (it.fileName.toString().endsWith(\".json\")) {\n      java.nio.file.Files.writeString(it, JsonOutput.toJson(new JsonSlurper().parse(it)))\n    }\n  }\n\n  return targetDir\n}\n\nstatic Map<String, Map<String, String>> getDefaultProperties(Object data) {\n  Map<String, Map<String, String>> defaultProperties = new HashMap<>()\n\n  data.forEach({ key, block ->\n    if (!block.containsKey(\"properties\")) {\n      return\n    }\n\n    for (Object blockState : block.states) {\n      if (!blockState.containsKey(\"default\") || !blockState.default) {\n        continue\n      }\n\n      Map<String, String> properties = blockState[\"properties\"]\n      defaultProperties.put(key, properties)\n      break\n    }\n  })\n\n  return defaultProperties\n}\n\nstatic Map<MinecraftVersion, Map<String, String>> loadFallbackMapping(File file) {\n  Object map = new JsonSlurper().parse(file)\n  return MinecraftVersion.values().collectEntries({ version ->\n    [version, map.getOrDefault(version.toString(), Collections.emptyMap())]\n  })\n}\n\nstatic Map<MinecraftVersion, Map<String, Integer>> loadLegacyMapping(File file) {\n  return new JsonSlurper().parse(file).collectEntries({ version, mapping ->\n    [MinecraftVersion.valueOf(version), mapping.collectEntries({ block, id ->\n      [block, Integer.parseInt(id)]\n    })]\n  })\n}\n\nstatic int getBlockID(String block,\n                      Map<MinecraftVersion, Map<String, Integer>> mappings,\n                      Map<MinecraftVersion, Map<String, Map<String, String>>> properties,\n                      Map<MinecraftVersion, Map<String, String>> fallback,\n                      MinecraftVersion version) {\n  Map<String, Map<String, String>> defaultProperties\n  if (version >= MinecraftVersion.MINECRAFT_1_13) {\n    defaultProperties = properties[version]\n  } else {\n    defaultProperties = properties[MinecraftVersion.MINECRAFT_1_18_2]\n  }\n\n  String[] split = block.split(\"\\\\[\")\n  String noArgBlock = split[0]\n\n  MinecraftVersion fallbackVersion = MinecraftVersion.MAXIMUM_VERSION\n  while (fallbackVersion != version) {\n    --fallbackVersion\n    noArgBlock = fallback[fallbackVersion].getOrDefault(noArgBlock, noArgBlock)\n  }\n\n  Map<String, String> blockProperties = defaultProperties[noArgBlock]\n  String targetBlockID\n  if (blockProperties == null) {\n    targetBlockID = noArgBlock\n  } else {\n    Map<String, String> currentProperties = new TreeMap<>(blockProperties)\n    if (split.length > 1) {\n      String[] args = split[1].split(\",\")\n      Map<String, String> input = Arrays.stream(args)\n              .map(arg -> arg.replace(\"]\", \"\").split(\"=\"))\n              .collect(Collectors.toMap(parts -> parts[0], parts -> parts[1]))\n\n      input.forEach({ key, value ->\n        if (currentProperties.containsKey(key)) {\n          currentProperties.put(key, value)\n        }\n      })\n    }\n\n    targetBlockID = noArgBlock + Arrays.toString(\n            currentProperties.collect({ k, v -> k + \"=\" + v }).toArray()\n    ).replace(\" \", \"\")\n  }\n\n  Integer id = mappings[version][targetBlockID]\n  if (id == null && blockProperties != null) {\n    targetBlockID = noArgBlock + Arrays.toString(\n            new TreeMap<>(blockProperties).collect({ k, v -> k + \"=\" + v }).toArray()\n    ).replace(\" \", \"\")\n    id = mappings[version][targetBlockID]\n  }\n\n  if (id == null) {\n    System.err.println(\"No ${version.getVersionName()} fallback data for ${noArgBlock}, replacing with minecraft:stone\")\n    id = 1\n  }\n\n  return id\n}\n\nstatic Map<String, Integer> getBlockMappings(Object data, Map<String, Map<String, String>> defaultPropertiesMap) {\n  Map<String, Integer> mapping = new HashMap<>()\n\n  data.forEach({ blockID, blockData ->\n    for (Object blockState : blockData.states) {\n      int protocolID = blockState.id\n\n      if (blockState.containsKey(\"properties\")) {\n        Map<String, String> stateProperties = blockState[\"properties\"]\n        Map<String, String> properties = new TreeMap<>(\n                defaultPropertiesMap.getOrDefault(blockID, Collections.emptyMap()))\n\n        properties.putAll(stateProperties)\n\n        String stateID = blockID + Arrays.toString(\n                properties.collect({ k, v -> k + \"=\" + v }).toArray()\n        ).replace(\" \", \"\")\n\n        mapping.put(stateID, protocolID)\n      } else {\n        mapping.put(blockID, protocolID)\n      }\n    }\n  })\n\n  return mapping\n}\n\nvoid generateBlockMappings(File targetDir, Map<MinecraftVersion, Object> blockReports) {\n  File defaultBlockPropertiesFile = new File(targetDir, \"defaultblockproperties.json\")\n  File blockStatesFile = new File(targetDir, \"blockstates.json\")\n  File blockStatesMappingFile = new File(targetDir, \"blockstates_mapping.json\")\n  File legacyBlocksFile = new File(targetDir, \"legacyblocks.json\")\n\n  if (checkIsCacheValid(defaultBlockPropertiesFile) || checkIsCacheValid(blockStatesFile)\n          || checkIsCacheValid(blockStatesMappingFile) || checkIsCacheValid(legacyBlocksFile)) {\n    this.println(\"> Generating default block properties...\")\n\n    Map<MinecraftVersion, Map<String, Map<String, String>>> defaultProperties =\n            blockReports.collectEntries({ version, report ->\n              [version, getDefaultProperties(report)]\n            })\n\n    defaultBlockPropertiesFile.write(JsonOutput.prettyPrint(\n            JsonOutput.toJson(defaultProperties[MinecraftVersion.MAXIMUM_VERSION].sort())), \"UTF-8\")\n\n    this.println(\"> Generating blockstates...\")\n\n    Map<MinecraftVersion, Map<String, Integer>> mappings = loadLegacyMapping(\n            new File(this.getProjectDir(), \"mapping/legacyblockmapping.json\"))\n\n    blockReports.forEach({ version, report ->\n      mappings.put(version, getBlockMappings(report, defaultProperties[version]))\n    })\n\n    Map<String, Integer> blocks = mappings[MinecraftVersion.MAXIMUM_VERSION]\n\n    blockStatesFile.write(\n            JsonOutput.prettyPrint(JsonOutput.toJson(\n                    blocks.sort(Map.Entry::getValue)\n                            .collectEntries({ k, v -> [k, String.valueOf(v)] })\n            )), \"UTF-8\")\n\n\n\n    this.println(\"> Generating blockstates mapping...\")\n\n    Map<MinecraftVersion, Map<String, String>> fallbackMapping = loadFallbackMapping(\n            new File(this.getProjectDir(), \"mapping/fallbackdata.json\"))\n\n    Map<String, Map<String, String>> blockstateMapping = new LinkedHashMap<>()\n    blocks.sort(Map.Entry::getValue)\n            .forEach({ block, modernID ->\n              Map<String, String> blockMapping = new LinkedHashMap<>()\n\n              int lastID = -1\n              for (MinecraftVersion version : MinecraftVersion.values()) {\n                int id = getBlockID(block, mappings, defaultProperties, fallbackMapping, version)\n                if (lastID != id) {\n                  blockMapping.put(version.getVersionName(), String.valueOf(lastID = id))\n                }\n              }\n\n              blockstateMapping.put(String.valueOf(modernID), blockMapping)\n            })\n\n    blockStatesMappingFile.write(\n            JsonOutput.prettyPrint(JsonOutput.toJson(blockstateMapping)), \"UTF-8\")\n\n    this.println(\"> Generating legacy blocks...\")\n\n    Map<String, String> legacyData = new JsonSlurper().parse(\n            new File(this.getProjectDir(), \"mapping/legacyblocks.json\"))\n\n    legacyData = legacyData.collectEntries({ legacy, modern ->\n      [legacy, String.valueOf(getBlockID(modern, mappings, defaultProperties, fallbackMapping, MinecraftVersion.MAXIMUM_VERSION))]\n    })\n\n    legacyBlocksFile.write(\n            JsonOutput.prettyPrint(JsonOutput.toJson(legacyData)), \"UTF-8\")\n  }\n}\n\nstatic Map<String, Map<String, String>> sortRegistryMapping(Map<String, Map<String, String>> mapping) {\n  return mapping.collectEntries({ modernID, map ->\n    [modernID, map.sort({\n      if (it.getKey().contains(\".\")) {\n        return MinecraftVersion.fromVersionName(it.getKey())\n      } else {\n        return MinecraftVersion.MINIMUM_VERSION\n      }\n    })]\n  }).sort()\n}\n\nvoid generateRegistryMapping(String target, File targetDir, Map<MinecraftVersion, Object> registriesReports) {\n  File targetFile = new File(targetDir, \"${target}s.json\");\n  File targetMappingFile = new File(targetDir, \"${target}s_mapping.json\");\n  if (checkIsCacheValid(targetFile) || checkIsCacheValid(targetMappingFile)) {\n    this.println(\"> Generating ${target}s...\")\n\n    Map<MinecraftVersion, Map<String, String>> idMap =\n            registriesReports.collectEntries({ version, registry ->\n              Object entries = registry[\"minecraft:${target}\"].entries\n              return [version, entries.collectEntries({ name, id -> [name, String.valueOf(id[\"protocol_id\"])] })]\n            })\n\n    Map<String, String> modernIDs = Collections.max(idMap.entrySet(), Map.Entry.comparingByKey()).getValue()\n\n    targetFile.write(JsonOutput.prettyPrint(\n            JsonOutput.toJson(modernIDs.sort({Integer.parseInt(it.getValue()) }))), \"UTF-8\")\n\n    this.println(\"> Generating ${target}s mapping...\")\n\n    Map<String, Map<String, String>> mapping = new JsonSlurper()\n            .parse(new File(this.getProjectDir(), \"mapping/legacy_${target}s_mapping.json\"))\n            .collectEntries({ key, value -> {\n              if (modernIDs[key] == null) {\n                throw new IllegalStateException(\"No modern id found for $key\")\n              }\n\n              return [modernIDs[key], value]\n            } })\n\n    idMap.forEach({ version, ids ->\n      ids.forEach({ key, id ->\n        if (!modernIDs.containsKey(key)) {\n          return\n        }\n\n        mapping.computeIfAbsent(modernIDs[key], _ -> new LinkedHashMap<>()).put(version.getVersionName(), id)\n      })\n    })\n\n    mapping = sortRegistryMapping(mapping)\n    targetMappingFile.write(JsonOutput.prettyPrint(\n            JsonOutput.toJson(mapping.sort({ Integer.parseInt(it.getKey()) }))), \"UTF-8\")\n  }\n}\n\nvoid generateRegistryMappings(File targetDir, Map<MinecraftVersion, Object> registriesReports) {\n  this.generateRegistryMapping(\"item\", targetDir, registriesReports\n          .findAll({ e -> MinecraftVersion.WORLD_VERSIONS.contains(e.getKey()) }))\n  this.generateRegistryMapping(\"block\", targetDir, registriesReports)\n  this.generateRegistryMapping(\"data_component_type\", targetDir, registriesReports\n          .findAll({ e -> e.getKey() >= MinecraftVersion.MINECRAFT_1_20_5 }))\n\n  File blockEntitiesMappingFile = new File(targetDir, \"blockentities_mapping.json\");\n\n  if (checkIsCacheValid(blockEntitiesMappingFile)) {\n    this.println(\"> Generating blockentities mapping...\")\n\n    Map<String, Map<String, String>> blockentities = new JsonSlurper()\n            .parse(new File(this.getProjectDir(), \"mapping/legacy_blockentities_mapping.json\"))\n\n    registriesReports.forEach({ version, registries ->\n      if (version < MinecraftVersion.MINECRAFT_1_19) {\n        return\n      }\n\n      registries[\"minecraft:block_entity_type\"].entries.forEach({ key, value ->\n        int id = value.protocol_id\n        blockentities.computeIfAbsent(key, _ -> new LinkedHashMap<>())\n                .put(version.getVersionName(), String.valueOf(id))\n      })\n    })\n\n    blockentities = sortRegistryMapping(blockentities)\n    blockEntitiesMappingFile.write(\n            JsonOutput.prettyPrint(JsonOutput.toJson(blockentities)), \"UTF-8\")\n  }\n}\n\nstatic Map<String, Map<String, List<String>>> getTags(File tagDir, Map<String, String> tagTypes) {\n  Map<String, Map<String, List<String>>> tags = new LinkedHashMap<>()\n\n  tagTypes.forEach({ directory, key ->\n    File directoryFile = new File(tagDir, directory)\n    if (!directoryFile.exists()) {\n      return\n    }\n\n    Map<String, List<String>> typeTags = new HashMap<>()\n    Map<String, List<String>> tempTags = new HashMap<>()\n\n    directoryFile.eachFileRecurse(FileType.FILES, { file ->\n      List<String> values = new JsonSlurper().parse(file).values\n      Path relativePath = directoryFile.toPath().relativize(file.toPath())\n      String name = FilenameUtils.removeExtension(relativePath.toString()).replace(File.separatorChar, '/' as char)\n      typeTags.put(\"minecraft:\" + name, values)\n    })\n\n    boolean flatten = false\n    while (!flatten) {\n      flatten = true\n\n      typeTags.forEach({ name, currentTags ->\n        List<String> newTags = new ArrayList<>()\n        currentTags.forEach({ currentTag ->\n          if (currentTag.startsWith(\"#\")) {\n            newTags.addAll(typeTags.get(currentTag.substring(1)))\n            flatten = false\n          } else {\n            newTags.add(currentTag)\n          }\n        })\n\n        tempTags.put(name, newTags)\n      })\n\n      typeTags = tempTags\n      tempTags = new HashMap<>()\n    }\n\n    tags.put(key, typeTags)\n  })\n\n  return tags\n}\n\nvoid generateTags(File targetDir, Map<MinecraftVersion, File> tagDirs) {\n  File tagsFile = new File(targetDir, \"tags.json\");\n  if (checkIsCacheValid(tagsFile)) {\n      this.println(\"> Generating tags...\")\n\n      Map<String, Object> tagTypes = new JsonSlurper().parse(new File(getProjectDir(), \"mapping/tag_types.json\"))\n\n      Map<MinecraftVersion, Map<String, Map<String, List<String>>>> allTags =\n              tagDirs.collectEntries({ version, dir ->\n                  [version, getTags(dir, tagTypes.tag_types)]\n              })\n\n      Map<String, Map<String, Set<String>>> mergedTags = new LinkedHashMap<>()\n\n      allTags.forEach({ version, tags ->\n          tags.forEach({ type, typeTags -> {\n              Map<String, Set<String>> mergedTypeTags = mergedTags.computeIfAbsent(type, _ -> new HashMap<>())\n              typeTags.forEach({ name, values ->\n                  Set<String> mergedValues = mergedTypeTags.computeIfAbsent(name, _ -> new HashSet<>())\n                  if (!tagTypes.supported_tag_types.contains(type)) {\n                      return\n                  }\n\n                  mergedValues.addAll(values)\n              })\n          }})\n      })\n\n      mergedTags = mergedTags.collectEntries({ type, typeTags ->\n          [type, typeTags.collectEntries({ name, values ->\n              [name, values.sort()]\n          }).sort()]\n      })\n\n      tagsFile.write(JsonOutput.prettyPrint(JsonOutput.toJson(mergedTags)), \"UTF-8\")\n  }\n}\n\ntasks.register(\"generateMappings\") {\n  dependsOn(downloadManifest)\n\n  File targetDir = new File(generatedDir, \"mapping\")\n  targetDir.mkdirs()\n\n  this.println(\"> Generating Minecraft data...\")\n\n  Map<MinecraftVersion, File> generated = Arrays.stream(MinecraftVersion.values())\n          .dropWhile({ it < MinecraftVersion.MINECRAFT_1_13 })\n          .collect(Collectors.toMap(Function.identity(), this::generateData))\n\n  Map<MinecraftVersion, Object> blockReports = generated.collectEntries({ version, directory ->\n    [version, new JsonSlurper().parse(new File(directory, \"reports/blocks.json\"))]\n  })\n\n  this.generateBlockMappings(targetDir, blockReports)\n\n  Map<MinecraftVersion, Object> registriesReports = generated\n          .findAll({ it.getKey() >= MinecraftVersion.MINECRAFT_1_14 })\n          .collectEntries({ version, directory ->\n            [version, new JsonSlurper().parse(new File(directory, \"reports/registries.json\"))]\n          })\n\n  this.generateRegistryMappings(targetDir, registriesReports)\n\n  Map<MinecraftVersion, File> tags = generated\n          .collectEntries({ version, directory ->\n            [version, new File(directory, \"data/minecraft/tags\")]\n          })\n\n  this.generateTags(targetDir, tags)\n}\n\nprocessResources.dependsOn(generateMappings)"
  },
  {
    "path": "plugin/mapping/fallbackdata.json",
    "content": "{\n  \"MINECRAFT_1_21_11\": {\n    \"minecraft:golden_dandelion\": \"minecraft:dandelion\",\n    \"minecraft:potted_golden_dandelion\": \"minecraft:potted_dandelion\"\n  },\n  \"MINECRAFT_1_21_7\": {\n    \"minecraft:acacia_shelf\": \"minecraft:acacia_planks\",\n    \"minecraft:bamboo_shelf\": \"minecraft:bamboo_planks\",\n    \"minecraft:birch_shelf\": \"minecraft:birch_planks\",\n    \"minecraft:cherry_shelf\": \"minecraft:cherry_planks\",\n    \"minecraft:crimson_shelf\": \"minecraft:crimson_planks\",\n    \"minecraft:dark_oak_shelf\": \"minecraft:dark_oak_planks\",\n    \"minecraft:jungle_shelf\": \"minecraft:jungle_planks\",\n    \"minecraft:mangrove_shelf\": \"minecraft:mangrove_planks\",\n    \"minecraft:oak_shelf\": \"minecraft:oak_planks\",\n    \"minecraft:pale_oak_shelf\": \"minecraft:oak_planks\",\n    \"minecraft:spruce_shelf\": \"minecraft:spruce_planks\",\n    \"minecraft:warped_shelf\": \"minecraft:warped_planks\",\n    \"minecraft:copper_chest\": \"minecraft:chest\",\n    \"minecraft:exposed_copper_chest\": \"minecraft:chest\",\n    \"minecraft:weathered_copper_chest\": \"minecraft:chest\",\n    \"minecraft:oxidized_copper_chest\": \"minecraft:chest\",\n    \"minecraft:waxed_copper_chest\": \"minecraft:chest\",\n    \"minecraft:waxed_exposed_copper_chest\": \"minecraft:chest\",\n    \"minecraft:waxed_weathered_copper_chest\": \"minecraft:chest\",\n    \"minecraft:waxed_oxidized_copper_chest\": \"minecraft:chest\",\n    \"minecraft:copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:exposed_copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:weathered_copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:oxidized_copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:waxed_copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:waxed_exposed_copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:waxed_weathered_copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:waxed_oxidized_copper_golem_statue\": \"minecraft:copper_block\",\n    \"minecraft:exposed_lightning_rod\": \"minecraft:lightning_rod\",\n    \"minecraft:weathered_lightning_rod\": \"minecraft:lightning_rod\",\n    \"minecraft:oxidized_lightning_rod\": \"minecraft:lightning_rod\",\n    \"minecraft:waxed_lightning_rod\": \"minecraft:lightning_rod\",\n    \"minecraft:waxed_exposed_lightning_rod\": \"minecraft:lightning_rod\",\n    \"minecraft:waxed_weathered_lightning_rod\": \"minecraft:lightning_rod\",\n    \"minecraft:waxed_oxidized_lightning_rod\": \"minecraft:lightning_rod\",\n    \"minecraft:copper_torch\": \"minecraft:soul_torch\",\n    \"minecraft:copper_wall_torch\": \"minecraft:soul_wall_torch\",\n    \"minecraft:copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:exposed_copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:weathered_copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:oxidized_copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_exposed_copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_weathered_copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_oxidized_copper_bars\": \"minecraft:iron_bars\",\n    \"minecraft:copper_chain\": \"minecraft:chain\",\n    \"minecraft:exposed_copper_chain\": \"minecraft:chain\",\n    \"minecraft:weathered_copper_chain\": \"minecraft:chain\",\n    \"minecraft:oxidized_copper_chain\": \"minecraft:chain\",\n    \"minecraft:waxed_copper_chain\": \"minecraft:chain\",\n    \"minecraft:waxed_exposed_copper_chain\": \"minecraft:chain\",\n    \"minecraft:waxed_weathered_copper_chain\": \"minecraft:chain\",\n    \"minecraft:waxed_oxidized_copper_chain\": \"minecraft:chain\",\n    \"minecraft:copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:exposed_copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:weathered_copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:oxidized_copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:waxed_copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:waxed_exposed_copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:waxed_weathered_copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:waxed_oxidized_copper_lantern\": \"minecraft:soul_lantern\",\n    \"minecraft:iron_chain\": \"minecraft:chain\"\n  },\n  \"MINECRAFT_1_21_5\": {\n    \"minecraft:dried_ghast\": \"minecraft:chorus_plant\"\n  },\n  \"MINECRAFT_1_21_4\": {\n    \"minecraft:wildflowers\": \"minecraft:glow_lichen\",\n    \"minecraft:leaf_litter\": \"minecraft:glow_lichen\",\n    \"minecraft:test_block\": \"minecraft:structure_block\",\n    \"minecraft:test_instance_block\": \"minecraft:structure_block\",\n    \"minecraft:bush\": \"minecraft:short_grass\",\n    \"minecraft:firefly_bush\": \"minecraft:short_grass\",\n    \"minecraft:short_dry_grass\": \"minecraft:short_grass\",\n    \"minecraft:tall_dry_grass\": \"minecraft:short_grass\",\n    \"minecraft:cactus_flower\": \"minecraft:brain_coral_fan\"\n  },\n  \"MINECRAFT_1_21_2\": {\n    \"minecraft:resin_clump\": \"minecraft:glow_lichen\",\n    \"minecraft:resin_block\": \"minecraft:cut_copper\",\n    \"minecraft:resin_bricks\": \"minecraft:bricks\",\n    \"minecraft:resin_brick_stairs\": \"minecraft:brick_stairs\",\n    \"minecraft:resin_brick_slab\": \"minecraft:brick_slab\",\n    \"minecraft:resin_brick_wall\": \"minecraft:brick_wall\",\n    \"minecraft:chiseled_resin_bricks\": \"minecraft:chiseled_copper\",\n    \"minecraft:open_eyeblossom\": \"minecraft:torchflower\",\n    \"minecraft:closed_eyeblossom\": \"minecraft:cornflower\",\n    \"minecraft:potted_open_eyeblossom\": \"minecraft:potted_torchflower\",\n    \"minecraft:potted_closed_eyeblossom\": \"minecraft:potted_cornflower\"\n  },\n  \"MINECRAFT_1_21\": {\n    \"minecraft:pale_oak_wood\": \"minecraft:birch_wood\",\n    \"minecraft:pale_oak_planks\": \"minecraft:birch_planks\",\n    \"minecraft:pale_oak_sapling\": \"minecraft:birch_sapling\",\n    \"minecraft:pale_oak_log\": \"minecraft:birch_log\",\n    \"minecraft:stripped_pale_oak_log\": \"minecraft:stripped_birch_log\",\n    \"minecraft:stripped_pale_oak_wood\": \"minecraft:stripped_birch_wood\",\n    \"minecraft:pale_oak_leaves\": \"minecraft:birch_leaves\",\n    \"minecraft:creaking_heart\": \"minecraft:oak_wood\",\n    \"minecraft:pale_oak_sign\": \"minecraft:birch_sign\",\n    \"minecraft:pale_oak_wall_sign\": \"minecraft:birch_wall_sign\",\n    \"minecraft:pale_oak_hanging_sign\": \"minecraft:birch_hanging_sign\",\n    \"minecraft:pale_oak_wall_hanging_sign\": \"minecraft:birch_wall_hanging_sign\",\n    \"minecraft:pale_oak_pressure_plate\": \"minecraft:birch_pressure_plate\",\n    \"minecraft:pale_oak_trapdoor\": \"minecraft:birch_trapdoor\",\n    \"minecraft:potted_pale_oak_sapling\": \"minecraft:potted_birch_sapling\",\n    \"minecraft:pale_oak_button\": \"minecraft:birch_button\",\n    \"minecraft:pale_oak_stairs\": \"minecraft:birch_stairs\",\n    \"minecraft:pale_oak_slab\": \"minecraft:birch_slab\",\n    \"minecraft:pale_oak_fence_gate\": \"minecraft:birch_fence_gate\",\n    \"minecraft:pale_oak_fence\": \"minecraft:birch_fence\",\n    \"minecraft:pale_oak_door\": \"minecraft:birch_door\",\n    \"minecraft:pale_moss_block\": \"minecraft:moss_block\",\n    \"minecraft:pale_hanging_moss\": \"minecraft:hanging_roots\",\n    \"minecraft:pale_moss_carpet\": \"minecraft:moss_carpet\"\n  },\n  \"MINECRAFT_1_20_3\": {\n    \"minecraft:vault\": \"minecraft:spawner\",\n    \"minecraft:heavy_core\": \"minecraft:wither_skeleton_skull\"\n  },\n  \"MINECRAFT_1_20_2\": {\n    \"minecraft:short_grass\": \"minecraft:grass\",\n    \"minecraft:trial_spawner\": \"minecraft:spawner\",\n    \"minecraft:crafter\": \"minecraft:crafting_table\",\n    \"minecraft:copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:exposed_copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:weathered_copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:oxidized_copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:waxed_copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:waxed_exposed_copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:waxed_weathered_copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:waxed_oxidized_copper_bulb\": \"minecraft:shroomlight\",\n    \"minecraft:copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:exposed_copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:weathered_copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:oxidized_copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_exposed_copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_weathered_copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:waxed_oxidized_copper_grate\": \"minecraft:iron_bars\",\n    \"minecraft:copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:exposed_copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:weathered_copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:oxidized_copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:waxed_copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:waxed_exposed_copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:waxed_weathered_copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:waxed_oxidized_copper_trapdoor\": \"minecraft:iron_trapdoor\",\n    \"minecraft:copper_door\": \"minecraft:iron_door\",\n    \"minecraft:exposed_copper_door\": \"minecraft:iron_door\",\n    \"minecraft:weathered_copper_door\": \"minecraft:iron_door\",\n    \"minecraft:oxidized_copper_door\": \"minecraft:iron_door\",\n    \"minecraft:waxed_copper_door\": \"minecraft:iron_door\",\n    \"minecraft:waxed_exposed_copper_door\": \"minecraft:iron_door\",\n    \"minecraft:waxed_weathered_copper_door\": \"minecraft:iron_door\",\n    \"minecraft:waxed_oxidized_copper_door\": \"minecraft:iron_door\",\n    \"minecraft:tuff_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:tuff_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:tuff_slab\": \"minecraft:cobblestone_slab\",\n    \"minecraft:tuff_brick_wall\": \"minecraft:stone_brick_wall\",\n    \"minecraft:tuff_brick_stairs\": \"minecraft:stone_brick_stairs\",\n    \"minecraft:tuff_brick_slab\": \"minecraft:stone_brick_slab\",\n    \"minecraft:tuff_bricks\": \"minecraft:stone_bricks\",\n    \"minecraft:polished_tuff_wall\": \"minecraft:stone_brick_wall\",\n    \"minecraft:polished_tuff_stairs\": \"minecraft:stone_brick_stairs\",\n    \"minecraft:polished_tuff_slab\": \"minecraft:stone_brick_slab\",\n    \"minecraft:polished_tuff\": \"minecraft:smooth_stone\",\n    \"minecraft:chiseled_copper\": \"minecraft:copper_block\",\n    \"minecraft:exposed_chiseled_copper\": \"minecraft:exposed_copper\",\n    \"minecraft:weathered_chiseled_copper\": \"minecraft:exposed_copper\",\n    \"minecraft:oxidized_chiseled_copper\": \"minecraft:exposed_copper\",\n    \"minecraft:waxed_chiseled_copper\": \"minecraft:waxed_copper_block\",\n    \"minecraft:waxed_exposed_chiseled_copper\": \"minecraft:waxed_copper_block\",\n    \"minecraft:waxed_weathered_chiseled_copper\": \"minecraft:waxed_copper_block\",\n    \"minecraft:waxed_oxidized_chiseled_copper\": \"minecraft:waxed_copper_block\",\n    \"minecraft:chiseled_tuff\": \"minecraft:smooth_stone\",\n    \"minecraft:chiseled_tuff_bricks\": \"minecraft:stone_bricks\"\n  },\n  \"MINECRAFT_1_19_4\": {\n    \"minecraft:suspicious_gravel\": \"minecraft:gravel\",\n    \"minecraft:pitcher_crop\": \"minecraft:air\",\n    \"minecraft:pitcher_plant\": \"minecraft:air\",\n    \"minecraft:sniffer_egg\": \"minecraft:turtle_egg\",\n    \"minecraft:calibrated_sculk_sensor\": \"minecraft:sculk_sensor\"\n  },\n  \"MINECRAFT_1_19_3\": {\n    \"minecraft:cherry_planks\": \"minecraft:birch_planks\",\n    \"minecraft:cherry_sapling\": \"minecraft:birch_sapling\",\n    \"minecraft:suspicious_sand\": \"minecraft:sand\",\n    \"minecraft:cherry_log\": \"minecraft:birch_log\",\n    \"minecraft:stripped_cherry_log\": \"minecraft:stripped_birch_log\",\n    \"minecraft:cherry_wood\": \"minecraft:birch_wood\",\n    \"minecraft:stripped_cherry_wood\": \"minecraft:stripped_birch_wood\",\n    \"minecraft:cherry_leaves\": \"minecraft:birch_leaves\",\n    \"minecraft:torchflower\": \"minecraft:torch\",\n    \"minecraft:cherry_sign\": \"minecraft:birch_sign\",\n    \"minecraft:cherry_wall_sign\": \"minecraft:birch_wall_sign\",\n    \"minecraft:cherry_hanging_sign\": \"minecraft:birch_hanging_sign\",\n    \"minecraft:cherry_wall_hanging_sign\": \"minecraft:birch_wall_hanging_sign\",\n    \"minecraft:cherry_trapdoor\": \"minecraft:birch_trapdoor\",\n    \"minecraft:potted_torchflower\": \"minecraft:potted_poppy\",\n    \"minecraft:cherry_button\": \"minecraft:birch_button\",\n    \"minecraft:cherry_stairs\": \"minecraft:birch_stairs\",\n    \"minecraft:cherry_fence_gate\": \"minecraft:birch_fence_gate\",\n    \"minecraft:cherry_fence\": \"minecraft:birch_fence\",\n    \"minecraft:cherry_door\": \"minecraft:birch_door\",\n    \"minecraft:torchflower_crop\": \"minecraft:torch\",\n    \"minecraft:pink_petals\": \"minecraft:poppy\",\n    \"minecraft:cherry_pressure_plate\": \"minecraft:birch_pressure_plate\",\n    \"minecraft:potted_cherry_sapling\": \"minecraft:potted_birch_sapling\",\n    \"minecraft:cherry_slab\": \"minecraft:birch_slab\",\n    \"minecraft:decorated_pot\": \"minecraft:flower_pot\"\n  },\n  \"MINECRAFT_1_19_1\": {\n    \"minecraft:oak_hanging_sign\": \"minecraft:oak_sign\",\n    \"minecraft:spruce_hanging_sign\": \"minecraft:spruce_sign\",\n    \"minecraft:birch_hanging_sign\": \"minecraft:birch_sign\",\n    \"minecraft:acacia_hanging_sign\": \"minecraft:acacia_sign\",\n    \"minecraft:jungle_hanging_sign\": \"minecraft:jungle_sign\",\n    \"minecraft:dark_oak_hanging_sign\": \"minecraft:dark_oak_sign\",\n    \"minecraft:crimson_hanging_sign\": \"minecraft:crimson_sign\",\n    \"minecraft:warped_hanging_sign\": \"minecraft:warped_sign\",\n    \"minecraft:mangrove_hanging_sign\": \"minecraft:mangrove_sign\",\n    \"minecraft:bamboo_hanging_sign\": \"minecraft:birch_sign\",\n    \"minecraft:oak_wall_hanging_sign\": \"minecraft:oak_wall_sign\",\n    \"minecraft:spruce_wall_hanging_sign\": \"minecraft:spruce_wall_sign\",\n    \"minecraft:birch_wall_hanging_sign\": \"minecraft:birch_wall_sign\",\n    \"minecraft:acacia_wall_hanging_sign\": \"minecraft:acacia_wall_sign\",\n    \"minecraft:jungle_wall_hanging_sign\": \"minecraft:jungle_wall_sign\",\n    \"minecraft:dark_oak_wall_hanging_sign\": \"minecraft:dark_oak_wall_sign\",\n    \"minecraft:mangrove_wall_hanging_sign\": \"minecraft:mangrove_wall_sign\",\n    \"minecraft:crimson_wall_hanging_sign\": \"minecraft:crimson_wall_sign\",\n    \"minecraft:warped_wall_hanging_sign\": \"minecraft:warped_wall_sign\",\n    \"minecraft:bamboo_wall_hanging_sign\": \"minecraft:birch_wall_sign\",\n    \"minecraft:bamboo_door\": \"minecraft:birch_door\",\n    \"minecraft:bamboo_trapdoor\": \"minecraft:birch_trapdoor\",\n    \"minecraft:bamboo_button\": \"minecraft:birch_button\",\n    \"minecraft:bamboo_stairs\": \"minecraft:birch_stairs\",\n    \"minecraft:bamboo_mosaic_stairs\": \"minecraft:birch_stairs\",\n    \"minecraft:bamboo_slab\": \"minecraft:birch_slab\",\n    \"minecraft:bamboo_mosaic_slab\": \"minecraft:birch_slab\",\n    \"minecraft:bamboo_sign\": \"minecraft:birch_sign\",\n    \"minecraft:bamboo_wall_sign\": \"minecraft:birch_wall_sign\",\n    \"minecraft:bamboo_fence_gate\": \"minecraft:birch_fence_gate\",\n    \"minecraft:bamboo_fence\": \"minecraft:birch_fence\",\n    \"minecraft:bamboo_pressure_plate\": \"minecraft:birch_pressure_plate\",\n    \"minecraft:bamboo_planks\": \"minecraft:birch_planks\",\n    \"minecraft:bamboo_mosaic\": \"minecraft:birch_planks\",\n    \"minecraft:bamboo_block\": \"minecraft:birch_planks\",\n    \"minecraft:stripped_bamboo_block\": \"minecraft:birch_planks\",\n    \"minecraft:chiseled_bookshelf\": \"minecraft:bookshelf\",\n    \"minecraft:piglin_wall_head\": \"minecraft:zombie_wall_head\",\n    \"minecraft:piglin_head\": \"minecraft:zombie_head\"\n  },\n  \"MINECRAFT_1_18_2\": {\n    \"minecraft:ochre_froglight\": \"minecraft:sea_lantern\",\n    \"minecraft:pearlescent_froglight\": \"minecraft:sea_lantern\",\n    \"minecraft:verdant_froglight\": \"minecraft:sea_lantern\",\n    \"minecraft:frogspawn\": \"minecraft:air\",\n    \"minecraft:mangrove_planks\": \"minecraft:dark_oak_planks\",\n    \"minecraft:mangrove_propagule\": \"minecraft:dark_oak_sapling\",\n    \"minecraft:mangrove_log\": \"minecraft:dark_oak_log\",\n    \"minecraft:mangrove_roots\": \"minecraft:dark_oak_leaves\",\n    \"minecraft:muddy_mangrove_roots\": \"minecraft:coal_block\",\n    \"minecraft:stripped_mangrove_log\": \"minecraft:stripped_dark_oak_log\",\n    \"minecraft:mangrove_wood\": \"minecraft:dark_oak_wood\",\n    \"minecraft:stripped_mangrove_wood\": \"minecraft:stripped_dark_oak_wood\",\n    \"minecraft:mangrove_leaves\": \"minecraft:dark_oak_leaves\",\n    \"minecraft:mangrove_sign\": \"minecraft:dark_oak_sign\",\n    \"minecraft:mangrove_wall_sign\": \"minecraft:dark_oak_wall_sign\",\n    \"minecraft:mangrove_pressure_plate\": \"minecraft:dark_oak_pressure_plate\",\n    \"minecraft:mangrove_trapdoor\": \"minecraft:dark_oak_trapdoor\",\n    \"minecraft:potted_mangrove_propagule\": \"minecraft:potted_dark_oak_sapling\",\n    \"minecraft:mangrove_button\": \"minecraft:dark_oak_button\",\n    \"minecraft:mangrove_stairs\": \"minecraft:dark_oak_stairs\",\n    \"minecraft:mangrove_slab\": \"minecraft:dark_oak_slab\",\n    \"minecraft:mangrove_fence_gate\": \"minecraft:dark_oak_fence_gate\",\n    \"minecraft:mangrove_fence\": \"minecraft:dark_oak_fence\",\n    \"minecraft:mangrove_door\": \"minecraft:dark_oak_door\",\n    \"minecraft:mud\": \"minecraft:coal_block\",\n    \"minecraft:packed_mud\": \"minecraft:coarse_dirt\",\n    \"minecraft:mud_bricks\": \"minecraft:end_stone_bricks\",\n    \"minecraft:mud_brick_stairs\": \"minecraft:end_stone_brick_stairs\",\n    \"minecraft:mud_brick_slab\": \"minecraft:end_stone_brick_slab\",\n    \"minecraft:mud_brick_wall\": \"minecraft:end_stone_brick_wall\",\n    \"minecraft:reinforced_deepslate\": \"minecraft:deepslate\",\n    \"minecraft:sculk\": \"minecraft:obsidian\",\n    \"minecraft:sculk_catalyst\": \"minecraft:end_portal_frame\",\n    \"minecraft:sculk_shrieker\": \"minecraft:sculk_sensor\",\n    \"minecraft:sculk_vein\": \"minecraft:air\"\n  },\n  \"MINECRAFT_1_16_4\": {\n    \"minecraft:copper_ore\": \"minecraft:iron_ore\",\n    \"minecraft:copper_block\": \"minecraft:polished_granite\",\n    \"minecraft:cut_copper\": \"minecraft:red_sandstone\",\n    \"minecraft:cut_copper_stairs\": \"minecraft:red_sandstone_stairs\",\n    \"minecraft:cut_copper_slab\": \"minecraft:red_sandstone_slab\",\n    \"minecraft:exposed_copper\": \"minecraft:red_sandstone\",\n    \"minecraft:exposed_cut_copper\": \"minecraft:red_sandstone\",\n    \"minecraft:exposed_cut_copper_stairs\": \"minecraft:red_sandstone_stairs\",\n    \"minecraft:exposed_cut_copper_slab\": \"minecraft:red_sandstone_slab\",\n    \"minecraft:oxidized_copper\": \"minecraft:dark_prismarine\",\n    \"minecraft:oxidized_cut_copper\": \"minecraft:dark_prismarine\",\n    \"minecraft:oxidized_cut_copper_stairs\": \"minecraft:dark_prismarine_stairs\",\n    \"minecraft:oxidized_cut_copper_slab\": \"minecraft:dark_prismarine_slab\",\n    \"minecraft:weathered_copper\": \"minecraft:dark_prismarine\",\n    \"minecraft:weathered_cut_copper\": \"minecraft:dark_prismarine\",\n    \"minecraft:weathered_cut_copper_stairs\": \"minecraft:dark_prismarine_stairs\",\n    \"minecraft:weathered_cut_copper_slab\": \"minecraft:dark_prismarine_stairs\",\n    \"minecraft:waxed_copper_block\": \"minecraft:red_sandstone\",\n    \"minecraft:waxed_cut_copper\": \"minecraft:red_sandstone\",\n    \"minecraft:waxed_cut_copper_stairs\": \"minecraft:red_sandstone_stairs\",\n    \"minecraft:waxed_cut_copper_slab\": \"minecraft:red_sandstone_stairs\",\n    \"minecraft:waxed_weathered_copper\": \"minecraft:dark_prismarine\",\n    \"minecraft:waxed_weathered_cut_copper\": \"minecraft:dark_prismarine\",\n    \"minecraft:waxed_weathered_cut_copper_stairs\": \"minecraft:dark_prismarine_stairs\",\n    \"minecraft:waxed_weathered_cut_copper_slab\": \"minecraft:dark_prismarine_slab\",\n    \"minecraft:waxed_exposed_copper\": \"minecraft:polished_granite\",\n    \"minecraft:waxed_exposed_cut_copper\": \"minecraft:polished_granite\",\n    \"minecraft:waxed_exposed_cut_copper_stairs\": \"minecraft:polished_granite_stairs\",\n    \"minecraft:waxed_exposed_cut_copper_slab\": \"minecraft:polished_granite\",\n    \"minecraft:waxed_oxidized_copper\": \"minecraft:prismarine\",\n    \"minecraft:waxed_oxidized_cut_copper\": \"minecraft:prismarine\",\n    \"minecraft:waxed_oxidized_cut_copper_stairs\": \"minecraft:prismarine_stairs\",\n    \"minecraft:waxed_oxidized_cut_copper_slab\": \"minecraft:prismarine_slab\",\n    \"minecraft:candle\": \"minecraft:air\",\n    \"minecraft:lime_candle\": \"minecraft:air\",\n    \"minecraft:magenta_candle\": \"minecraft:air\",\n    \"minecraft:brown_candle\": \"minecraft:air\",\n    \"minecraft:cyan_candle\": \"minecraft:air\",\n    \"minecraft:purple_candle\": \"minecraft:air\",\n    \"minecraft:green_candle\": \"minecraft:air\",\n    \"minecraft:blue_candle\": \"minecraft:air\",\n    \"minecraft:red_candle\": \"minecraft:air\",\n    \"minecraft:white_candle\": \"minecraft:air\",\n    \"minecraft:yellow_candle\": \"minecraft:air\",\n    \"minecraft:light_blue_candle\": \"minecraft:air\",\n    \"minecraft:gray_candle\": \"minecraft:air\",\n    \"minecraft:light_gray_candle\": \"minecraft:air\",\n    \"minecraft:orange_candle\": \"minecraft:air\",\n    \"minecraft:black_candle\": \"minecraft:air\",\n    \"minecraft:pink_candle\": \"minecraft:air\",\n    \"minecraft:candle_cake\": \"minecraft:cake\",\n    \"minecraft:gray_candle_cake\": \"minecraft:cake\",\n    \"minecraft:lime_candle_cake\": \"minecraft:cake\",\n    \"minecraft:pink_candle_cake\": \"minecraft:cake\",\n    \"minecraft:red_candle_cake\": \"minecraft:cake\",\n    \"minecraft:light_gray_candle_cake\": \"minecraft:cake\",\n    \"minecraft:brown_candle_cake\": \"minecraft:cake\",\n    \"minecraft:light_blue_candle_cake\": \"minecraft:cake\",\n    \"minecraft:magenta_candle_cake\": \"minecraft:cake\",\n    \"minecraft:cyan_candle_cake\": \"minecraft:cake\",\n    \"minecraft:white_candle_cake\": \"minecraft:cake\",\n    \"minecraft:yellow_candle_cake\": \"minecraft:cake\",\n    \"minecraft:black_candle_cake\": \"minecraft:cake\",\n    \"minecraft:green_candle_cake\": \"minecraft:cake\",\n    \"minecraft:purple_candle_cake\": \"minecraft:cake\",\n    \"minecraft:blue_candle_cake\": \"minecraft:cake\",\n    \"minecraft:orange_candle_cake\": \"minecraft:cake\",\n    \"minecraft:potted_flowering_azalea_bush\": \"minecraft:potted_oak_sapling\",\n    \"minecraft:potted_azalea_bush\": \"minecraft:potted_oak_sapling\",\n    \"minecraft:sculk_sensor\": \"minecraft:daylight_detector\",\n    \"minecraft:flowering_azalea_leaves\": \"minecraft:oak_leaves\",\n    \"minecraft:flowering_azalea\": \"minecraft:oak_leaves\",\n    \"minecraft:azalea\": \"minecraft:oak_leaves\",\n    \"minecraft:azalea_leaves\": \"minecraft:oak_leaves\",\n    \"minecraft:deepslate\": \"minecraft:blackstone\",\n    \"minecraft:deepslate_tiles\": \"minecraft:blackstone\",\n    \"minecraft:cracked_deepslate_tiles\": \"minecraft:blackstone\",\n    \"minecraft:infested_deepslate\": \"minecraft:blackstone\",\n    \"minecraft:deepslate_bricks\": \"minecraft:polished_blackstone_bricks\",\n    \"minecraft:cracked_deepslate_bricks\": \"minecraft:cracked_polished_blackstone_bricks\",\n    \"minecraft:deepslate_tile_wall\": \"minecraft:blackstone_wall\",\n    \"minecraft:deepslate_tile_slab\": \"minecraft:blackstone_slab\",\n    \"minecraft:deepslate_tile_stairs\": \"minecraft:polished_blackstone_stairs\",\n    \"minecraft:deepslate_brick_wall\": \"minecraft:blackstone_wall\",\n    \"minecraft:deepslate_brick_slab\": \"minecraft:blackstone_slab\",\n    \"minecraft:deepslate_brick_stairs\": \"minecraft:polished_blackstone_stairs\",\n    \"minecraft:polished_deepslate\": \"minecraft:polished_blackstone\",\n    \"minecraft:polished_deepslate_wall\": \"minecraft:polished_blackstone_wall\",\n    \"minecraft:polished_deepslate_slab\": \"minecraft:polished_blackstone_slab\",\n    \"minecraft:polished_deepslate_stairs\": \"minecraft:polished_blackstone_stairs\",\n    \"minecraft:cobbled_deepslate\": \"minecraft:blackstone\",\n    \"minecraft:cobbled_deepslate_wall\": \"minecraft:blackstone_wall\",\n    \"minecraft:cobbled_deepslate_stairs\": \"minecraft:blackstone_stairs\",\n    \"minecraft:cobbled_deepslate_slab\": \"minecraft:blackstone_slab\",\n    \"minecraft:chiseled_deepslate\": \"minecraft:blackstone\",\n    \"minecraft:calcite\": \"minecraft:polished_diorite\",\n    \"minecraft:light\": \"minecraft:air\",\n    \"minecraft:pointed_dripstone\": \"minecraft:air\",\n    \"minecraft:dripstone_block\": \"minecraft:terracotta\",\n    \"minecraft:glow_lichen\": \"minecraft:air\",\n    \"minecraft:cave_vines\": \"minecraft:vine\",\n    \"minecraft:cave_vines_plant\": \"minecraft:tall_grass\",\n    \"minecraft:big_dripleaf\": \"minecraft:grass\",\n    \"minecraft:big_dripleaf_stem\": \"minecraft:tall_grass\",\n    \"minecraft:small_dripleaf\": \"minecraft:grass\",\n    \"minecraft:deepslate_iron_ore\": \"minecraft:iron_ore\",\n    \"minecraft:deepslate_copper_ore\": \"minecraft:iron_ore\",\n    \"minecraft:deepslate_emerald_ore\": \"minecraft:emerald_ore\",\n    \"minecraft:deepslate_diamond_ore\": \"minecraft:diamond_ore\",\n    \"minecraft:deepslate_coal_ore\": \"minecraft:coal_ore\",\n    \"minecraft:deepslate_gold_ore\": \"minecraft:gold_ore\",\n    \"minecraft:deepslate_redstone_ore\": \"minecraft:redstone_ore\",\n    \"minecraft:deepslate_lapis_ore\": \"minecraft:lapis_ore\",\n    \"minecraft:raw_gold_block\": \"minecraft:gold_block\",\n    \"minecraft:raw_iron_block\": \"minecraft:iron_block\",\n    \"minecraft:raw_copper_block\": \"minecraft:iron_block\",\n    \"minecraft:tuff\": \"minecraft:cobblestone\",\n    \"minecraft:amethyst_cluster\": \"minecraft:air\",\n    \"minecraft:small_amethyst_bud\": \"minecraft:air\",\n    \"minecraft:medium_amethyst_bud\": \"minecraft:air\",\n    \"minecraft:large_amethyst_bud\": \"minecraft:air\",\n    \"minecraft:budding_amethyst\": \"minecraft:purpur_block\",\n    \"minecraft:amethyst_block\": \"minecraft:purpur_block\",\n    \"minecraft:spore_blossom\": \"minecraft:air\",\n    \"minecraft:lightning_rod\": \"minecraft:granite_wall\",\n    \"minecraft:tinted_glass\": \"minecraft:black_stained_glass\",\n    \"minecraft:hanging_roots\": \"minecraft:air\",\n    \"minecraft:water_cauldron\": \"minecraft:cauldron\",\n    \"minecraft:powder_snow_cauldron\": \"minecraft:cauldron\",\n    \"minecraft:lava_cauldron\": \"minecraft:cauldron\",\n    \"minecraft:powder_snow\": \"minecraft:snow\",\n    \"minecraft:smooth_basalt\": \"minecraft:blackstone\",\n    \"minecraft:rooted_dirt\": \"minecraft:dirt\",\n    \"minecraft:moss_block\": \"minecraft:grass_block\",\n    \"minecraft:moss_carpet\": \"minecraft:lime_carpet\",\n    \"minecraft:dirt_path\": \"minecraft:grass_path\"\n  },\n  \"MINECRAFT_1_15_2\": {\n    \"minecraft:blackstone\": \"minecraft:stone\",\n    \"minecraft:gilded_blackstone\": \"minecraft:stone\",\n    \"minecraft:blackstone_stairs\": \"minecraft:stone_stairs\",\n    \"minecraft:blackstone_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:blackstone_slab\": \"minecraft:stone_slab\",\n    \"minecraft:polished_blackstone\": \"minecraft:polished_andesite\",\n    \"minecraft:polished_blackstone_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:polished_blackstone_stairs\": \"minecraft:stone_stairs\",\n    \"minecraft:polished_blackstone_slab\": \"minecraft:stone_slab\",\n    \"minecraft:polished_blackstone_button\": \"minecraft:stone_button\",\n    \"minecraft:polished_blackstone_pressure_plate\": \"minecraft:stone_pressure_plate\",\n    \"minecraft:polished_blackstone_bricks\": \"minecraft:stone_bricks\",\n    \"minecraft:polished_blackstone_brick_wall\": \"minecraft:stone_brick_wall\",\n    \"minecraft:polished_blackstone_brick_stairs\": \"minecraft:stone_brick_stairs\",\n    \"minecraft:polished_blackstone_brick_slab\": \"minecraft:stone_brick_slab\",\n    \"minecraft:cracked_polished_blackstone_bricks\": \"minecraft:cracked_stone_bricks\",\n    \"minecraft:chiseled_polished_blackstone\": \"minecraft:stone_bricks\",\n    \"minecraft:cracked_nether_bricks\": \"minecraft:nether_bricks\",\n    \"minecraft:chiseled_nether_bricks\": \"minecraft:nether_bricks\",\n    \"minecraft:crimson_trapdoor\": \"minecraft:acacia_trapdoor\",\n    \"minecraft:crimson_sign\": \"minecraft:acacia_sign\",\n    \"minecraft:crimson_planks\": \"minecraft:acacia_planks\",\n    \"minecraft:crimson_stairs\": \"minecraft:acacia_stairs\",\n    \"minecraft:crimson_wall_sign\": \"minecraft:acacia_wall_sign\",\n    \"minecraft:crimson_button\": \"minecraft:acacia_button\",\n    \"minecraft:crimson_fence\": \"minecraft:acacia_fence\",\n    \"minecraft:crimson_roots\": \"minecraft:fire_coral\",\n    \"minecraft:potted_crimson_roots\": \"minecraft:flower_pot\",\n    \"minecraft:stripped_crimson_stem\": \"minecraft:stripped_acacia_log\",\n    \"minecraft:crimson_fence_gate\": \"minecraft:acacia_fence_gate\",\n    \"minecraft:crimson_door\": \"minecraft:acacia_door\",\n    \"minecraft:stripped_crimson_hyphae\": \"minecraft:stripped_acacia_log\",\n    \"minecraft:crimson_hyphae\": \"minecraft:acacia_log\",\n    \"minecraft:crimson_stem\": \"minecraft:acacia_log\",\n    \"minecraft:crimson_fungus\": \"minecraft:red_mushroom\",\n    \"minecraft:potted_crimson_fungus\": \"minecraft:potted_red_mushroom\",\n    \"minecraft:crimson_slab\": \"minecraft:acacia_slab\",\n    \"minecraft:crimson_nylium\": \"minecraft:netherrack\",\n    \"minecraft:crimson_pressure_plate\": \"minecraft:acacia_pressure_plate\",\n    \"minecraft:warped_sign\": \"minecraft:oak_sign\",\n    \"minecraft:warped_wall_sign\": \"minecraft:oak_wall_sign\",\n    \"minecraft:warped_button\": \"minecraft:oak_button\",\n    \"minecraft:warped_fence\": \"minecraft:oak_fence\",\n    \"minecraft:warped_stairs\": \"minecraft:oak_stairs\",\n    \"minecraft:warped_door\": \"minecraft:oak_door\",\n    \"minecraft:warped_pressure_plate\": \"minecraft:oak_pressure_plate\",\n    \"minecraft:warped_fence_gate\": \"minecraft:oak_fence_gate\",\n    \"minecraft:warped_trapdoor\": \"minecraft:oak_trapdoor\",\n    \"minecraft:warped_slab\": \"minecraft:oak_slab\",\n    \"minecraft:stripped_warped_stem\": \"minecraft:stripped_oak_log\",\n    \"minecraft:warped_stem\": \"minecraft:oak_log\",\n    \"minecraft:warped_roots\": \"minecraft:air\",\n    \"minecraft:potted_warped_roots\": \"minecraft:flower_pot\",\n    \"minecraft:potted_warped_fungus\": \"minecraft:potted_brown_mushroom\",\n    \"minecraft:warped_hyphae\": \"minecraft:oak_log\",\n    \"minecraft:stripped_warped_hyphae\": \"minecraft:stripped_oak_log\",\n    \"minecraft:warped_fungus\": \"minecraft:brown_mushroom\",\n    \"minecraft:warped_planks\": \"minecraft:oak_planks\",\n    \"minecraft:warped_wart_block\": \"minecraft:oak_planks\",\n    \"minecraft:ancient_debris\": \"minecraft:jungle_log\",\n    \"minecraft:netherite_block\": \"minecraft:nether_bricks\",\n    \"minecraft:soul_wall_torch\": \"minecraft:wall_torch\",\n    \"minecraft:soul_torch\": \"minecraft:torch\",\n    \"minecraft:soul_lantern\": \"minecraft:lantern\",\n    \"minecraft:soul_campfire\": \"minecraft:campfire\",\n    \"minecraft:soul_fire\": \"minecraft:fire\",\n    \"minecraft:lodestone\": \"minecraft:polished_andesite\",\n    \"minecraft:chain\": \"minecraft:iron_bars\",\n    \"minecraft:respawn_anchor\": \"minecraft:furnace\",\n    \"minecraft:weeping_vines\": \"minecraft:fire_coral\",\n    \"minecraft:weeping_vines_plant\": \"minecraft:fire_coral\",\n    \"minecraft:twisting_vines\": \"minecraft:tube_coral\",\n    \"minecraft:twisting_vines_plant\": \"minecraft:tube_coral\",\n    \"minecraft:nether_sprouts\": \"minecraft:grass\",\n    \"minecraft:nether_gold_ore\": \"minecraft:netherrack\",\n    \"minecraft:crying_obsidian\": \"minecraft:obsidian\",\n    \"minecraft:shroomlight\": \"minecraft:glowstone\",\n    \"minecraft:warped_nylium\": \"minecraft:netherrack\",\n    \"minecraft:soul_soil\": \"minecraft:soul_sand\",\n    \"minecraft:target\": \"minecraft:quartz_block\",\n    \"minecraft:polished_basalt\": \"minecraft:stone\",\n    \"minecraft:basalt\": \"minecraft:cobblestone\",\n    \"minecraft:quartz_bricks\": \"minecraft:quartz_block\"\n  },\n  \"MINECRAFT_1_14_4\": {\n    \"minecraft:bee_nest\": \"minecraft:birch_planks\",\n    \"minecraft:beehive\": \"minecraft:birch_planks\",\n    \"minecraft:honeycomb_block\": \"minecraft:yellow_glazed_terracotta\",\n    \"minecraft:honey_block\":  \"minecraft:yellow_stained_glass\"\n  },\n  \"MINECRAFT_1_13_2\": {\n    \"minecraft:lily_of_the_valley\": \"minecraft:white_tulip\",\n    \"minecraft:potted_lily_of_the_valley\": \"minecraft:potted_white_tulip\",\n    \"minecraft:composter\": \"minecraft:cauldron\",\n    \"minecraft:potted_cornflower\": \"minecraft:potted_blue_orchid\",\n    \"minecraft:potted_bamboo\": \"minecraft:flower_pot\",\n    \"minecraft:cartography_table\": \"minecraft:crafting_table\",\n    \"minecraft:cornflower\": \"minecraft:blue_orchid\",\n    \"minecraft:cut_sandstone_slab\": \"minecraft:sandstone_slab\",\n    \"minecraft:bamboo_sapling\": \"minecraft:air\",\n    \"minecraft:potted_wither_rose\": \"minecraft:potted_poppy\",\n    \"minecraft:granite_slab\": \"minecraft:cobblestone_slab\",\n    \"minecraft:smooth_sandstone_slab\": \"minecraft:stone_brick_slab\",\n    \"minecraft:polished_andesite_slab\": \"minecraft:stone_brick_slab\",\n    \"minecraft:wither_rose\": \"minecraft:poppy\",\n    \"minecraft:smoker\": \"minecraft:furnace\",\n    \"minecraft:mossy_stone_brick_slab\": \"minecraft:stone_slab\",\n    \"minecraft:sweet_berry_bush\": \"minecraft:grass\",\n    \"minecraft:andesite_slab\": \"minecraft:stone_slab\",\n    \"minecraft:lantern\": \"minecraft:glowstone\",\n    \"minecraft:fletching_table\": \"minecraft:crafting_table\",\n    \"minecraft:blast_furnace\": \"minecraft:furnace\",\n    \"minecraft:grindstone\": \"minecraft:furnace\",\n    \"minecraft:smooth_stone_slab\": \"minecraft:stone_slab\",\n    \"minecraft:red_nether_brick_slab\": \"minecraft:nether_brick_slab\",\n    \"minecraft:smithing_table\": \"minecraft:furnace\",\n    \"minecraft:end_stone_brick_slab\": \"minecraft:sandstone_slab\",\n    \"minecraft:mossy_cobblestone_slab\": \"minecraft:cobblestone_slab\",\n    \"minecraft:barrel\": \"minecraft:dark_oak_log\",\n    \"minecraft:polished_granite_slab\": \"minecraft:stone_slab\",\n    \"minecraft:cut_red_sandstone_slab\": \"minecraft:red_sandstone_slab\",\n    \"minecraft:diorite_slab\": \"minecraft:cobblestone_slab\",\n    \"minecraft:scaffolding\": \"minecraft:crafting_table\",\n    \"minecraft:polished_diorite_slab\": \"minecraft:stone_slab\",\n    \"minecraft:jungle_wall_sign\": \"minecraft:wall_sign\",\n    \"minecraft:stonecutter\": \"minecraft:furnace\",\n    \"minecraft:smooth_quartz_slab\": \"minecraft:quartz_slab\",\n    \"minecraft:loom\": \"minecraft:crafting_table\",\n    \"minecraft:oak_wall_sign\": \"minecraft:wall_sign\",\n    \"minecraft:smooth_red_sandstone_slab\": \"minecraft:red_sandstone_slab\",\n    \"minecraft:dark_oak_wall_sign\": \"minecraft:wall_sign\",\n    \"minecraft:spruce_wall_sign\": \"minecraft:wall_sign\",\n    \"minecraft:acacia_wall_sign\": \"minecraft:wall_sign\",\n    \"minecraft:smooth_sandstone_stairs\": \"minecraft:sandstone_stairs\",\n    \"minecraft:diorite_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:bamboo\": \"minecraft:lime_stained_glass_pane\",\n    \"minecraft:red_nether_brick_stairs\": \"minecraft:nether_brick_stairs\",\n    \"minecraft:birch_wall_sign\": \"minecraft:wall_sign\",\n    \"minecraft:lectern\": \"minecraft:enchanting_table\",\n    \"minecraft:andesite_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:polished_granite_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:end_stone_brick_stairs\": \"minecraft:sandstone_stairs\",\n    \"minecraft:jigsaw\": \"minecraft:structure_block\",\n    \"minecraft:mossy_stone_brick_stairs\": \"minecraft:stone_brick_stairs\",\n    \"minecraft:sandstone_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:polished_andesite_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:jungle_sign\": \"minecraft:sign\",\n    \"minecraft:mossy_stone_brick_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:campfire\": \"minecraft:torch\",\n    \"minecraft:mossy_cobblestone_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:andesite_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:polished_diorite_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:smooth_red_sandstone_stairs\": \"minecraft:red_sandstone_stairs\",\n    \"minecraft:spruce_sign\": \"minecraft:sign\",\n    \"minecraft:nether_brick_wall\": \"minecraft:mossy_cobblestone_wall\",\n    \"minecraft:bell\": \"minecraft:gold_block\",\n    \"minecraft:acacia_sign\": \"minecraft:sign\",\n    \"minecraft:diorite_wall\": \"minecraft:sign\",\n    \"minecraft:birch_sign\": \"minecraft:sign\",\n    \"minecraft:dark_oak_sign\": \"minecraft:sign\",\n    \"minecraft:red_nether_brick_wall\": \"minecraft:mossy_cobblestone_wall\",\n    \"minecraft:stone_brick_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:smooth_quartz_stairs\": \"minecraft:quartz_stairs\",\n    \"minecraft:brick_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:end_stone_brick_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:red_sandstone_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:granite_stairs\": \"minecraft:cobblestone_stairs\",\n    \"minecraft:oak_sign\": \"minecraft:sign\",\n    \"minecraft:granite_wall\": \"minecraft:cobblestone_wall\",\n    \"minecraft:prismarine_wall\": \"minecraft:mossy_cobblestone_wall\",\n    \"minecraft:stone_stairs\": \"minecraft:cobblestone_stairs\"\n  },\n  \"MINECRAFT_1_13\": {\n    \"minecraft:dead_horn_coral\": \"minecraft:air\",\n    \"minecraft:dead_bubble_coral\": \"minecraft:air\",\n    \"minecraft:dead_tube_coral\": \"minecraft:air\",\n    \"minecraft:dead_brain_coral\": \"minecraft:air\",\n    \"minecraft:dead_fire_coral\": \"minecraft:air\"\n  },\n  \"MINECRAFT_1_12_2\": {\n    \"minecraft:grass_path\": \"minecraft:dirt_path\",\n    \"minecraft:sign\": \"minecraft:oak_sign\",\n    \"minecraft:wall_sign\": \"minecraft:oak_wall_sign\"\n  }\n}"
  },
  {
    "path": "plugin/mapping/legacy_blockentities_mapping.json",
    "content": "{\n  \"minecraft:banner\": {\n    \"legacy\": \"18\"\n  },\n  \"minecraft:barrel\": {\n    \"legacy\": \"25\"\n  },\n  \"minecraft:beacon\": {\n    \"legacy\": \"13\"\n  },\n  \"minecraft:bed\": {\n    \"legacy\": \"23\"\n  },\n  \"minecraft:beehive\": {\n    \"legacy\": \"32\"\n  },\n  \"minecraft:bell\": {\n    \"legacy\": \"29\"\n  },\n  \"minecraft:blast_furnace\": {\n    \"legacy\": \"27\"\n  },\n  \"minecraft:brewing_stand\": {\n    \"legacy\": \"10\"\n  },\n  \"minecraft:campfire\": {\n    \"legacy\": \"31\"\n  },\n  \"minecraft:chest\": {\n    \"legacy\": \"1\"\n  },\n  \"minecraft:chiseled_bookshelf\": {\n    \"legacy\": \"36\"\n  },\n  \"minecraft:command_block\": {\n    \"legacy\": \"21\"\n  },\n  \"minecraft:comparator\": {\n    \"legacy\": \"17\"\n  },\n  \"minecraft:conduit\": {\n    \"legacy\": \"24\"\n  },\n  \"minecraft:daylight_detector\": {\n    \"legacy\": \"15\"\n  },\n  \"minecraft:dispenser\": {\n    \"legacy\": \"5\"\n  },\n  \"minecraft:dropper\": {\n    \"legacy\": \"6\"\n  },\n  \"minecraft:enchanting_table\": {\n    \"legacy\": \"11\"\n  },\n  \"minecraft:end_gateway\": {\n    \"legacy\": \"20\"\n  },\n  \"minecraft:end_portal\": {\n    \"legacy\": \"12\"\n  },\n  \"minecraft:ender_chest\": {\n    \"legacy\": \"3\"\n  },\n  \"minecraft:furnace\": {\n    \"legacy\": \"0\"\n  },\n  \"minecraft:hanging_sign\": {\n    \"legacy\": \"7\"\n  },\n  \"minecraft:hopper\": {\n    \"legacy\": \"16\"\n  },\n  \"minecraft:jigsaw\": {\n    \"legacy\": \"30\"\n  },\n  \"minecraft:jukebox\": {\n    \"legacy\": \"4\"\n  },\n  \"minecraft:lectern\": {\n    \"legacy\": \"28\"\n  },\n  \"minecraft:mob_spawner\": {\n    \"legacy\": \"8\"\n  },\n  \"minecraft:piston\": {\n    \"legacy\": \"9\"\n  },\n  \"minecraft:sculk_catalyst\": {\n    \"legacy\": \"34\"\n  },\n  \"minecraft:sculk_sensor\": {\n    \"legacy\": \"33\"\n  },\n  \"minecraft:sculk_shrieker\": {\n    \"legacy\": \"35\"\n  },\n  \"minecraft:shulker_box\": {\n    \"legacy\": \"22\"\n  },\n  \"minecraft:sign\": {\n    \"legacy\": \"7\"\n  },\n  \"minecraft:skull\": {\n    \"legacy\": \"14\"\n  },\n  \"minecraft:smoker\": {\n    \"legacy\": \"26\"\n  },\n  \"minecraft:structure_block\": {\n    \"legacy\": \"19\"\n  },\n  \"minecraft:trapped_chest\": {\n    \"legacy\": \"2\"\n  }\n}"
  },
  {
    "path": "plugin/mapping/legacy_blocks_mapping.json",
    "content": "{\n  \"minecraft:acacia_button\": {\n    \"1.13\": \"288\",\n    \"1.13.2\": \"288\"\n  },\n  \"minecraft:acacia_door\": {\n    \"1.13\": \"461\",\n    \"1.13.2\": \"461\"\n  },\n  \"minecraft:acacia_fence\": {\n    \"1.13\": \"456\",\n    \"1.13.2\": \"456\"\n  },\n  \"minecraft:acacia_fence_gate\": {\n    \"1.13\": \"451\",\n    \"1.13.2\": \"451\"\n  },\n  \"minecraft:acacia_leaves\": {\n    \"1.13\": \"62\",\n    \"1.13.2\": \"62\"\n  },\n  \"minecraft:acacia_log\": {\n    \"1.13\": \"38\",\n    \"1.13.2\": \"38\"\n  },\n  \"minecraft:acacia_planks\": {\n    \"1.13\": \"17\",\n    \"1.13.2\": \"17\"\n  },\n  \"minecraft:acacia_pressure_plate\": {\n    \"1.13\": \"163\",\n    \"1.13.2\": \"163\"\n  },\n  \"minecraft:acacia_sapling\": {\n    \"1.13\": \"23\",\n    \"1.13.2\": \"23\"\n  },\n  \"minecraft:acacia_slab\": {\n    \"1.13\": \"432\",\n    \"1.13.2\": \"432\"\n  },\n  \"minecraft:acacia_stairs\": {\n    \"1.13\": \"351\",\n    \"1.13.2\": \"351\"\n  },\n  \"minecraft:acacia_trapdoor\": {\n    \"1.13\": \"206\",\n    \"1.13.2\": \"206\"\n  },\n  \"minecraft:acacia_wood\": {\n    \"1.13\": \"50\",\n    \"1.13.2\": \"50\"\n  },\n  \"minecraft:activator_rail\": {\n    \"1.13\": \"317\",\n    \"1.13.2\": \"317\"\n  },\n  \"minecraft:air\": {\n    \"1.13\": \"0\",\n    \"1.13.2\": \"0\"\n  },\n  \"minecraft:allium\": {\n    \"1.13\": \"121\",\n    \"1.13.2\": \"121\"\n  },\n  \"minecraft:andesite\": {\n    \"1.13\": \"6\",\n    \"1.13.2\": \"6\"\n  },\n  \"minecraft:anvil\": {\n    \"1.13\": \"302\",\n    \"1.13.2\": \"302\"\n  },\n  \"minecraft:attached_melon_stem\": {\n    \"1.13\": \"225\",\n    \"1.13.2\": \"225\"\n  },\n  \"minecraft:attached_pumpkin_stem\": {\n    \"1.13\": \"224\",\n    \"1.13.2\": \"224\"\n  },\n  \"minecraft:azure_bluet\": {\n    \"1.13\": \"122\",\n    \"1.13.2\": \"122\"\n  },\n  \"minecraft:barrier\": {\n    \"1.13\": \"354\",\n    \"1.13.2\": \"354\"\n  },\n  \"minecraft:beacon\": {\n    \"1.13\": \"257\",\n    \"1.13.2\": \"257\"\n  },\n  \"minecraft:bedrock\": {\n    \"1.13\": \"25\",\n    \"1.13.2\": \"25\"\n  },\n  \"minecraft:beetroots\": {\n    \"1.13\": \"470\",\n    \"1.13.2\": \"470\"\n  },\n  \"minecraft:birch_button\": {\n    \"1.13\": \"286\",\n    \"1.13.2\": \"286\"\n  },\n  \"minecraft:birch_door\": {\n    \"1.13\": \"459\",\n    \"1.13.2\": \"459\"\n  },\n  \"minecraft:birch_fence\": {\n    \"1.13\": \"454\",\n    \"1.13.2\": \"454\"\n  },\n  \"minecraft:birch_fence_gate\": {\n    \"1.13\": \"449\",\n    \"1.13.2\": \"449\"\n  },\n  \"minecraft:birch_leaves\": {\n    \"1.13\": \"60\",\n    \"1.13.2\": \"60\"\n  },\n  \"minecraft:birch_log\": {\n    \"1.13\": \"36\",\n    \"1.13.2\": \"36\"\n  },\n  \"minecraft:birch_planks\": {\n    \"1.13\": \"15\",\n    \"1.13.2\": \"15\"\n  },\n  \"minecraft:birch_pressure_plate\": {\n    \"1.13\": \"161\",\n    \"1.13.2\": \"161\"\n  },\n  \"minecraft:birch_sapling\": {\n    \"1.13\": \"21\",\n    \"1.13.2\": \"21\"\n  },\n  \"minecraft:birch_slab\": {\n    \"1.13\": \"430\",\n    \"1.13.2\": \"430\"\n  },\n  \"minecraft:birch_stairs\": {\n    \"1.13\": \"254\",\n    \"1.13.2\": \"254\"\n  },\n  \"minecraft:birch_trapdoor\": {\n    \"1.13\": \"204\",\n    \"1.13.2\": \"204\"\n  },\n  \"minecraft:birch_wood\": {\n    \"1.13\": \"48\",\n    \"1.13.2\": \"48\"\n  },\n  \"minecraft:black_banner\": {\n    \"1.13\": \"407\",\n    \"1.13.2\": \"407\"\n  },\n  \"minecraft:black_bed\": {\n    \"1.13\": \"89\",\n    \"1.13.2\": \"89\"\n  },\n  \"minecraft:black_carpet\": {\n    \"1.13\": \"382\",\n    \"1.13.2\": \"382\"\n  },\n  \"minecraft:black_concrete\": {\n    \"1.13\": \"530\",\n    \"1.13.2\": \"530\"\n  },\n  \"minecraft:black_concrete_powder\": {\n    \"1.13\": \"546\",\n    \"1.13.2\": \"546\"\n  },\n  \"minecraft:black_glazed_terracotta\": {\n    \"1.13\": \"514\",\n    \"1.13.2\": \"514\"\n  },\n  \"minecraft:black_shulker_box\": {\n    \"1.13\": \"498\",\n    \"1.13.2\": \"498\"\n  },\n  \"minecraft:black_stained_glass\": {\n    \"1.13\": \"201\",\n    \"1.13.2\": \"201\"\n  },\n  \"minecraft:black_stained_glass_pane\": {\n    \"1.13\": \"350\",\n    \"1.13.2\": \"350\"\n  },\n  \"minecraft:black_terracotta\": {\n    \"1.13\": \"334\",\n    \"1.13.2\": \"334\"\n  },\n  \"minecraft:black_wall_banner\": {\n    \"1.13\": \"423\",\n    \"1.13.2\": \"423\"\n  },\n  \"minecraft:black_wool\": {\n    \"1.13\": \"116\",\n    \"1.13.2\": \"116\"\n  },\n  \"minecraft:blue_banner\": {\n    \"1.13\": \"403\",\n    \"1.13.2\": \"403\"\n  },\n  \"minecraft:blue_bed\": {\n    \"1.13\": \"85\",\n    \"1.13.2\": \"85\"\n  },\n  \"minecraft:blue_carpet\": {\n    \"1.13\": \"378\",\n    \"1.13.2\": \"378\"\n  },\n  \"minecraft:blue_concrete\": {\n    \"1.13\": \"526\",\n    \"1.13.2\": \"526\"\n  },\n  \"minecraft:blue_concrete_powder\": {\n    \"1.13\": \"542\",\n    \"1.13.2\": \"542\"\n  },\n  \"minecraft:blue_glazed_terracotta\": {\n    \"1.13\": \"510\",\n    \"1.13.2\": \"510\"\n  },\n  \"minecraft:blue_ice\": {\n    \"1.13\": \"587\",\n    \"1.13.2\": \"592\"\n  },\n  \"minecraft:blue_orchid\": {\n    \"1.13\": \"120\",\n    \"1.13.2\": \"120\"\n  },\n  \"minecraft:blue_shulker_box\": {\n    \"1.13\": \"494\",\n    \"1.13.2\": \"494\"\n  },\n  \"minecraft:blue_stained_glass\": {\n    \"1.13\": \"197\",\n    \"1.13.2\": \"197\"\n  },\n  \"minecraft:blue_stained_glass_pane\": {\n    \"1.13\": \"346\",\n    \"1.13.2\": \"346\"\n  },\n  \"minecraft:blue_terracotta\": {\n    \"1.13\": \"330\",\n    \"1.13.2\": \"330\"\n  },\n  \"minecraft:blue_wall_banner\": {\n    \"1.13\": \"419\",\n    \"1.13.2\": \"419\"\n  },\n  \"minecraft:blue_wool\": {\n    \"1.13\": \"112\",\n    \"1.13.2\": \"112\"\n  },\n  \"minecraft:bone_block\": {\n    \"1.13\": \"479\",\n    \"1.13.2\": \"479\"\n  },\n  \"minecraft:bookshelf\": {\n    \"1.13\": \"134\",\n    \"1.13.2\": \"134\"\n  },\n  \"minecraft:brain_coral\": {\n    \"1.13\": \"562\",\n    \"1.13.2\": \"567\"\n  },\n  \"minecraft:brain_coral_block\": {\n    \"1.13\": \"557\",\n    \"1.13.2\": \"557\"\n  },\n  \"minecraft:brain_coral_fan\": {\n    \"1.13\": \"582\",\n    \"1.13.2\": \"587\"\n  },\n  \"minecraft:brain_coral_wall_fan\": {\n    \"1.13\": \"572\",\n    \"1.13.2\": \"577\"\n  },\n  \"minecraft:brewing_stand\": {\n    \"1.13\": \"239\",\n    \"1.13.2\": \"239\"\n  },\n  \"minecraft:brick_slab\": {\n    \"1.13\": \"438\",\n    \"1.13.2\": \"438\"\n  },\n  \"minecraft:brick_stairs\": {\n    \"1.13\": \"230\",\n    \"1.13.2\": \"230\"\n  },\n  \"minecraft:bricks\": {\n    \"1.13\": \"132\",\n    \"1.13.2\": \"132\"\n  },\n  \"minecraft:brown_banner\": {\n    \"1.13\": \"404\",\n    \"1.13.2\": \"404\"\n  },\n  \"minecraft:brown_bed\": {\n    \"1.13\": \"86\",\n    \"1.13.2\": \"86\"\n  },\n  \"minecraft:brown_carpet\": {\n    \"1.13\": \"379\",\n    \"1.13.2\": \"379\"\n  },\n  \"minecraft:brown_concrete\": {\n    \"1.13\": \"527\",\n    \"1.13.2\": \"527\"\n  },\n  \"minecraft:brown_concrete_powder\": {\n    \"1.13\": \"543\",\n    \"1.13.2\": \"543\"\n  },\n  \"minecraft:brown_glazed_terracotta\": {\n    \"1.13\": \"511\",\n    \"1.13.2\": \"511\"\n  },\n  \"minecraft:brown_mushroom\": {\n    \"1.13\": \"128\",\n    \"1.13.2\": \"128\"\n  },\n  \"minecraft:brown_mushroom_block\": {\n    \"1.13\": \"218\",\n    \"1.13.2\": \"218\"\n  },\n  \"minecraft:brown_shulker_box\": {\n    \"1.13\": \"495\",\n    \"1.13.2\": \"495\"\n  },\n  \"minecraft:brown_stained_glass\": {\n    \"1.13\": \"198\",\n    \"1.13.2\": \"198\"\n  },\n  \"minecraft:brown_stained_glass_pane\": {\n    \"1.13\": \"347\",\n    \"1.13.2\": \"347\"\n  },\n  \"minecraft:brown_terracotta\": {\n    \"1.13\": \"331\",\n    \"1.13.2\": \"331\"\n  },\n  \"minecraft:brown_wall_banner\": {\n    \"1.13\": \"420\",\n    \"1.13.2\": \"420\"\n  },\n  \"minecraft:brown_wool\": {\n    \"1.13\": \"113\",\n    \"1.13.2\": \"113\"\n  },\n  \"minecraft:bubble_column\": {\n    \"1.13\": \"591\",\n    \"1.13.2\": \"596\"\n  },\n  \"minecraft:bubble_coral\": {\n    \"1.13\": \"563\",\n    \"1.13.2\": \"568\"\n  },\n  \"minecraft:bubble_coral_block\": {\n    \"1.13\": \"558\",\n    \"1.13.2\": \"558\"\n  },\n  \"minecraft:bubble_coral_fan\": {\n    \"1.13\": \"583\",\n    \"1.13.2\": \"588\"\n  },\n  \"minecraft:bubble_coral_wall_fan\": {\n    \"1.13\": \"573\",\n    \"1.13.2\": \"578\"\n  },\n  \"minecraft:cactus\": {\n    \"1.13\": \"172\",\n    \"1.13.2\": \"172\"\n  },\n  \"minecraft:cake\": {\n    \"1.13\": \"184\",\n    \"1.13.2\": \"184\"\n  },\n  \"minecraft:carrots\": {\n    \"1.13\": \"282\",\n    \"1.13.2\": \"282\"\n  },\n  \"minecraft:carved_pumpkin\": {\n    \"1.13\": \"182\",\n    \"1.13.2\": \"182\"\n  },\n  \"minecraft:cauldron\": {\n    \"1.13\": \"240\",\n    \"1.13.2\": \"240\"\n  },\n  \"minecraft:cave_air\": {\n    \"1.13\": \"590\",\n    \"1.13.2\": \"595\"\n  },\n  \"minecraft:chain_command_block\": {\n    \"1.13\": \"474\",\n    \"1.13.2\": \"474\"\n  },\n  \"minecraft:chest\": {\n    \"1.13\": \"142\",\n    \"1.13.2\": \"142\"\n  },\n  \"minecraft:chipped_anvil\": {\n    \"1.13\": \"303\",\n    \"1.13.2\": \"303\"\n  },\n  \"minecraft:chiseled_quartz_block\": {\n    \"1.13\": \"314\",\n    \"1.13.2\": \"314\"\n  },\n  \"minecraft:chiseled_red_sandstone\": {\n    \"1.13\": \"425\",\n    \"1.13.2\": \"425\"\n  },\n  \"minecraft:chiseled_sandstone\": {\n    \"1.13\": \"71\",\n    \"1.13.2\": \"71\"\n  },\n  \"minecraft:chiseled_stone_bricks\": {\n    \"1.13\": \"217\",\n    \"1.13.2\": \"217\"\n  },\n  \"minecraft:chorus_flower\": {\n    \"1.13\": \"465\",\n    \"1.13.2\": \"465\"\n  },\n  \"minecraft:chorus_plant\": {\n    \"1.13\": \"464\",\n    \"1.13.2\": \"464\"\n  },\n  \"minecraft:clay\": {\n    \"1.13\": \"173\",\n    \"1.13.2\": \"173\"\n  },\n  \"minecraft:coal_block\": {\n    \"1.13\": \"384\",\n    \"1.13.2\": \"384\"\n  },\n  \"minecraft:coal_ore\": {\n    \"1.13\": \"33\",\n    \"1.13.2\": \"33\"\n  },\n  \"minecraft:coarse_dirt\": {\n    \"1.13\": \"10\",\n    \"1.13.2\": \"10\"\n  },\n  \"minecraft:cobblestone\": {\n    \"1.13\": \"12\",\n    \"1.13.2\": \"12\"\n  },\n  \"minecraft:cobblestone_slab\": {\n    \"1.13\": \"437\",\n    \"1.13.2\": \"437\"\n  },\n  \"minecraft:cobblestone_stairs\": {\n    \"1.13\": \"154\",\n    \"1.13.2\": \"154\"\n  },\n  \"minecraft:cobblestone_wall\": {\n    \"1.13\": \"258\",\n    \"1.13.2\": \"258\"\n  },\n  \"minecraft:cobweb\": {\n    \"1.13\": \"93\",\n    \"1.13.2\": \"93\"\n  },\n  \"minecraft:cocoa\": {\n    \"1.13\": \"246\",\n    \"1.13.2\": \"246\"\n  },\n  \"minecraft:command_block\": {\n    \"1.13\": \"256\",\n    \"1.13.2\": \"256\"\n  },\n  \"minecraft:comparator\": {\n    \"1.13\": \"308\",\n    \"1.13.2\": \"308\"\n  },\n  \"minecraft:conduit\": {\n    \"1.13\": \"588\",\n    \"1.13.2\": \"593\"\n  },\n  \"minecraft:cracked_stone_bricks\": {\n    \"1.13\": \"216\",\n    \"1.13.2\": \"216\"\n  },\n  \"minecraft:crafting_table\": {\n    \"1.13\": \"146\",\n    \"1.13.2\": \"146\"\n  },\n  \"minecraft:creeper_head\": {\n    \"1.13\": \"299\",\n    \"1.13.2\": \"299\"\n  },\n  \"minecraft:creeper_wall_head\": {\n    \"1.13\": \"298\",\n    \"1.13.2\": \"298\"\n  },\n  \"minecraft:cut_red_sandstone\": {\n    \"1.13\": \"426\",\n    \"1.13.2\": \"426\"\n  },\n  \"minecraft:cut_sandstone\": {\n    \"1.13\": \"72\",\n    \"1.13.2\": \"72\"\n  },\n  \"minecraft:cyan_banner\": {\n    \"1.13\": \"401\",\n    \"1.13.2\": \"401\"\n  },\n  \"minecraft:cyan_bed\": {\n    \"1.13\": \"83\",\n    \"1.13.2\": \"83\"\n  },\n  \"minecraft:cyan_carpet\": {\n    \"1.13\": \"376\",\n    \"1.13.2\": \"376\"\n  },\n  \"minecraft:cyan_concrete\": {\n    \"1.13\": \"524\",\n    \"1.13.2\": \"524\"\n  },\n  \"minecraft:cyan_concrete_powder\": {\n    \"1.13\": \"540\",\n    \"1.13.2\": \"540\"\n  },\n  \"minecraft:cyan_glazed_terracotta\": {\n    \"1.13\": \"508\",\n    \"1.13.2\": \"508\"\n  },\n  \"minecraft:cyan_shulker_box\": {\n    \"1.13\": \"492\",\n    \"1.13.2\": \"492\"\n  },\n  \"minecraft:cyan_stained_glass\": {\n    \"1.13\": \"195\",\n    \"1.13.2\": \"195\"\n  },\n  \"minecraft:cyan_stained_glass_pane\": {\n    \"1.13\": \"344\",\n    \"1.13.2\": \"344\"\n  },\n  \"minecraft:cyan_terracotta\": {\n    \"1.13\": \"328\",\n    \"1.13.2\": \"328\"\n  },\n  \"minecraft:cyan_wall_banner\": {\n    \"1.13\": \"417\",\n    \"1.13.2\": \"417\"\n  },\n  \"minecraft:cyan_wool\": {\n    \"1.13\": \"110\",\n    \"1.13.2\": \"110\"\n  },\n  \"minecraft:damaged_anvil\": {\n    \"1.13\": \"304\",\n    \"1.13.2\": \"304\"\n  },\n  \"minecraft:dandelion\": {\n    \"1.13\": \"118\",\n    \"1.13.2\": \"118\"\n  },\n  \"minecraft:dark_oak_button\": {\n    \"1.13\": \"289\",\n    \"1.13.2\": \"289\"\n  },\n  \"minecraft:dark_oak_door\": {\n    \"1.13\": \"462\",\n    \"1.13.2\": \"462\"\n  },\n  \"minecraft:dark_oak_fence\": {\n    \"1.13\": \"457\",\n    \"1.13.2\": \"457\"\n  },\n  \"minecraft:dark_oak_fence_gate\": {\n    \"1.13\": \"452\",\n    \"1.13.2\": \"452\"\n  },\n  \"minecraft:dark_oak_leaves\": {\n    \"1.13\": \"63\",\n    \"1.13.2\": \"63\"\n  },\n  \"minecraft:dark_oak_log\": {\n    \"1.13\": \"39\",\n    \"1.13.2\": \"39\"\n  },\n  \"minecraft:dark_oak_planks\": {\n    \"1.13\": \"18\",\n    \"1.13.2\": \"18\"\n  },\n  \"minecraft:dark_oak_pressure_plate\": {\n    \"1.13\": \"164\",\n    \"1.13.2\": \"164\"\n  },\n  \"minecraft:dark_oak_sapling\": {\n    \"1.13\": \"24\",\n    \"1.13.2\": \"24\"\n  },\n  \"minecraft:dark_oak_slab\": {\n    \"1.13\": \"433\",\n    \"1.13.2\": \"433\"\n  },\n  \"minecraft:dark_oak_stairs\": {\n    \"1.13\": \"352\",\n    \"1.13.2\": \"352\"\n  },\n  \"minecraft:dark_oak_trapdoor\": {\n    \"1.13\": \"207\",\n    \"1.13.2\": \"207\"\n  },\n  \"minecraft:dark_oak_wood\": {\n    \"1.13\": \"51\",\n    \"1.13.2\": \"51\"\n  },\n  \"minecraft:dark_prismarine\": {\n    \"1.13\": \"358\",\n    \"1.13.2\": \"358\"\n  },\n  \"minecraft:dark_prismarine_slab\": {\n    \"1.13\": \"364\",\n    \"1.13.2\": \"364\"\n  },\n  \"minecraft:dark_prismarine_stairs\": {\n    \"1.13\": \"361\",\n    \"1.13.2\": \"361\"\n  },\n  \"minecraft:daylight_detector\": {\n    \"1.13\": \"309\",\n    \"1.13.2\": \"309\"\n  },\n  \"minecraft:dead_brain_coral\": {\n    \"1.13.2\": \"562\"\n  },\n  \"minecraft:dead_brain_coral_block\": {\n    \"1.13\": \"552\",\n    \"1.13.2\": \"552\"\n  },\n  \"minecraft:dead_brain_coral_fan\": {\n    \"1.13\": \"577\",\n    \"1.13.2\": \"582\"\n  },\n  \"minecraft:dead_brain_coral_wall_fan\": {\n    \"1.13\": \"567\",\n    \"1.13.2\": \"572\"\n  },\n  \"minecraft:dead_bubble_coral\": {\n    \"1.13.2\": \"563\"\n  },\n  \"minecraft:dead_bubble_coral_block\": {\n    \"1.13\": \"553\",\n    \"1.13.2\": \"553\"\n  },\n  \"minecraft:dead_bubble_coral_fan\": {\n    \"1.13\": \"578\",\n    \"1.13.2\": \"583\"\n  },\n  \"minecraft:dead_bubble_coral_wall_fan\": {\n    \"1.13\": \"568\",\n    \"1.13.2\": \"573\"\n  },\n  \"minecraft:dead_bush\": {\n    \"1.13\": \"96\",\n    \"1.13.2\": \"96\"\n  },\n  \"minecraft:dead_fire_coral\": {\n    \"1.13.2\": \"564\"\n  },\n  \"minecraft:dead_fire_coral_block\": {\n    \"1.13\": \"554\",\n    \"1.13.2\": \"554\"\n  },\n  \"minecraft:dead_fire_coral_fan\": {\n    \"1.13\": \"579\",\n    \"1.13.2\": \"584\"\n  },\n  \"minecraft:dead_fire_coral_wall_fan\": {\n    \"1.13\": \"569\",\n    \"1.13.2\": \"574\"\n  },\n  \"minecraft:dead_horn_coral\": {\n    \"1.13.2\": \"565\"\n  },\n  \"minecraft:dead_horn_coral_block\": {\n    \"1.13\": \"555\",\n    \"1.13.2\": \"555\"\n  },\n  \"minecraft:dead_horn_coral_fan\": {\n    \"1.13\": \"580\",\n    \"1.13.2\": \"585\"\n  },\n  \"minecraft:dead_horn_coral_wall_fan\": {\n    \"1.13\": \"570\",\n    \"1.13.2\": \"575\"\n  },\n  \"minecraft:dead_tube_coral\": {\n    \"1.13.2\": \"561\"\n  },\n  \"minecraft:dead_tube_coral_block\": {\n    \"1.13\": \"551\",\n    \"1.13.2\": \"551\"\n  },\n  \"minecraft:dead_tube_coral_fan\": {\n    \"1.13\": \"576\",\n    \"1.13.2\": \"581\"\n  },\n  \"minecraft:dead_tube_coral_wall_fan\": {\n    \"1.13\": \"566\",\n    \"1.13.2\": \"571\"\n  },\n  \"minecraft:detector_rail\": {\n    \"1.13\": \"91\",\n    \"1.13.2\": \"91\"\n  },\n  \"minecraft:diamond_block\": {\n    \"1.13\": \"145\",\n    \"1.13.2\": \"145\"\n  },\n  \"minecraft:diamond_ore\": {\n    \"1.13\": \"144\",\n    \"1.13.2\": \"144\"\n  },\n  \"minecraft:diorite\": {\n    \"1.13\": \"4\",\n    \"1.13.2\": \"4\"\n  },\n  \"minecraft:dirt\": {\n    \"1.13\": \"9\",\n    \"1.13.2\": \"9\"\n  },\n  \"minecraft:dispenser\": {\n    \"1.13\": \"69\",\n    \"1.13.2\": \"69\"\n  },\n  \"minecraft:dragon_egg\": {\n    \"1.13\": \"244\",\n    \"1.13.2\": \"244\"\n  },\n  \"minecraft:dragon_head\": {\n    \"1.13\": \"301\",\n    \"1.13.2\": \"301\"\n  },\n  \"minecraft:dragon_wall_head\": {\n    \"1.13\": \"300\",\n    \"1.13.2\": \"300\"\n  },\n  \"minecraft:dried_kelp_block\": {\n    \"1.13\": \"549\",\n    \"1.13.2\": \"549\"\n  },\n  \"minecraft:dropper\": {\n    \"1.13\": \"318\",\n    \"1.13.2\": \"318\"\n  },\n  \"minecraft:emerald_block\": {\n    \"1.13\": \"252\",\n    \"1.13.2\": \"252\"\n  },\n  \"minecraft:emerald_ore\": {\n    \"1.13\": \"248\",\n    \"1.13.2\": \"248\"\n  },\n  \"minecraft:enchanting_table\": {\n    \"1.13\": \"238\",\n    \"1.13.2\": \"238\"\n  },\n  \"minecraft:end_gateway\": {\n    \"1.13\": \"472\",\n    \"1.13.2\": \"472\"\n  },\n  \"minecraft:end_portal\": {\n    \"1.13\": \"241\",\n    \"1.13.2\": \"241\"\n  },\n  \"minecraft:end_portal_frame\": {\n    \"1.13\": \"242\",\n    \"1.13.2\": \"242\"\n  },\n  \"minecraft:end_rod\": {\n    \"1.13\": \"463\",\n    \"1.13.2\": \"463\"\n  },\n  \"minecraft:end_stone\": {\n    \"1.13\": \"243\",\n    \"1.13.2\": \"243\"\n  },\n  \"minecraft:end_stone_bricks\": {\n    \"1.13\": \"469\",\n    \"1.13.2\": \"469\"\n  },\n  \"minecraft:ender_chest\": {\n    \"1.13\": \"249\",\n    \"1.13.2\": \"249\"\n  },\n  \"minecraft:farmland\": {\n    \"1.13\": \"148\",\n    \"1.13.2\": \"148\"\n  },\n  \"minecraft:fern\": {\n    \"1.13\": \"95\",\n    \"1.13.2\": \"95\"\n  },\n  \"minecraft:fire\": {\n    \"1.13\": \"139\",\n    \"1.13.2\": \"139\"\n  },\n  \"minecraft:fire_coral\": {\n    \"1.13\": \"564\",\n    \"1.13.2\": \"569\"\n  },\n  \"minecraft:fire_coral_block\": {\n    \"1.13\": \"559\",\n    \"1.13.2\": \"559\"\n  },\n  \"minecraft:fire_coral_fan\": {\n    \"1.13\": \"584\",\n    \"1.13.2\": \"589\"\n  },\n  \"minecraft:fire_coral_wall_fan\": {\n    \"1.13\": \"574\",\n    \"1.13.2\": \"579\"\n  },\n  \"minecraft:flower_pot\": {\n    \"1.13\": \"260\",\n    \"1.13.2\": \"260\"\n  },\n  \"minecraft:frosted_ice\": {\n    \"1.13\": \"475\",\n    \"1.13.2\": \"475\"\n  },\n  \"minecraft:furnace\": {\n    \"1.13\": \"149\",\n    \"1.13.2\": \"149\"\n  },\n  \"minecraft:glass\": {\n    \"1.13\": \"66\",\n    \"1.13.2\": \"66\"\n  },\n  \"minecraft:glass_pane\": {\n    \"1.13\": \"222\",\n    \"1.13.2\": \"222\"\n  },\n  \"minecraft:glowstone\": {\n    \"1.13\": \"180\",\n    \"1.13.2\": \"180\"\n  },\n  \"minecraft:gold_block\": {\n    \"1.13\": \"130\",\n    \"1.13.2\": \"130\"\n  },\n  \"minecraft:gold_ore\": {\n    \"1.13\": \"31\",\n    \"1.13.2\": \"31\"\n  },\n  \"minecraft:granite\": {\n    \"1.13\": \"2\",\n    \"1.13.2\": \"2\"\n  },\n  \"minecraft:short_grass\": {\n    \"1.13\": \"94\",\n    \"1.13.2\": \"94\"\n  },\n  \"minecraft:grass_block\": {\n    \"1.13\": \"8\",\n    \"1.13.2\": \"8\"\n  },\n  \"minecraft:gravel\": {\n    \"1.13\": \"30\",\n    \"1.13.2\": \"30\"\n  },\n  \"minecraft:gray_banner\": {\n    \"1.13\": \"399\",\n    \"1.13.2\": \"399\"\n  },\n  \"minecraft:gray_bed\": {\n    \"1.13\": \"81\",\n    \"1.13.2\": \"81\"\n  },\n  \"minecraft:gray_carpet\": {\n    \"1.13\": \"374\",\n    \"1.13.2\": \"374\"\n  },\n  \"minecraft:gray_concrete\": {\n    \"1.13\": \"522\",\n    \"1.13.2\": \"522\"\n  },\n  \"minecraft:gray_concrete_powder\": {\n    \"1.13\": \"538\",\n    \"1.13.2\": \"538\"\n  },\n  \"minecraft:gray_glazed_terracotta\": {\n    \"1.13\": \"506\",\n    \"1.13.2\": \"506\"\n  },\n  \"minecraft:gray_shulker_box\": {\n    \"1.13\": \"490\",\n    \"1.13.2\": \"490\"\n  },\n  \"minecraft:gray_stained_glass\": {\n    \"1.13\": \"193\",\n    \"1.13.2\": \"193\"\n  },\n  \"minecraft:gray_stained_glass_pane\": {\n    \"1.13\": \"342\",\n    \"1.13.2\": \"342\"\n  },\n  \"minecraft:gray_terracotta\": {\n    \"1.13\": \"326\",\n    \"1.13.2\": \"326\"\n  },\n  \"minecraft:gray_wall_banner\": {\n    \"1.13\": \"415\",\n    \"1.13.2\": \"415\"\n  },\n  \"minecraft:gray_wool\": {\n    \"1.13\": \"108\",\n    \"1.13.2\": \"108\"\n  },\n  \"minecraft:green_banner\": {\n    \"1.13\": \"405\",\n    \"1.13.2\": \"405\"\n  },\n  \"minecraft:green_bed\": {\n    \"1.13\": \"87\",\n    \"1.13.2\": \"87\"\n  },\n  \"minecraft:green_carpet\": {\n    \"1.13\": \"380\",\n    \"1.13.2\": \"380\"\n  },\n  \"minecraft:green_concrete\": {\n    \"1.13\": \"528\",\n    \"1.13.2\": \"528\"\n  },\n  \"minecraft:green_concrete_powder\": {\n    \"1.13\": \"544\",\n    \"1.13.2\": \"544\"\n  },\n  \"minecraft:green_glazed_terracotta\": {\n    \"1.13\": \"512\",\n    \"1.13.2\": \"512\"\n  },\n  \"minecraft:green_shulker_box\": {\n    \"1.13\": \"496\",\n    \"1.13.2\": \"496\"\n  },\n  \"minecraft:green_stained_glass\": {\n    \"1.13\": \"199\",\n    \"1.13.2\": \"199\"\n  },\n  \"minecraft:green_stained_glass_pane\": {\n    \"1.13\": \"348\",\n    \"1.13.2\": \"348\"\n  },\n  \"minecraft:green_terracotta\": {\n    \"1.13\": \"332\",\n    \"1.13.2\": \"332\"\n  },\n  \"minecraft:green_wall_banner\": {\n    \"1.13\": \"421\",\n    \"1.13.2\": \"421\"\n  },\n  \"minecraft:green_wool\": {\n    \"1.13\": \"114\",\n    \"1.13.2\": \"114\"\n  },\n  \"minecraft:hay_block\": {\n    \"1.13\": \"366\",\n    \"1.13.2\": \"366\"\n  },\n  \"minecraft:heavy_weighted_pressure_plate\": {\n    \"1.13\": \"307\",\n    \"1.13.2\": \"307\"\n  },\n  \"minecraft:hopper\": {\n    \"1.13\": \"312\",\n    \"1.13.2\": \"312\"\n  },\n  \"minecraft:horn_coral\": {\n    \"1.13\": \"565\",\n    \"1.13.2\": \"570\"\n  },\n  \"minecraft:horn_coral_block\": {\n    \"1.13\": \"560\",\n    \"1.13.2\": \"560\"\n  },\n  \"minecraft:horn_coral_fan\": {\n    \"1.13\": \"585\",\n    \"1.13.2\": \"590\"\n  },\n  \"minecraft:horn_coral_wall_fan\": {\n    \"1.13\": \"575\",\n    \"1.13.2\": \"580\"\n  },\n  \"minecraft:ice\": {\n    \"1.13\": \"170\",\n    \"1.13.2\": \"170\"\n  },\n  \"minecraft:infested_chiseled_stone_bricks\": {\n    \"1.13\": \"213\",\n    \"1.13.2\": \"213\"\n  },\n  \"minecraft:infested_cobblestone\": {\n    \"1.13\": \"209\",\n    \"1.13.2\": \"209\"\n  },\n  \"minecraft:infested_cracked_stone_bricks\": {\n    \"1.13\": \"212\",\n    \"1.13.2\": \"212\"\n  },\n  \"minecraft:infested_mossy_stone_bricks\": {\n    \"1.13\": \"211\",\n    \"1.13.2\": \"211\"\n  },\n  \"minecraft:infested_stone\": {\n    \"1.13\": \"208\",\n    \"1.13.2\": \"208\"\n  },\n  \"minecraft:infested_stone_bricks\": {\n    \"1.13\": \"210\",\n    \"1.13.2\": \"210\"\n  },\n  \"minecraft:iron_bars\": {\n    \"1.13\": \"221\",\n    \"1.13.2\": \"221\"\n  },\n  \"minecraft:iron_block\": {\n    \"1.13\": \"131\",\n    \"1.13.2\": \"131\"\n  },\n  \"minecraft:iron_door\": {\n    \"1.13\": \"158\",\n    \"1.13.2\": \"158\"\n  },\n  \"minecraft:iron_ore\": {\n    \"1.13\": \"32\",\n    \"1.13.2\": \"32\"\n  },\n  \"minecraft:iron_trapdoor\": {\n    \"1.13\": \"355\",\n    \"1.13.2\": \"355\"\n  },\n  \"minecraft:jack_o_lantern\": {\n    \"1.13\": \"183\",\n    \"1.13.2\": \"183\"\n  },\n  \"minecraft:jukebox\": {\n    \"1.13\": \"175\",\n    \"1.13.2\": \"175\"\n  },\n  \"minecraft:jungle_button\": {\n    \"1.13\": \"287\",\n    \"1.13.2\": \"287\"\n  },\n  \"minecraft:jungle_door\": {\n    \"1.13\": \"460\",\n    \"1.13.2\": \"460\"\n  },\n  \"minecraft:jungle_fence\": {\n    \"1.13\": \"455\",\n    \"1.13.2\": \"455\"\n  },\n  \"minecraft:jungle_fence_gate\": {\n    \"1.13\": \"450\",\n    \"1.13.2\": \"450\"\n  },\n  \"minecraft:jungle_leaves\": {\n    \"1.13\": \"61\",\n    \"1.13.2\": \"61\"\n  },\n  \"minecraft:jungle_log\": {\n    \"1.13\": \"37\",\n    \"1.13.2\": \"37\"\n  },\n  \"minecraft:jungle_planks\": {\n    \"1.13\": \"16\",\n    \"1.13.2\": \"16\"\n  },\n  \"minecraft:jungle_pressure_plate\": {\n    \"1.13\": \"162\",\n    \"1.13.2\": \"162\"\n  },\n  \"minecraft:jungle_sapling\": {\n    \"1.13\": \"22\",\n    \"1.13.2\": \"22\"\n  },\n  \"minecraft:jungle_slab\": {\n    \"1.13\": \"431\",\n    \"1.13.2\": \"431\"\n  },\n  \"minecraft:jungle_stairs\": {\n    \"1.13\": \"255\",\n    \"1.13.2\": \"255\"\n  },\n  \"minecraft:jungle_trapdoor\": {\n    \"1.13\": \"205\",\n    \"1.13.2\": \"205\"\n  },\n  \"minecraft:jungle_wood\": {\n    \"1.13\": \"49\",\n    \"1.13.2\": \"49\"\n  },\n  \"minecraft:kelp\": {\n    \"1.13\": \"547\",\n    \"1.13.2\": \"547\"\n  },\n  \"minecraft:kelp_plant\": {\n    \"1.13\": \"548\",\n    \"1.13.2\": \"548\"\n  },\n  \"minecraft:ladder\": {\n    \"1.13\": \"152\",\n    \"1.13.2\": \"152\"\n  },\n  \"minecraft:lapis_block\": {\n    \"1.13\": \"68\",\n    \"1.13.2\": \"68\"\n  },\n  \"minecraft:lapis_ore\": {\n    \"1.13\": \"67\",\n    \"1.13.2\": \"67\"\n  },\n  \"minecraft:large_fern\": {\n    \"1.13\": \"391\",\n    \"1.13.2\": \"391\"\n  },\n  \"minecraft:lava\": {\n    \"1.13\": \"27\",\n    \"1.13.2\": \"27\"\n  },\n  \"minecraft:lever\": {\n    \"1.13\": \"156\",\n    \"1.13.2\": \"156\"\n  },\n  \"minecraft:light_blue_banner\": {\n    \"1.13\": \"395\",\n    \"1.13.2\": \"395\"\n  },\n  \"minecraft:light_blue_bed\": {\n    \"1.13\": \"77\",\n    \"1.13.2\": \"77\"\n  },\n  \"minecraft:light_blue_carpet\": {\n    \"1.13\": \"370\",\n    \"1.13.2\": \"370\"\n  },\n  \"minecraft:light_blue_concrete\": {\n    \"1.13\": \"518\",\n    \"1.13.2\": \"518\"\n  },\n  \"minecraft:light_blue_concrete_powder\": {\n    \"1.13\": \"534\",\n    \"1.13.2\": \"534\"\n  },\n  \"minecraft:light_blue_glazed_terracotta\": {\n    \"1.13\": \"502\",\n    \"1.13.2\": \"502\"\n  },\n  \"minecraft:light_blue_shulker_box\": {\n    \"1.13\": \"486\",\n    \"1.13.2\": \"486\"\n  },\n  \"minecraft:light_blue_stained_glass\": {\n    \"1.13\": \"189\",\n    \"1.13.2\": \"189\"\n  },\n  \"minecraft:light_blue_stained_glass_pane\": {\n    \"1.13\": \"338\",\n    \"1.13.2\": \"338\"\n  },\n  \"minecraft:light_blue_terracotta\": {\n    \"1.13\": \"322\",\n    \"1.13.2\": \"322\"\n  },\n  \"minecraft:light_blue_wall_banner\": {\n    \"1.13\": \"411\",\n    \"1.13.2\": \"411\"\n  },\n  \"minecraft:light_blue_wool\": {\n    \"1.13\": \"104\",\n    \"1.13.2\": \"104\"\n  },\n  \"minecraft:light_gray_banner\": {\n    \"1.13\": \"400\",\n    \"1.13.2\": \"400\"\n  },\n  \"minecraft:light_gray_bed\": {\n    \"1.13\": \"82\",\n    \"1.13.2\": \"82\"\n  },\n  \"minecraft:light_gray_carpet\": {\n    \"1.13\": \"375\",\n    \"1.13.2\": \"375\"\n  },\n  \"minecraft:light_gray_concrete\": {\n    \"1.13\": \"523\",\n    \"1.13.2\": \"523\"\n  },\n  \"minecraft:light_gray_concrete_powder\": {\n    \"1.13\": \"539\",\n    \"1.13.2\": \"539\"\n  },\n  \"minecraft:light_gray_glazed_terracotta\": {\n    \"1.13\": \"507\",\n    \"1.13.2\": \"507\"\n  },\n  \"minecraft:light_gray_shulker_box\": {\n    \"1.13\": \"491\",\n    \"1.13.2\": \"491\"\n  },\n  \"minecraft:light_gray_stained_glass\": {\n    \"1.13\": \"194\",\n    \"1.13.2\": \"194\"\n  },\n  \"minecraft:light_gray_stained_glass_pane\": {\n    \"1.13\": \"343\",\n    \"1.13.2\": \"343\"\n  },\n  \"minecraft:light_gray_terracotta\": {\n    \"1.13\": \"327\",\n    \"1.13.2\": \"327\"\n  },\n  \"minecraft:light_gray_wall_banner\": {\n    \"1.13\": \"416\",\n    \"1.13.2\": \"416\"\n  },\n  \"minecraft:light_gray_wool\": {\n    \"1.13\": \"109\",\n    \"1.13.2\": \"109\"\n  },\n  \"minecraft:light_weighted_pressure_plate\": {\n    \"1.13\": \"306\",\n    \"1.13.2\": \"306\"\n  },\n  \"minecraft:lilac\": {\n    \"1.13\": \"387\",\n    \"1.13.2\": \"387\"\n  },\n  \"minecraft:lily_pad\": {\n    \"1.13\": \"233\",\n    \"1.13.2\": \"233\"\n  },\n  \"minecraft:lime_banner\": {\n    \"1.13\": \"397\",\n    \"1.13.2\": \"397\"\n  },\n  \"minecraft:lime_bed\": {\n    \"1.13\": \"79\",\n    \"1.13.2\": \"79\"\n  },\n  \"minecraft:lime_carpet\": {\n    \"1.13\": \"372\",\n    \"1.13.2\": \"372\"\n  },\n  \"minecraft:lime_concrete\": {\n    \"1.13\": \"520\",\n    \"1.13.2\": \"520\"\n  },\n  \"minecraft:lime_concrete_powder\": {\n    \"1.13\": \"536\",\n    \"1.13.2\": \"536\"\n  },\n  \"minecraft:lime_glazed_terracotta\": {\n    \"1.13\": \"504\",\n    \"1.13.2\": \"504\"\n  },\n  \"minecraft:lime_shulker_box\": {\n    \"1.13\": \"488\",\n    \"1.13.2\": \"488\"\n  },\n  \"minecraft:lime_stained_glass\": {\n    \"1.13\": \"191\",\n    \"1.13.2\": \"191\"\n  },\n  \"minecraft:lime_stained_glass_pane\": {\n    \"1.13\": \"340\",\n    \"1.13.2\": \"340\"\n  },\n  \"minecraft:lime_terracotta\": {\n    \"1.13\": \"324\",\n    \"1.13.2\": \"324\"\n  },\n  \"minecraft:lime_wall_banner\": {\n    \"1.13\": \"413\",\n    \"1.13.2\": \"413\"\n  },\n  \"minecraft:lime_wool\": {\n    \"1.13\": \"106\",\n    \"1.13.2\": \"106\"\n  },\n  \"minecraft:magenta_banner\": {\n    \"1.13\": \"394\",\n    \"1.13.2\": \"394\"\n  },\n  \"minecraft:magenta_bed\": {\n    \"1.13\": \"76\",\n    \"1.13.2\": \"76\"\n  },\n  \"minecraft:magenta_carpet\": {\n    \"1.13\": \"369\",\n    \"1.13.2\": \"369\"\n  },\n  \"minecraft:magenta_concrete\": {\n    \"1.13\": \"517\",\n    \"1.13.2\": \"517\"\n  },\n  \"minecraft:magenta_concrete_powder\": {\n    \"1.13\": \"533\",\n    \"1.13.2\": \"533\"\n  },\n  \"minecraft:magenta_glazed_terracotta\": {\n    \"1.13\": \"501\",\n    \"1.13.2\": \"501\"\n  },\n  \"minecraft:magenta_shulker_box\": {\n    \"1.13\": \"485\",\n    \"1.13.2\": \"485\"\n  },\n  \"minecraft:magenta_stained_glass\": {\n    \"1.13\": \"188\",\n    \"1.13.2\": \"188\"\n  },\n  \"minecraft:magenta_stained_glass_pane\": {\n    \"1.13\": \"337\",\n    \"1.13.2\": \"337\"\n  },\n  \"minecraft:magenta_terracotta\": {\n    \"1.13\": \"321\",\n    \"1.13.2\": \"321\"\n  },\n  \"minecraft:magenta_wall_banner\": {\n    \"1.13\": \"410\",\n    \"1.13.2\": \"410\"\n  },\n  \"minecraft:magenta_wool\": {\n    \"1.13\": \"103\",\n    \"1.13.2\": \"103\"\n  },\n  \"minecraft:magma_block\": {\n    \"1.13\": \"476\",\n    \"1.13.2\": \"476\"\n  },\n  \"minecraft:melon\": {\n    \"1.13\": \"223\",\n    \"1.13.2\": \"223\"\n  },\n  \"minecraft:melon_stem\": {\n    \"1.13\": \"227\",\n    \"1.13.2\": \"227\"\n  },\n  \"minecraft:mossy_cobblestone\": {\n    \"1.13\": \"135\",\n    \"1.13.2\": \"135\"\n  },\n  \"minecraft:mossy_cobblestone_wall\": {\n    \"1.13\": \"259\",\n    \"1.13.2\": \"259\"\n  },\n  \"minecraft:mossy_stone_bricks\": {\n    \"1.13\": \"215\",\n    \"1.13.2\": \"215\"\n  },\n  \"minecraft:moving_piston\": {\n    \"1.13\": \"117\",\n    \"1.13.2\": \"117\"\n  },\n  \"minecraft:mushroom_stem\": {\n    \"1.13\": \"220\",\n    \"1.13.2\": \"220\"\n  },\n  \"minecraft:mycelium\": {\n    \"1.13\": \"232\",\n    \"1.13.2\": \"232\"\n  },\n  \"minecraft:nether_brick_fence\": {\n    \"1.13\": \"235\",\n    \"1.13.2\": \"235\"\n  },\n  \"minecraft:nether_brick_slab\": {\n    \"1.13\": \"440\",\n    \"1.13.2\": \"440\"\n  },\n  \"minecraft:nether_brick_stairs\": {\n    \"1.13\": \"236\",\n    \"1.13.2\": \"236\"\n  },\n  \"minecraft:nether_bricks\": {\n    \"1.13\": \"234\",\n    \"1.13.2\": \"234\"\n  },\n  \"minecraft:nether_portal\": {\n    \"1.13\": \"181\",\n    \"1.13.2\": \"181\"\n  },\n  \"minecraft:nether_quartz_ore\": {\n    \"1.13\": \"311\",\n    \"1.13.2\": \"311\"\n  },\n  \"minecraft:nether_wart\": {\n    \"1.13\": \"237\",\n    \"1.13.2\": \"237\"\n  },\n  \"minecraft:nether_wart_block\": {\n    \"1.13\": \"477\",\n    \"1.13.2\": \"477\"\n  },\n  \"minecraft:netherrack\": {\n    \"1.13\": \"178\",\n    \"1.13.2\": \"178\"\n  },\n  \"minecraft:note_block\": {\n    \"1.13\": \"73\",\n    \"1.13.2\": \"73\"\n  },\n  \"minecraft:oak_button\": {\n    \"1.13\": \"284\",\n    \"1.13.2\": \"284\"\n  },\n  \"minecraft:oak_door\": {\n    \"1.13\": \"151\",\n    \"1.13.2\": \"151\"\n  },\n  \"minecraft:oak_fence\": {\n    \"1.13\": \"176\",\n    \"1.13.2\": \"176\"\n  },\n  \"minecraft:oak_fence_gate\": {\n    \"1.13\": \"229\",\n    \"1.13.2\": \"229\"\n  },\n  \"minecraft:oak_leaves\": {\n    \"1.13\": \"58\",\n    \"1.13.2\": \"58\"\n  },\n  \"minecraft:oak_log\": {\n    \"1.13\": \"34\",\n    \"1.13.2\": \"34\"\n  },\n  \"minecraft:oak_planks\": {\n    \"1.13\": \"13\",\n    \"1.13.2\": \"13\"\n  },\n  \"minecraft:oak_pressure_plate\": {\n    \"1.13\": \"159\",\n    \"1.13.2\": \"159\"\n  },\n  \"minecraft:oak_sapling\": {\n    \"1.13\": \"19\",\n    \"1.13.2\": \"19\"\n  },\n  \"minecraft:oak_sign\": {\n    \"1.13\": \"150\",\n    \"1.13.2\": \"150\"\n  },\n  \"minecraft:oak_slab\": {\n    \"1.13\": \"428\",\n    \"1.13.2\": \"428\"\n  },\n  \"minecraft:oak_stairs\": {\n    \"1.13\": \"141\",\n    \"1.13.2\": \"141\"\n  },\n  \"minecraft:oak_trapdoor\": {\n    \"1.13\": \"202\",\n    \"1.13.2\": \"202\"\n  },\n  \"minecraft:oak_wall_sign\": {\n    \"1.13\": \"155\",\n    \"1.13.2\": \"155\"\n  },\n  \"minecraft:oak_wood\": {\n    \"1.13\": \"46\",\n    \"1.13.2\": \"46\"\n  },\n  \"minecraft:observer\": {\n    \"1.13\": \"481\",\n    \"1.13.2\": \"481\"\n  },\n  \"minecraft:obsidian\": {\n    \"1.13\": \"136\",\n    \"1.13.2\": \"136\"\n  },\n  \"minecraft:orange_banner\": {\n    \"1.13\": \"393\",\n    \"1.13.2\": \"393\"\n  },\n  \"minecraft:orange_bed\": {\n    \"1.13\": \"75\",\n    \"1.13.2\": \"75\"\n  },\n  \"minecraft:orange_carpet\": {\n    \"1.13\": \"368\",\n    \"1.13.2\": \"368\"\n  },\n  \"minecraft:orange_concrete\": {\n    \"1.13\": \"516\",\n    \"1.13.2\": \"516\"\n  },\n  \"minecraft:orange_concrete_powder\": {\n    \"1.13\": \"532\",\n    \"1.13.2\": \"532\"\n  },\n  \"minecraft:orange_glazed_terracotta\": {\n    \"1.13\": \"500\",\n    \"1.13.2\": \"500\"\n  },\n  \"minecraft:orange_shulker_box\": {\n    \"1.13\": \"484\",\n    \"1.13.2\": \"484\"\n  },\n  \"minecraft:orange_stained_glass\": {\n    \"1.13\": \"187\",\n    \"1.13.2\": \"187\"\n  },\n  \"minecraft:orange_stained_glass_pane\": {\n    \"1.13\": \"336\",\n    \"1.13.2\": \"336\"\n  },\n  \"minecraft:orange_terracotta\": {\n    \"1.13\": \"320\",\n    \"1.13.2\": \"320\"\n  },\n  \"minecraft:orange_tulip\": {\n    \"1.13\": \"124\",\n    \"1.13.2\": \"124\"\n  },\n  \"minecraft:orange_wall_banner\": {\n    \"1.13\": \"409\",\n    \"1.13.2\": \"409\"\n  },\n  \"minecraft:orange_wool\": {\n    \"1.13\": \"102\",\n    \"1.13.2\": \"102\"\n  },\n  \"minecraft:oxeye_daisy\": {\n    \"1.13\": \"127\",\n    \"1.13.2\": \"127\"\n  },\n  \"minecraft:packed_ice\": {\n    \"1.13\": \"385\",\n    \"1.13.2\": \"385\"\n  },\n  \"minecraft:peony\": {\n    \"1.13\": \"389\",\n    \"1.13.2\": \"389\"\n  },\n  \"minecraft:petrified_oak_slab\": {\n    \"1.13\": \"436\",\n    \"1.13.2\": \"436\"\n  },\n  \"minecraft:pink_banner\": {\n    \"1.13\": \"398\",\n    \"1.13.2\": \"398\"\n  },\n  \"minecraft:pink_bed\": {\n    \"1.13\": \"80\",\n    \"1.13.2\": \"80\"\n  },\n  \"minecraft:pink_carpet\": {\n    \"1.13\": \"373\",\n    \"1.13.2\": \"373\"\n  },\n  \"minecraft:pink_concrete\": {\n    \"1.13\": \"521\",\n    \"1.13.2\": \"521\"\n  },\n  \"minecraft:pink_concrete_powder\": {\n    \"1.13\": \"537\",\n    \"1.13.2\": \"537\"\n  },\n  \"minecraft:pink_glazed_terracotta\": {\n    \"1.13\": \"505\",\n    \"1.13.2\": \"505\"\n  },\n  \"minecraft:pink_shulker_box\": {\n    \"1.13\": \"489\",\n    \"1.13.2\": \"489\"\n  },\n  \"minecraft:pink_stained_glass\": {\n    \"1.13\": \"192\",\n    \"1.13.2\": \"192\"\n  },\n  \"minecraft:pink_stained_glass_pane\": {\n    \"1.13\": \"341\",\n    \"1.13.2\": \"341\"\n  },\n  \"minecraft:pink_terracotta\": {\n    \"1.13\": \"325\",\n    \"1.13.2\": \"325\"\n  },\n  \"minecraft:pink_tulip\": {\n    \"1.13\": \"126\",\n    \"1.13.2\": \"126\"\n  },\n  \"minecraft:pink_wall_banner\": {\n    \"1.13\": \"414\",\n    \"1.13.2\": \"414\"\n  },\n  \"minecraft:pink_wool\": {\n    \"1.13\": \"107\",\n    \"1.13.2\": \"107\"\n  },\n  \"minecraft:piston\": {\n    \"1.13\": \"99\",\n    \"1.13.2\": \"99\"\n  },\n  \"minecraft:piston_head\": {\n    \"1.13\": \"100\",\n    \"1.13.2\": \"100\"\n  },\n  \"minecraft:player_head\": {\n    \"1.13\": \"297\",\n    \"1.13.2\": \"297\"\n  },\n  \"minecraft:player_wall_head\": {\n    \"1.13\": \"296\",\n    \"1.13.2\": \"296\"\n  },\n  \"minecraft:podzol\": {\n    \"1.13\": \"11\",\n    \"1.13.2\": \"11\"\n  },\n  \"minecraft:polished_andesite\": {\n    \"1.13\": \"7\",\n    \"1.13.2\": \"7\"\n  },\n  \"minecraft:polished_diorite\": {\n    \"1.13\": \"5\",\n    \"1.13.2\": \"5\"\n  },\n  \"minecraft:polished_granite\": {\n    \"1.13\": \"3\",\n    \"1.13.2\": \"3\"\n  },\n  \"minecraft:poppy\": {\n    \"1.13\": \"119\",\n    \"1.13.2\": \"119\"\n  },\n  \"minecraft:potatoes\": {\n    \"1.13\": \"283\",\n    \"1.13.2\": \"283\"\n  },\n  \"minecraft:potted_acacia_sapling\": {\n    \"1.13\": \"265\",\n    \"1.13.2\": \"265\"\n  },\n  \"minecraft:potted_allium\": {\n    \"1.13\": \"271\",\n    \"1.13.2\": \"271\"\n  },\n  \"minecraft:potted_azure_bluet\": {\n    \"1.13\": \"272\",\n    \"1.13.2\": \"272\"\n  },\n  \"minecraft:potted_birch_sapling\": {\n    \"1.13\": \"263\",\n    \"1.13.2\": \"263\"\n  },\n  \"minecraft:potted_blue_orchid\": {\n    \"1.13\": \"270\",\n    \"1.13.2\": \"270\"\n  },\n  \"minecraft:potted_brown_mushroom\": {\n    \"1.13\": \"279\",\n    \"1.13.2\": \"279\"\n  },\n  \"minecraft:potted_cactus\": {\n    \"1.13\": \"281\",\n    \"1.13.2\": \"281\"\n  },\n  \"minecraft:potted_dandelion\": {\n    \"1.13\": \"268\",\n    \"1.13.2\": \"268\"\n  },\n  \"minecraft:potted_dark_oak_sapling\": {\n    \"1.13\": \"266\",\n    \"1.13.2\": \"266\"\n  },\n  \"minecraft:potted_dead_bush\": {\n    \"1.13\": \"280\",\n    \"1.13.2\": \"280\"\n  },\n  \"minecraft:potted_fern\": {\n    \"1.13\": \"267\",\n    \"1.13.2\": \"267\"\n  },\n  \"minecraft:potted_jungle_sapling\": {\n    \"1.13\": \"264\",\n    \"1.13.2\": \"264\"\n  },\n  \"minecraft:potted_oak_sapling\": {\n    \"1.13\": \"261\",\n    \"1.13.2\": \"261\"\n  },\n  \"minecraft:potted_orange_tulip\": {\n    \"1.13\": \"274\",\n    \"1.13.2\": \"274\"\n  },\n  \"minecraft:potted_oxeye_daisy\": {\n    \"1.13\": \"277\",\n    \"1.13.2\": \"277\"\n  },\n  \"minecraft:potted_pink_tulip\": {\n    \"1.13\": \"276\",\n    \"1.13.2\": \"276\"\n  },\n  \"minecraft:potted_poppy\": {\n    \"1.13\": \"269\",\n    \"1.13.2\": \"269\"\n  },\n  \"minecraft:potted_red_mushroom\": {\n    \"1.13\": \"278\",\n    \"1.13.2\": \"278\"\n  },\n  \"minecraft:potted_red_tulip\": {\n    \"1.13\": \"273\",\n    \"1.13.2\": \"273\"\n  },\n  \"minecraft:potted_spruce_sapling\": {\n    \"1.13\": \"262\",\n    \"1.13.2\": \"262\"\n  },\n  \"minecraft:potted_white_tulip\": {\n    \"1.13\": \"275\",\n    \"1.13.2\": \"275\"\n  },\n  \"minecraft:powered_rail\": {\n    \"1.13\": \"90\",\n    \"1.13.2\": \"90\"\n  },\n  \"minecraft:prismarine\": {\n    \"1.13\": \"356\",\n    \"1.13.2\": \"356\"\n  },\n  \"minecraft:prismarine_brick_slab\": {\n    \"1.13\": \"363\",\n    \"1.13.2\": \"363\"\n  },\n  \"minecraft:prismarine_brick_stairs\": {\n    \"1.13\": \"360\",\n    \"1.13.2\": \"360\"\n  },\n  \"minecraft:prismarine_bricks\": {\n    \"1.13\": \"357\",\n    \"1.13.2\": \"357\"\n  },\n  \"minecraft:prismarine_slab\": {\n    \"1.13\": \"362\",\n    \"1.13.2\": \"362\"\n  },\n  \"minecraft:prismarine_stairs\": {\n    \"1.13\": \"359\",\n    \"1.13.2\": \"359\"\n  },\n  \"minecraft:pumpkin\": {\n    \"1.13\": \"177\",\n    \"1.13.2\": \"177\"\n  },\n  \"minecraft:pumpkin_stem\": {\n    \"1.13\": \"226\",\n    \"1.13.2\": \"226\"\n  },\n  \"minecraft:purple_banner\": {\n    \"1.13\": \"402\",\n    \"1.13.2\": \"402\"\n  },\n  \"minecraft:purple_bed\": {\n    \"1.13\": \"84\",\n    \"1.13.2\": \"84\"\n  },\n  \"minecraft:purple_carpet\": {\n    \"1.13\": \"377\",\n    \"1.13.2\": \"377\"\n  },\n  \"minecraft:purple_concrete\": {\n    \"1.13\": \"525\",\n    \"1.13.2\": \"525\"\n  },\n  \"minecraft:purple_concrete_powder\": {\n    \"1.13\": \"541\",\n    \"1.13.2\": \"541\"\n  },\n  \"minecraft:purple_glazed_terracotta\": {\n    \"1.13\": \"509\",\n    \"1.13.2\": \"509\"\n  },\n  \"minecraft:purple_shulker_box\": {\n    \"1.13\": \"493\",\n    \"1.13.2\": \"493\"\n  },\n  \"minecraft:purple_stained_glass\": {\n    \"1.13\": \"196\",\n    \"1.13.2\": \"196\"\n  },\n  \"minecraft:purple_stained_glass_pane\": {\n    \"1.13\": \"345\",\n    \"1.13.2\": \"345\"\n  },\n  \"minecraft:purple_terracotta\": {\n    \"1.13\": \"329\",\n    \"1.13.2\": \"329\"\n  },\n  \"minecraft:purple_wall_banner\": {\n    \"1.13\": \"418\",\n    \"1.13.2\": \"418\"\n  },\n  \"minecraft:purple_wool\": {\n    \"1.13\": \"111\",\n    \"1.13.2\": \"111\"\n  },\n  \"minecraft:purpur_block\": {\n    \"1.13\": \"466\",\n    \"1.13.2\": \"466\"\n  },\n  \"minecraft:purpur_pillar\": {\n    \"1.13\": \"467\",\n    \"1.13.2\": \"467\"\n  },\n  \"minecraft:purpur_slab\": {\n    \"1.13\": \"443\",\n    \"1.13.2\": \"443\"\n  },\n  \"minecraft:purpur_stairs\": {\n    \"1.13\": \"468\",\n    \"1.13.2\": \"468\"\n  },\n  \"minecraft:quartz_block\": {\n    \"1.13\": \"313\",\n    \"1.13.2\": \"313\"\n  },\n  \"minecraft:quartz_pillar\": {\n    \"1.13\": \"315\",\n    \"1.13.2\": \"315\"\n  },\n  \"minecraft:quartz_slab\": {\n    \"1.13\": \"441\",\n    \"1.13.2\": \"441\"\n  },\n  \"minecraft:quartz_stairs\": {\n    \"1.13\": \"316\",\n    \"1.13.2\": \"316\"\n  },\n  \"minecraft:rail\": {\n    \"1.13\": \"153\",\n    \"1.13.2\": \"153\"\n  },\n  \"minecraft:red_banner\": {\n    \"1.13\": \"406\",\n    \"1.13.2\": \"406\"\n  },\n  \"minecraft:red_bed\": {\n    \"1.13\": \"88\",\n    \"1.13.2\": \"88\"\n  },\n  \"minecraft:red_carpet\": {\n    \"1.13\": \"381\",\n    \"1.13.2\": \"381\"\n  },\n  \"minecraft:red_concrete\": {\n    \"1.13\": \"529\",\n    \"1.13.2\": \"529\"\n  },\n  \"minecraft:red_concrete_powder\": {\n    \"1.13\": \"545\",\n    \"1.13.2\": \"545\"\n  },\n  \"minecraft:red_glazed_terracotta\": {\n    \"1.13\": \"513\",\n    \"1.13.2\": \"513\"\n  },\n  \"minecraft:red_mushroom\": {\n    \"1.13\": \"129\",\n    \"1.13.2\": \"129\"\n  },\n  \"minecraft:red_mushroom_block\": {\n    \"1.13\": \"219\",\n    \"1.13.2\": \"219\"\n  },\n  \"minecraft:red_nether_bricks\": {\n    \"1.13\": \"478\",\n    \"1.13.2\": \"478\"\n  },\n  \"minecraft:red_sand\": {\n    \"1.13\": \"29\",\n    \"1.13.2\": \"29\"\n  },\n  \"minecraft:red_sandstone\": {\n    \"1.13\": \"424\",\n    \"1.13.2\": \"424\"\n  },\n  \"minecraft:red_sandstone_slab\": {\n    \"1.13\": \"442\",\n    \"1.13.2\": \"442\"\n  },\n  \"minecraft:red_sandstone_stairs\": {\n    \"1.13\": \"427\",\n    \"1.13.2\": \"427\"\n  },\n  \"minecraft:red_shulker_box\": {\n    \"1.13\": \"497\",\n    \"1.13.2\": \"497\"\n  },\n  \"minecraft:red_stained_glass\": {\n    \"1.13\": \"200\",\n    \"1.13.2\": \"200\"\n  },\n  \"minecraft:red_stained_glass_pane\": {\n    \"1.13\": \"349\",\n    \"1.13.2\": \"349\"\n  },\n  \"minecraft:red_terracotta\": {\n    \"1.13\": \"333\",\n    \"1.13.2\": \"333\"\n  },\n  \"minecraft:red_tulip\": {\n    \"1.13\": \"123\",\n    \"1.13.2\": \"123\"\n  },\n  \"minecraft:red_wall_banner\": {\n    \"1.13\": \"422\",\n    \"1.13.2\": \"422\"\n  },\n  \"minecraft:red_wool\": {\n    \"1.13\": \"115\",\n    \"1.13.2\": \"115\"\n  },\n  \"minecraft:redstone_block\": {\n    \"1.13\": \"310\",\n    \"1.13.2\": \"310\"\n  },\n  \"minecraft:redstone_lamp\": {\n    \"1.13\": \"245\",\n    \"1.13.2\": \"245\"\n  },\n  \"minecraft:redstone_ore\": {\n    \"1.13\": \"165\",\n    \"1.13.2\": \"165\"\n  },\n  \"minecraft:redstone_torch\": {\n    \"1.13\": \"166\",\n    \"1.13.2\": \"166\"\n  },\n  \"minecraft:redstone_wall_torch\": {\n    \"1.13\": \"167\",\n    \"1.13.2\": \"167\"\n  },\n  \"minecraft:redstone_wire\": {\n    \"1.13\": \"143\",\n    \"1.13.2\": \"143\"\n  },\n  \"minecraft:repeater\": {\n    \"1.13\": \"185\",\n    \"1.13.2\": \"185\"\n  },\n  \"minecraft:repeating_command_block\": {\n    \"1.13\": \"473\",\n    \"1.13.2\": \"473\"\n  },\n  \"minecraft:rose_bush\": {\n    \"1.13\": \"388\",\n    \"1.13.2\": \"388\"\n  },\n  \"minecraft:sand\": {\n    \"1.13\": \"28\",\n    \"1.13.2\": \"28\"\n  },\n  \"minecraft:sandstone\": {\n    \"1.13\": \"70\",\n    \"1.13.2\": \"70\"\n  },\n  \"minecraft:sandstone_slab\": {\n    \"1.13\": \"435\",\n    \"1.13.2\": \"435\"\n  },\n  \"minecraft:sandstone_stairs\": {\n    \"1.13\": \"247\",\n    \"1.13.2\": \"247\"\n  },\n  \"minecraft:sea_lantern\": {\n    \"1.13\": \"365\",\n    \"1.13.2\": \"365\"\n  },\n  \"minecraft:sea_pickle\": {\n    \"1.13\": \"586\",\n    \"1.13.2\": \"591\"\n  },\n  \"minecraft:seagrass\": {\n    \"1.13\": \"97\",\n    \"1.13.2\": \"97\"\n  },\n  \"minecraft:shulker_box\": {\n    \"1.13\": \"482\",\n    \"1.13.2\": \"482\"\n  },\n  \"minecraft:skeleton_skull\": {\n    \"1.13\": \"291\",\n    \"1.13.2\": \"291\"\n  },\n  \"minecraft:skeleton_wall_skull\": {\n    \"1.13\": \"290\",\n    \"1.13.2\": \"290\"\n  },\n  \"minecraft:slime_block\": {\n    \"1.13\": \"353\",\n    \"1.13.2\": \"353\"\n  },\n  \"minecraft:smooth_quartz\": {\n    \"1.13\": \"446\",\n    \"1.13.2\": \"446\"\n  },\n  \"minecraft:smooth_red_sandstone\": {\n    \"1.13\": \"447\",\n    \"1.13.2\": \"447\"\n  },\n  \"minecraft:smooth_sandstone\": {\n    \"1.13\": \"445\",\n    \"1.13.2\": \"445\"\n  },\n  \"minecraft:smooth_stone\": {\n    \"1.13\": \"444\",\n    \"1.13.2\": \"444\"\n  },\n  \"minecraft:smooth_stone_slab\": {\n    \"1.13\": \"434\",\n    \"1.13.2\": \"434\"\n  },\n  \"minecraft:snow\": {\n    \"1.13\": \"169\",\n    \"1.13.2\": \"169\"\n  },\n  \"minecraft:snow_block\": {\n    \"1.13\": \"171\",\n    \"1.13.2\": \"171\"\n  },\n  \"minecraft:soul_sand\": {\n    \"1.13\": \"179\",\n    \"1.13.2\": \"179\"\n  },\n  \"minecraft:spawner\": {\n    \"1.13\": \"140\",\n    \"1.13.2\": \"140\"\n  },\n  \"minecraft:sponge\": {\n    \"1.13\": \"64\",\n    \"1.13.2\": \"64\"\n  },\n  \"minecraft:spruce_button\": {\n    \"1.13\": \"285\",\n    \"1.13.2\": \"285\"\n  },\n  \"minecraft:spruce_door\": {\n    \"1.13\": \"458\",\n    \"1.13.2\": \"458\"\n  },\n  \"minecraft:spruce_fence\": {\n    \"1.13\": \"453\",\n    \"1.13.2\": \"453\"\n  },\n  \"minecraft:spruce_fence_gate\": {\n    \"1.13\": \"448\",\n    \"1.13.2\": \"448\"\n  },\n  \"minecraft:spruce_leaves\": {\n    \"1.13\": \"59\",\n    \"1.13.2\": \"59\"\n  },\n  \"minecraft:spruce_log\": {\n    \"1.13\": \"35\",\n    \"1.13.2\": \"35\"\n  },\n  \"minecraft:spruce_planks\": {\n    \"1.13\": \"14\",\n    \"1.13.2\": \"14\"\n  },\n  \"minecraft:spruce_pressure_plate\": {\n    \"1.13\": \"160\",\n    \"1.13.2\": \"160\"\n  },\n  \"minecraft:spruce_sapling\": {\n    \"1.13\": \"20\",\n    \"1.13.2\": \"20\"\n  },\n  \"minecraft:spruce_slab\": {\n    \"1.13\": \"429\",\n    \"1.13.2\": \"429\"\n  },\n  \"minecraft:spruce_stairs\": {\n    \"1.13\": \"253\",\n    \"1.13.2\": \"253\"\n  },\n  \"minecraft:spruce_trapdoor\": {\n    \"1.13\": \"203\",\n    \"1.13.2\": \"203\"\n  },\n  \"minecraft:spruce_wood\": {\n    \"1.13\": \"47\",\n    \"1.13.2\": \"47\"\n  },\n  \"minecraft:sticky_piston\": {\n    \"1.13\": \"92\",\n    \"1.13.2\": \"92\"\n  },\n  \"minecraft:stone\": {\n    \"1.13\": \"1\",\n    \"1.13.2\": \"1\"\n  },\n  \"minecraft:stone_brick_slab\": {\n    \"1.13\": \"439\",\n    \"1.13.2\": \"439\"\n  },\n  \"minecraft:stone_brick_stairs\": {\n    \"1.13\": \"231\",\n    \"1.13.2\": \"231\"\n  },\n  \"minecraft:stone_bricks\": {\n    \"1.13\": \"214\",\n    \"1.13.2\": \"214\"\n  },\n  \"minecraft:stone_button\": {\n    \"1.13\": \"168\",\n    \"1.13.2\": \"168\"\n  },\n  \"minecraft:stone_pressure_plate\": {\n    \"1.13\": \"157\",\n    \"1.13.2\": \"157\"\n  },\n  \"minecraft:stripped_acacia_log\": {\n    \"1.13\": \"43\",\n    \"1.13.2\": \"43\"\n  },\n  \"minecraft:stripped_acacia_wood\": {\n    \"1.13\": \"56\",\n    \"1.13.2\": \"56\"\n  },\n  \"minecraft:stripped_birch_log\": {\n    \"1.13\": \"41\",\n    \"1.13.2\": \"41\"\n  },\n  \"minecraft:stripped_birch_wood\": {\n    \"1.13\": \"54\",\n    \"1.13.2\": \"54\"\n  },\n  \"minecraft:stripped_dark_oak_log\": {\n    \"1.13\": \"44\",\n    \"1.13.2\": \"44\"\n  },\n  \"minecraft:stripped_dark_oak_wood\": {\n    \"1.13\": \"57\",\n    \"1.13.2\": \"57\"\n  },\n  \"minecraft:stripped_jungle_log\": {\n    \"1.13\": \"42\",\n    \"1.13.2\": \"42\"\n  },\n  \"minecraft:stripped_jungle_wood\": {\n    \"1.13\": \"55\",\n    \"1.13.2\": \"55\"\n  },\n  \"minecraft:stripped_oak_log\": {\n    \"1.13\": \"45\",\n    \"1.13.2\": \"45\"\n  },\n  \"minecraft:stripped_oak_wood\": {\n    \"1.13\": \"52\",\n    \"1.13.2\": \"52\"\n  },\n  \"minecraft:stripped_spruce_log\": {\n    \"1.13\": \"40\",\n    \"1.13.2\": \"40\"\n  },\n  \"minecraft:stripped_spruce_wood\": {\n    \"1.13\": \"53\",\n    \"1.13.2\": \"53\"\n  },\n  \"minecraft:structure_block\": {\n    \"1.13\": \"592\",\n    \"1.13.2\": \"597\"\n  },\n  \"minecraft:structure_void\": {\n    \"1.13\": \"480\",\n    \"1.13.2\": \"480\"\n  },\n  \"minecraft:sugar_cane\": {\n    \"1.13\": \"174\",\n    \"1.13.2\": \"174\"\n  },\n  \"minecraft:sunflower\": {\n    \"1.13\": \"386\",\n    \"1.13.2\": \"386\"\n  },\n  \"minecraft:tall_grass\": {\n    \"1.13\": \"390\",\n    \"1.13.2\": \"390\"\n  },\n  \"minecraft:tall_seagrass\": {\n    \"1.13\": \"98\",\n    \"1.13.2\": \"98\"\n  },\n  \"minecraft:terracotta\": {\n    \"1.13\": \"383\",\n    \"1.13.2\": \"383\"\n  },\n  \"minecraft:tnt\": {\n    \"1.13\": \"133\",\n    \"1.13.2\": \"133\"\n  },\n  \"minecraft:torch\": {\n    \"1.13\": \"137\",\n    \"1.13.2\": \"137\"\n  },\n  \"minecraft:trapped_chest\": {\n    \"1.13\": \"305\",\n    \"1.13.2\": \"305\"\n  },\n  \"minecraft:tripwire\": {\n    \"1.13\": \"251\",\n    \"1.13.2\": \"251\"\n  },\n  \"minecraft:tripwire_hook\": {\n    \"1.13\": \"250\",\n    \"1.13.2\": \"250\"\n  },\n  \"minecraft:tube_coral\": {\n    \"1.13\": \"561\",\n    \"1.13.2\": \"566\"\n  },\n  \"minecraft:tube_coral_block\": {\n    \"1.13\": \"556\",\n    \"1.13.2\": \"556\"\n  },\n  \"minecraft:tube_coral_fan\": {\n    \"1.13\": \"581\",\n    \"1.13.2\": \"586\"\n  },\n  \"minecraft:tube_coral_wall_fan\": {\n    \"1.13\": \"571\",\n    \"1.13.2\": \"576\"\n  },\n  \"minecraft:turtle_egg\": {\n    \"1.13\": \"550\",\n    \"1.13.2\": \"550\"\n  },\n  \"minecraft:vine\": {\n    \"1.13\": \"228\",\n    \"1.13.2\": \"228\"\n  },\n  \"minecraft:void_air\": {\n    \"1.13\": \"589\",\n    \"1.13.2\": \"594\"\n  },\n  \"minecraft:wall_torch\": {\n    \"1.13\": \"138\",\n    \"1.13.2\": \"138\"\n  },\n  \"minecraft:water\": {\n    \"1.13\": \"26\",\n    \"1.13.2\": \"26\"\n  },\n  \"minecraft:wet_sponge\": {\n    \"1.13\": \"65\",\n    \"1.13.2\": \"65\"\n  },\n  \"minecraft:wheat\": {\n    \"1.13\": \"147\",\n    \"1.13.2\": \"147\"\n  },\n  \"minecraft:white_banner\": {\n    \"1.13\": \"392\",\n    \"1.13.2\": \"392\"\n  },\n  \"minecraft:white_bed\": {\n    \"1.13\": \"74\",\n    \"1.13.2\": \"74\"\n  },\n  \"minecraft:white_carpet\": {\n    \"1.13\": \"367\",\n    \"1.13.2\": \"367\"\n  },\n  \"minecraft:white_concrete\": {\n    \"1.13\": \"515\",\n    \"1.13.2\": \"515\"\n  },\n  \"minecraft:white_concrete_powder\": {\n    \"1.13\": \"531\",\n    \"1.13.2\": \"531\"\n  },\n  \"minecraft:white_glazed_terracotta\": {\n    \"1.13\": \"499\",\n    \"1.13.2\": \"499\"\n  },\n  \"minecraft:white_shulker_box\": {\n    \"1.13\": \"483\",\n    \"1.13.2\": \"483\"\n  },\n  \"minecraft:white_stained_glass\": {\n    \"1.13\": \"186\",\n    \"1.13.2\": \"186\"\n  },\n  \"minecraft:white_stained_glass_pane\": {\n    \"1.13\": \"335\",\n    \"1.13.2\": \"335\"\n  },\n  \"minecraft:white_terracotta\": {\n    \"1.13\": \"319\",\n    \"1.13.2\": \"319\"\n  },\n  \"minecraft:white_tulip\": {\n    \"1.13\": \"125\",\n    \"1.13.2\": \"125\"\n  },\n  \"minecraft:white_wall_banner\": {\n    \"1.13\": \"408\",\n    \"1.13.2\": \"408\"\n  },\n  \"minecraft:white_wool\": {\n    \"1.13\": \"101\",\n    \"1.13.2\": \"101\"\n  },\n  \"minecraft:wither_skeleton_skull\": {\n    \"1.13\": \"293\",\n    \"1.13.2\": \"293\"\n  },\n  \"minecraft:wither_skeleton_wall_skull\": {\n    \"1.13\": \"292\",\n    \"1.13.2\": \"292\"\n  },\n  \"minecraft:yellow_banner\": {\n    \"1.13\": \"396\",\n    \"1.13.2\": \"396\"\n  },\n  \"minecraft:yellow_bed\": {\n    \"1.13\": \"78\",\n    \"1.13.2\": \"78\"\n  },\n  \"minecraft:yellow_carpet\": {\n    \"1.13\": \"371\",\n    \"1.13.2\": \"371\"\n  },\n  \"minecraft:yellow_concrete\": {\n    \"1.13\": \"519\",\n    \"1.13.2\": \"519\"\n  },\n  \"minecraft:yellow_concrete_powder\": {\n    \"1.13\": \"535\",\n    \"1.13.2\": \"535\"\n  },\n  \"minecraft:yellow_glazed_terracotta\": {\n    \"1.13\": \"503\",\n    \"1.13.2\": \"503\"\n  },\n  \"minecraft:yellow_shulker_box\": {\n    \"1.13\": \"487\",\n    \"1.13.2\": \"487\"\n  },\n  \"minecraft:yellow_stained_glass\": {\n    \"1.13\": \"190\",\n    \"1.13.2\": \"190\"\n  },\n  \"minecraft:yellow_stained_glass_pane\": {\n    \"1.13\": \"339\",\n    \"1.13.2\": \"339\"\n  },\n  \"minecraft:yellow_terracotta\": {\n    \"1.13\": \"323\",\n    \"1.13.2\": \"323\"\n  },\n  \"minecraft:yellow_wall_banner\": {\n    \"1.13\": \"412\",\n    \"1.13.2\": \"412\"\n  },\n  \"minecraft:yellow_wool\": {\n    \"1.13\": \"105\",\n    \"1.13.2\": \"105\"\n  },\n  \"minecraft:zombie_head\": {\n    \"1.13\": \"295\",\n    \"1.13.2\": \"295\"\n  },\n  \"minecraft:zombie_wall_head\": {\n    \"1.13\": \"294\",\n    \"1.13.2\": \"294\"\n  }\n}"
  },
  {
    "path": "plugin/mapping/legacy_data_component_types_mapping.json",
    "content": "{}"
  },
  {
    "path": "plugin/mapping/legacy_items_mapping.json",
    "content": "{\n  \"minecraft:acacia_boat\": {\n    \"1.13\": \"762\",\n    \"1.13.2\": \"767\"\n  },\n  \"minecraft:acacia_button\": {\n    \"1.13\": \"245\",\n    \"1.13.2\": \"245\"\n  },\n  \"minecraft:acacia_door\": {\n    \"legacy\": \"430\",\n    \"1.13\": \"460\",\n    \"1.13.2\": \"465\"\n  },\n  \"minecraft:acacia_fence\": {\n    \"legacy\": \"192\",\n    \"1.13\": \"179\",\n    \"1.13.2\": \"179\"\n  },\n  \"minecraft:acacia_fence_gate\": {\n    \"legacy\": \"187\",\n    \"1.13\": \"214\",\n    \"1.13.2\": \"214\"\n  },\n  \"minecraft:acacia_leaves\": {\n    \"legacy\": \"161\",\n    \"1.13\": \"60\",\n    \"1.13.2\": \"60\"\n  },\n  \"minecraft:acacia_log\": {\n    \"legacy\": \"162\",\n    \"1.13\": \"36\",\n    \"1.13.2\": \"36\"\n  },\n  \"minecraft:acacia_planks\": {\n    \"1.13\": \"17\",\n    \"1.13.2\": \"17\"\n  },\n  \"minecraft:acacia_pressure_plate\": {\n    \"1.13\": \"164\",\n    \"1.13.2\": \"164\"\n  },\n  \"minecraft:acacia_sapling\": {\n    \"1.13\": \"23\",\n    \"1.13.2\": \"23\"\n  },\n  \"minecraft:acacia_slab\": {\n    \"1.13\": \"116\",\n    \"1.13.2\": \"116\"\n  },\n  \"minecraft:acacia_stairs\": {\n    \"legacy\": \"163\",\n    \"1.13\": \"301\",\n    \"1.13.2\": \"301\"\n  },\n  \"minecraft:acacia_trapdoor\": {\n    \"1.13\": \"191\",\n    \"1.13.2\": \"191\"\n  },\n  \"minecraft:acacia_wood\": {\n    \"1.13\": \"54\",\n    \"1.13.2\": \"54\"\n  },\n  \"minecraft:activator_rail\": {\n    \"legacy\": \"157\",\n    \"1.13\": \"261\",\n    \"1.13.2\": \"261\"\n  },\n  \"minecraft:air\": {\n    \"legacy\": \"0\",\n    \"1.13\": \"0\",\n    \"1.13.2\": \"0\"\n  },\n  \"minecraft:allium\": {\n    \"1.13\": \"101\",\n    \"1.13.2\": \"101\"\n  },\n  \"minecraft:andesite\": {\n    \"1.13\": \"6\",\n    \"1.13.2\": \"6\"\n  },\n  \"minecraft:anvil\": {\n    \"legacy\": \"145\",\n    \"1.13\": \"247\",\n    \"1.13.2\": \"247\"\n  },\n  \"minecraft:apple\": {\n    \"legacy\": \"260\",\n    \"1.13\": \"471\",\n    \"1.13.2\": \"476\"\n  },\n  \"minecraft:armor_stand\": {\n    \"legacy\": \"416\",\n    \"1.13\": \"721\",\n    \"1.13.2\": \"726\"\n  },\n  \"minecraft:arrow\": {\n    \"legacy\": \"262\",\n    \"1.13\": \"473\",\n    \"1.13.2\": \"478\"\n  },\n  \"minecraft:azure_bluet\": {\n    \"1.13\": \"102\",\n    \"1.13.2\": \"102\"\n  },\n  \"minecraft:baked_potato\": {\n    \"legacy\": \"393\",\n    \"1.13\": \"694\",\n    \"1.13.2\": \"699\"\n  },\n  \"minecraft:barrier\": {\n    \"legacy\": \"166\",\n    \"1.13\": \"279\",\n    \"1.13.2\": \"279\"\n  },\n  \"minecraft:bat_spawn_egg\": {\n    \"1.13\": \"634\",\n    \"1.13.2\": \"639\"\n  },\n  \"minecraft:beacon\": {\n    \"legacy\": \"138\",\n    \"1.13\": \"238\",\n    \"1.13.2\": \"238\"\n  },\n  \"minecraft:bedrock\": {\n    \"legacy\": \"7\",\n    \"1.13\": \"25\",\n    \"1.13.2\": \"25\"\n  },\n  \"minecraft:beef\": {\n    \"legacy\": \"363\",\n    \"1.13\": \"614\",\n    \"1.13.2\": \"619\"\n  },\n  \"minecraft:beetroot\": {\n    \"1.13\": \"749\",\n    \"1.13.2\": \"754\"\n  },\n  \"minecraft:beetroot_seeds\": {\n    \"1.13\": \"750\",\n    \"1.13.2\": \"755\"\n  },\n  \"minecraft:beetroot_soup\": {\n    \"1.13\": \"751\",\n    \"1.13.2\": \"756\"\n  },\n  \"minecraft:birch_boat\": {\n    \"1.13\": \"760\",\n    \"1.13.2\": \"765\"\n  },\n  \"minecraft:birch_button\": {\n    \"1.13\": \"243\",\n    \"1.13.2\": \"243\"\n  },\n  \"minecraft:birch_door\": {\n    \"legacy\": \"428\",\n    \"1.13\": \"458\",\n    \"1.13.2\": \"463\"\n  },\n  \"minecraft:birch_fence\": {\n    \"legacy\": \"189\",\n    \"1.13\": \"177\",\n    \"1.13.2\": \"177\"\n  },\n  \"minecraft:birch_fence_gate\": {\n    \"legacy\": \"184\",\n    \"1.13\": \"212\",\n    \"1.13.2\": \"212\"\n  },\n  \"minecraft:birch_leaves\": {\n    \"1.13\": \"58\",\n    \"1.13.2\": \"58\"\n  },\n  \"minecraft:birch_log\": {\n    \"1.13\": \"34\",\n    \"1.13.2\": \"34\"\n  },\n  \"minecraft:birch_planks\": {\n    \"1.13\": \"15\",\n    \"1.13.2\": \"15\"\n  },\n  \"minecraft:birch_pressure_plate\": {\n    \"1.13\": \"162\",\n    \"1.13.2\": \"162\"\n  },\n  \"minecraft:birch_sapling\": {\n    \"1.13\": \"21\",\n    \"1.13.2\": \"21\"\n  },\n  \"minecraft:birch_slab\": {\n    \"1.13\": \"114\",\n    \"1.13.2\": \"114\"\n  },\n  \"minecraft:birch_stairs\": {\n    \"legacy\": \"135\",\n    \"1.13\": \"235\",\n    \"1.13.2\": \"235\"\n  },\n  \"minecraft:birch_trapdoor\": {\n    \"1.13\": \"189\",\n    \"1.13.2\": \"189\"\n  },\n  \"minecraft:birch_wood\": {\n    \"1.13\": \"52\",\n    \"1.13.2\": \"52\"\n  },\n  \"minecraft:black_banner\": {\n    \"1.13\": \"745\",\n    \"1.13.2\": \"750\"\n  },\n  \"minecraft:black_bed\": {\n    \"1.13\": \"606\",\n    \"1.13.2\": \"611\"\n  },\n  \"minecraft:black_carpet\": {\n    \"1.13\": \"297\",\n    \"1.13.2\": \"297\"\n  },\n  \"minecraft:black_concrete\": {\n    \"1.13\": \"410\",\n    \"1.13.2\": \"410\"\n  },\n  \"minecraft:black_concrete_powder\": {\n    \"1.13\": \"426\",\n    \"1.13.2\": \"426\"\n  },\n  \"minecraft:black_glazed_terracotta\": {\n    \"1.13\": \"394\",\n    \"1.13.2\": \"394\"\n  },\n  \"minecraft:black_shulker_box\": {\n    \"1.13\": \"378\",\n    \"1.13.2\": \"378\"\n  },\n  \"minecraft:black_stained_glass\": {\n    \"1.13\": \"326\",\n    \"1.13.2\": \"326\"\n  },\n  \"minecraft:black_stained_glass_pane\": {\n    \"1.13\": \"342\",\n    \"1.13.2\": \"342\"\n  },\n  \"minecraft:black_terracotta\": {\n    \"1.13\": \"278\",\n    \"1.13.2\": \"278\"\n  },\n  \"minecraft:black_wool\": {\n    \"1.13\": \"97\",\n    \"1.13.2\": \"97\"\n  },\n  \"minecraft:blaze_powder\": {\n    \"legacy\": \"377\",\n    \"1.13\": \"628\",\n    \"1.13.2\": \"633\"\n  },\n  \"minecraft:blaze_rod\": {\n    \"legacy\": \"369\",\n    \"1.13\": \"620\",\n    \"1.13.2\": \"625\"\n  },\n  \"minecraft:blaze_spawn_egg\": {\n    \"1.13\": \"635\",\n    \"1.13.2\": \"640\"\n  },\n  \"minecraft:blue_banner\": {\n    \"1.13\": \"741\",\n    \"1.13.2\": \"746\"\n  },\n  \"minecraft:blue_bed\": {\n    \"1.13\": \"602\",\n    \"1.13.2\": \"607\"\n  },\n  \"minecraft:blue_carpet\": {\n    \"1.13\": \"293\",\n    \"1.13.2\": \"293\"\n  },\n  \"minecraft:blue_concrete\": {\n    \"1.13\": \"406\",\n    \"1.13.2\": \"406\"\n  },\n  \"minecraft:blue_concrete_powder\": {\n    \"1.13\": \"422\",\n    \"1.13.2\": \"422\"\n  },\n  \"minecraft:blue_glazed_terracotta\": {\n    \"1.13\": \"390\",\n    \"1.13.2\": \"390\"\n  },\n  \"minecraft:blue_ice\": {\n    \"1.13\": \"453\",\n    \"1.13.2\": \"458\"\n  },\n  \"minecraft:blue_orchid\": {\n    \"1.13\": \"100\",\n    \"1.13.2\": \"100\"\n  },\n  \"minecraft:blue_shulker_box\": {\n    \"1.13\": \"374\",\n    \"1.13.2\": \"374\"\n  },\n  \"minecraft:blue_stained_glass\": {\n    \"1.13\": \"322\",\n    \"1.13.2\": \"322\"\n  },\n  \"minecraft:blue_stained_glass_pane\": {\n    \"1.13\": \"338\",\n    \"1.13.2\": \"338\"\n  },\n  \"minecraft:blue_terracotta\": {\n    \"1.13\": \"274\",\n    \"1.13.2\": \"274\"\n  },\n  \"minecraft:blue_wool\": {\n    \"1.13\": \"93\",\n    \"1.13.2\": \"93\"\n  },\n  \"minecraft:bone\": {\n    \"legacy\": \"352\",\n    \"1.13\": \"588\",\n    \"1.13.2\": \"593\"\n  },\n  \"minecraft:bone_block\": {\n    \"1.13\": \"359\",\n    \"1.13.2\": \"359\"\n  },\n  \"minecraft:bone_meal\": {\n    \"1.13\": \"587\",\n    \"1.13.2\": \"592\"\n  },\n  \"minecraft:book\": {\n    \"legacy\": \"340\",\n    \"1.13\": \"557\",\n    \"1.13.2\": \"562\"\n  },\n  \"minecraft:bookshelf\": {\n    \"legacy\": \"47\",\n    \"1.13\": \"137\",\n    \"1.13.2\": \"137\"\n  },\n  \"minecraft:bow\": {\n    \"legacy\": \"261\",\n    \"1.13\": \"472\",\n    \"1.13.2\": \"477\"\n  },\n  \"minecraft:bowl\": {\n    \"legacy\": \"281\",\n    \"1.13\": \"493\",\n    \"1.13.2\": \"498\"\n  },\n  \"minecraft:brain_coral\": {\n    \"1.13\": \"439\",\n    \"1.13.2\": \"439\"\n  },\n  \"minecraft:brain_coral_block\": {\n    \"1.13\": \"434\",\n    \"1.13.2\": \"434\"\n  },\n  \"minecraft:brain_coral_fan\": {\n    \"1.13\": \"444\",\n    \"1.13.2\": \"449\"\n  },\n  \"minecraft:bread\": {\n    \"legacy\": \"297\",\n    \"1.13\": \"509\",\n    \"1.13.2\": \"514\"\n  },\n  \"minecraft:brewing_stand\": {\n    \"legacy\": \"379\",\n    \"1.13\": \"630\",\n    \"1.13.2\": \"635\"\n  },\n  \"minecraft:brick\": {\n    \"legacy\": \"336\",\n    \"1.13\": \"551\",\n    \"1.13.2\": \"556\"\n  },\n  \"minecraft:brick_slab\": {\n    \"1.13\": \"122\",\n    \"1.13.2\": \"122\"\n  },\n  \"minecraft:brick_stairs\": {\n    \"legacy\": \"108\",\n    \"1.13\": \"216\",\n    \"1.13.2\": \"216\"\n  },\n  \"minecraft:bricks\": {\n    \"legacy\": \"45\",\n    \"1.13\": \"135\",\n    \"1.13.2\": \"135\"\n  },\n  \"minecraft:brown_banner\": {\n    \"1.13\": \"742\",\n    \"1.13.2\": \"747\"\n  },\n  \"minecraft:brown_bed\": {\n    \"1.13\": \"603\",\n    \"1.13.2\": \"608\"\n  },\n  \"minecraft:brown_carpet\": {\n    \"1.13\": \"294\",\n    \"1.13.2\": \"294\"\n  },\n  \"minecraft:brown_concrete\": {\n    \"legacy\": \"172\",\n    \"1.13\": \"407\",\n    \"1.13.2\": \"407\"\n  },\n  \"minecraft:brown_concrete_powder\": {\n    \"1.13\": \"423\",\n    \"1.13.2\": \"423\"\n  },\n  \"minecraft:brown_glazed_terracotta\": {\n    \"1.13\": \"391\",\n    \"1.13.2\": \"391\"\n  },\n  \"minecraft:brown_mushroom\": {\n    \"legacy\": \"39\",\n    \"1.13\": \"108\",\n    \"1.13.2\": \"108\"\n  },\n  \"minecraft:brown_mushroom_block\": {\n    \"legacy\": \"99\",\n    \"1.13\": \"203\",\n    \"1.13.2\": \"203\"\n  },\n  \"minecraft:brown_shulker_box\": {\n    \"1.13\": \"375\",\n    \"1.13.2\": \"375\"\n  },\n  \"minecraft:brown_stained_glass\": {\n    \"1.13\": \"323\",\n    \"1.13.2\": \"323\"\n  },\n  \"minecraft:brown_stained_glass_pane\": {\n    \"1.13\": \"339\",\n    \"1.13.2\": \"339\"\n  },\n  \"minecraft:brown_terracotta\": {\n    \"1.13\": \"275\",\n    \"1.13.2\": \"275\"\n  },\n  \"minecraft:brown_wool\": {\n    \"1.13\": \"94\",\n    \"1.13.2\": \"94\"\n  },\n  \"minecraft:bubble_coral\": {\n    \"1.13\": \"440\",\n    \"1.13.2\": \"440\"\n  },\n  \"minecraft:bubble_coral_block\": {\n    \"1.13\": \"435\",\n    \"1.13.2\": \"435\"\n  },\n  \"minecraft:bubble_coral_fan\": {\n    \"1.13\": \"445\",\n    \"1.13.2\": \"450\"\n  },\n  \"minecraft:bucket\": {\n    \"legacy\": \"325\",\n    \"1.13\": \"537\",\n    \"1.13.2\": \"542\"\n  },\n  \"minecraft:cactus\": {\n    \"legacy\": \"81\",\n    \"1.13\": \"172\",\n    \"1.13.2\": \"172\"\n  },\n  \"minecraft:cake\": {\n    \"legacy\": \"354\",\n    \"1.13\": \"590\",\n    \"1.13.2\": \"595\"\n  },\n  \"minecraft:carrot\": {\n    \"legacy\": \"391\",\n    \"1.13\": \"692\",\n    \"1.13.2\": \"697\"\n  },\n  \"minecraft:carrot_on_a_stick\": {\n    \"legacy\": \"398\",\n    \"1.13\": \"704\",\n    \"1.13.2\": \"709\"\n  },\n  \"minecraft:carved_pumpkin\": {\n    \"1.13\": \"182\",\n    \"1.13.2\": \"182\"\n  },\n  \"minecraft:cauldron\": {\n    \"legacy\": \"380\",\n    \"1.13\": \"631\",\n    \"1.13.2\": \"636\"\n  },\n  \"minecraft:cave_spider_spawn_egg\": {\n    \"1.13\": \"636\",\n    \"1.13.2\": \"641\"\n  },\n  \"minecraft:chain_command_block\": {\n    \"1.13\": \"355\",\n    \"1.13.2\": \"355\"\n  },\n  \"minecraft:chainmail_boots\": {\n    \"legacy\": \"305\",\n    \"1.13\": \"517\",\n    \"1.13.2\": \"522\"\n  },\n  \"minecraft:chainmail_chestplate\": {\n    \"legacy\": \"303\",\n    \"1.13\": \"515\",\n    \"1.13.2\": \"520\"\n  },\n  \"minecraft:chainmail_helmet\": {\n    \"legacy\": \"302\",\n    \"1.13\": \"514\",\n    \"1.13.2\": \"519\"\n  },\n  \"minecraft:chainmail_leggings\": {\n    \"legacy\": \"304\",\n    \"1.13\": \"516\",\n    \"1.13.2\": \"521\"\n  },\n  \"minecraft:charcoal\": {\n    \"1.13\": \"475\",\n    \"1.13.2\": \"480\"\n  },\n  \"minecraft:chest\": {\n    \"legacy\": \"54\",\n    \"1.13\": \"149\",\n    \"1.13.2\": \"149\"\n  },\n  \"minecraft:chest_minecart\": {\n    \"legacy\": \"342\",\n    \"1.13\": \"559\",\n    \"1.13.2\": \"564\"\n  },\n  \"minecraft:chicken\": {\n    \"legacy\": \"365\",\n    \"1.13\": \"616\",\n    \"1.13.2\": \"621\"\n  },\n  \"minecraft:chicken_spawn_egg\": {\n    \"1.13\": \"637\",\n    \"1.13.2\": \"642\"\n  },\n  \"minecraft:chipped_anvil\": {\n    \"1.13\": \"248\",\n    \"1.13.2\": \"248\"\n  },\n  \"minecraft:chiseled_quartz_block\": {\n    \"1.13\": \"257\",\n    \"1.13.2\": \"257\"\n  },\n  \"minecraft:chiseled_red_sandstone\": {\n    \"1.13\": \"351\",\n    \"1.13.2\": \"351\"\n  },\n  \"minecraft:chiseled_sandstone\": {\n    \"1.13\": \"69\",\n    \"1.13.2\": \"69\"\n  },\n  \"minecraft:chiseled_stone_bricks\": {\n    \"1.13\": \"202\",\n    \"1.13.2\": \"202\"\n  },\n  \"minecraft:chorus_flower\": {\n    \"1.13\": \"143\",\n    \"1.13.2\": \"143\"\n  },\n  \"minecraft:chorus_fruit\": {\n    \"1.13\": \"747\",\n    \"1.13.2\": \"752\"\n  },\n  \"minecraft:chorus_plant\": {\n    \"1.13\": \"142\",\n    \"1.13.2\": \"142\"\n  },\n  \"minecraft:clay\": {\n    \"legacy\": \"82\",\n    \"1.13\": \"173\",\n    \"1.13.2\": \"173\"\n  },\n  \"minecraft:clay_ball\": {\n    \"legacy\": \"337\",\n    \"1.13\": \"552\",\n    \"1.13.2\": \"557\"\n  },\n  \"minecraft:clock\": {\n    \"legacy\": \"347\",\n    \"1.13\": \"564\",\n    \"1.13.2\": \"569\"\n  },\n  \"minecraft:coal\": {\n    \"legacy\": \"263\",\n    \"1.13\": \"474\",\n    \"1.13.2\": \"479\"\n  },\n  \"minecraft:coal_block\": {\n    \"legacy\": \"173\",\n    \"1.13\": \"299\",\n    \"1.13.2\": \"299\"\n  },\n  \"minecraft:coal_ore\": {\n    \"legacy\": \"16\",\n    \"1.13\": \"31\",\n    \"1.13.2\": \"31\"\n  },\n  \"minecraft:coarse_dirt\": {\n    \"1.13\": \"10\",\n    \"1.13.2\": \"10\"\n  },\n  \"minecraft:cobblestone\": {\n    \"legacy\": \"4\",\n    \"1.13\": \"12\",\n    \"1.13.2\": \"12\"\n  },\n  \"minecraft:cobblestone_slab\": {\n    \"1.13\": \"121\",\n    \"1.13.2\": \"121\"\n  },\n  \"minecraft:cobblestone_stairs\": {\n    \"legacy\": \"67\",\n    \"1.13\": \"157\",\n    \"1.13.2\": \"157\"\n  },\n  \"minecraft:cobblestone_wall\": {\n    \"legacy\": \"139\",\n    \"1.13\": \"239\",\n    \"1.13.2\": \"239\"\n  },\n  \"minecraft:cobweb\": {\n    \"legacy\": \"30\",\n    \"1.13\": \"75\",\n    \"1.13.2\": \"75\"\n  },\n  \"minecraft:cocoa_beans\": {\n    \"1.13\": \"575\",\n    \"1.13.2\": \"580\"\n  },\n  \"minecraft:cod\": {\n    \"1.13\": \"566\",\n    \"1.13.2\": \"571\"\n  },\n  \"minecraft:cod_bucket\": {\n    \"1.13\": \"549\",\n    \"1.13.2\": \"554\"\n  },\n  \"minecraft:cod_spawn_egg\": {\n    \"1.13\": \"638\",\n    \"1.13.2\": \"643\"\n  },\n  \"minecraft:command_block\": {\n    \"legacy\": \"137\",\n    \"1.13\": \"237\",\n    \"1.13.2\": \"237\"\n  },\n  \"minecraft:command_block_minecart\": {\n    \"legacy\": \"422\",\n    \"1.13\": \"727\",\n    \"1.13.2\": \"732\"\n  },\n  \"minecraft:comparator\": {\n    \"legacy\": \"404\",\n    \"1.13\": \"463\",\n    \"1.13.2\": \"468\"\n  },\n  \"minecraft:compass\": {\n    \"legacy\": \"345\",\n    \"1.13\": \"562\",\n    \"1.13.2\": \"567\"\n  },\n  \"minecraft:conduit\": {\n    \"1.13\": \"454\",\n    \"1.13.2\": \"459\"\n  },\n  \"minecraft:cooked_beef\": {\n    \"legacy\": \"364\",\n    \"1.13\": \"615\",\n    \"1.13.2\": \"620\"\n  },\n  \"minecraft:cooked_chicken\": {\n    \"legacy\": \"366\",\n    \"1.13\": \"617\",\n    \"1.13.2\": \"622\"\n  },\n  \"minecraft:cooked_cod\": {\n    \"legacy\": \"350\",\n    \"1.13\": \"570\",\n    \"1.13.2\": \"575\"\n  },\n  \"minecraft:cooked_mutton\": {\n    \"legacy\": \"424\",\n    \"1.13\": \"729\",\n    \"1.13.2\": \"734\"\n  },\n  \"minecraft:cooked_porkchop\": {\n    \"legacy\": \"320\",\n    \"1.13\": \"532\",\n    \"1.13.2\": \"537\"\n  },\n  \"minecraft:cooked_rabbit\": {\n    \"legacy\": \"412\",\n    \"1.13\": \"717\",\n    \"1.13.2\": \"722\"\n  },\n  \"minecraft:cooked_salmon\": {\n    \"1.13\": \"571\",\n    \"1.13.2\": \"576\"\n  },\n  \"minecraft:cookie\": {\n    \"legacy\": \"357\",\n    \"1.13\": \"607\",\n    \"1.13.2\": \"612\"\n  },\n  \"minecraft:cow_spawn_egg\": {\n    \"1.13\": \"639\",\n    \"1.13.2\": \"644\"\n  },\n  \"minecraft:cracked_stone_bricks\": {\n    \"1.13\": \"201\",\n    \"1.13.2\": \"201\"\n  },\n  \"minecraft:crafting_table\": {\n    \"legacy\": \"58\",\n    \"1.13\": \"152\",\n    \"1.13.2\": \"152\"\n  },\n  \"minecraft:creeper_head\": {\n    \"1.13\": \"702\",\n    \"1.13.2\": \"707\"\n  },\n  \"minecraft:creeper_spawn_egg\": {\n    \"1.13\": \"640\",\n    \"1.13.2\": \"645\"\n  },\n  \"minecraft:cut_red_sandstone\": {\n    \"1.13\": \"352\",\n    \"1.13.2\": \"352\"\n  },\n  \"minecraft:cut_sandstone\": {\n    \"1.13\": \"70\",\n    \"1.13.2\": \"70\"\n  },\n  \"minecraft:cyan_banner\": {\n    \"1.13\": \"739\",\n    \"1.13.2\": \"744\"\n  },\n  \"minecraft:cyan_bed\": {\n    \"1.13\": \"600\",\n    \"1.13.2\": \"605\"\n  },\n  \"minecraft:cyan_carpet\": {\n    \"1.13\": \"291\",\n    \"1.13.2\": \"291\"\n  },\n  \"minecraft:cyan_concrete\": {\n    \"1.13\": \"404\",\n    \"1.13.2\": \"404\"\n  },\n  \"minecraft:cyan_concrete_powder\": {\n    \"1.13\": \"420\",\n    \"1.13.2\": \"420\"\n  },\n  \"minecraft:cyan_dye\": {\n    \"1.13\": \"578\",\n    \"1.13.2\": \"583\"\n  },\n  \"minecraft:cyan_glazed_terracotta\": {\n    \"1.13\": \"388\",\n    \"1.13.2\": \"388\"\n  },\n  \"minecraft:cyan_shulker_box\": {\n    \"1.13\": \"372\",\n    \"1.13.2\": \"372\"\n  },\n  \"minecraft:cyan_stained_glass\": {\n    \"1.13\": \"320\",\n    \"1.13.2\": \"320\"\n  },\n  \"minecraft:cyan_stained_glass_pane\": {\n    \"1.13\": \"336\",\n    \"1.13.2\": \"336\"\n  },\n  \"minecraft:cyan_terracotta\": {\n    \"1.13\": \"272\",\n    \"1.13.2\": \"272\"\n  },\n  \"minecraft:cyan_wool\": {\n    \"1.13\": \"91\",\n    \"1.13.2\": \"91\"\n  },\n  \"minecraft:damaged_anvil\": {\n    \"1.13\": \"249\",\n    \"1.13.2\": \"249\"\n  },\n  \"minecraft:dandelion\": {\n    \"legacy\": \"37\",\n    \"1.13\": \"98\",\n    \"1.13.2\": \"98\"\n  },\n  \"minecraft:dark_oak_boat\": {\n    \"1.13\": \"763\",\n    \"1.13.2\": \"768\"\n  },\n  \"minecraft:dark_oak_button\": {\n    \"1.13\": \"246\",\n    \"1.13.2\": \"246\"\n  },\n  \"minecraft:dark_oak_door\": {\n    \"legacy\": \"431\",\n    \"1.13\": \"461\",\n    \"1.13.2\": \"466\"\n  },\n  \"minecraft:dark_oak_fence\": {\n    \"legacy\": \"191\",\n    \"1.13\": \"180\",\n    \"1.13.2\": \"180\"\n  },\n  \"minecraft:dark_oak_fence_gate\": {\n    \"legacy\": \"186\",\n    \"1.13\": \"215\",\n    \"1.13.2\": \"215\"\n  },\n  \"minecraft:dark_oak_leaves\": {\n    \"1.13\": \"61\",\n    \"1.13.2\": \"61\"\n  },\n  \"minecraft:dark_oak_log\": {\n    \"1.13\": \"37\",\n    \"1.13.2\": \"37\"\n  },\n  \"minecraft:dark_oak_planks\": {\n    \"1.13\": \"18\",\n    \"1.13.2\": \"18\"\n  },\n  \"minecraft:dark_oak_pressure_plate\": {\n    \"1.13\": \"165\",\n    \"1.13.2\": \"165\"\n  },\n  \"minecraft:dark_oak_sapling\": {\n    \"1.13\": \"24\",\n    \"1.13.2\": \"24\"\n  },\n  \"minecraft:dark_oak_slab\": {\n    \"1.13\": \"117\",\n    \"1.13.2\": \"117\"\n  },\n  \"minecraft:dark_oak_stairs\": {\n    \"legacy\": \"164\",\n    \"1.13\": \"302\",\n    \"1.13.2\": \"302\"\n  },\n  \"minecraft:dark_oak_trapdoor\": {\n    \"1.13\": \"192\",\n    \"1.13.2\": \"192\"\n  },\n  \"minecraft:dark_oak_wood\": {\n    \"1.13\": \"55\",\n    \"1.13.2\": \"55\"\n  },\n  \"minecraft:dark_prismarine\": {\n    \"1.13\": \"345\",\n    \"1.13.2\": \"345\"\n  },\n  \"minecraft:dark_prismarine_slab\": {\n    \"1.13\": \"130\",\n    \"1.13.2\": \"130\"\n  },\n  \"minecraft:dark_prismarine_stairs\": {\n    \"1.13\": \"348\",\n    \"1.13.2\": \"348\"\n  },\n  \"minecraft:daylight_detector\": {\n    \"legacy\": \"151\",\n    \"1.13\": \"253\",\n    \"1.13.2\": \"253\"\n  },\n  \"minecraft:dead_brain_coral\": {\n    \"1.13.2\": \"443\"\n  },\n  \"minecraft:dead_brain_coral_block\": {\n    \"1.13\": \"429\",\n    \"1.13.2\": \"429\"\n  },\n  \"minecraft:dead_brain_coral_fan\": {\n    \"1.13\": \"449\",\n    \"1.13.2\": \"454\"\n  },\n  \"minecraft:dead_bubble_coral\": {\n    \"1.13.2\": \"444\"\n  },\n  \"minecraft:dead_bubble_coral_block\": {\n    \"1.13\": \"430\",\n    \"1.13.2\": \"430\"\n  },\n  \"minecraft:dead_bubble_coral_fan\": {\n    \"1.13\": \"450\",\n    \"1.13.2\": \"455\"\n  },\n  \"minecraft:dead_bush\": {\n    \"legacy\": \"32\",\n    \"1.13\": \"78\",\n    \"1.13.2\": \"78\"\n  },\n  \"minecraft:dead_fire_coral\": {\n    \"1.13.2\": \"445\"\n  },\n  \"minecraft:dead_fire_coral_block\": {\n    \"1.13\": \"431\",\n    \"1.13.2\": \"431\"\n  },\n  \"minecraft:dead_fire_coral_fan\": {\n    \"1.13\": \"451\",\n    \"1.13.2\": \"456\"\n  },\n  \"minecraft:dead_horn_coral\": {\n    \"1.13.2\": \"446\"\n  },\n  \"minecraft:dead_horn_coral_block\": {\n    \"1.13\": \"432\",\n    \"1.13.2\": \"432\"\n  },\n  \"minecraft:dead_horn_coral_fan\": {\n    \"1.13\": \"452\",\n    \"1.13.2\": \"457\"\n  },\n  \"minecraft:dead_tube_coral\": {\n    \"1.13.2\": \"447\"\n  },\n  \"minecraft:dead_tube_coral_block\": {\n    \"1.13\": \"428\",\n    \"1.13.2\": \"428\"\n  },\n  \"minecraft:dead_tube_coral_fan\": {\n    \"1.13\": \"448\",\n    \"1.13.2\": \"453\"\n  },\n  \"minecraft:debug_stick\": {\n    \"1.13\": \"768\",\n    \"1.13.2\": \"773\"\n  },\n  \"minecraft:detector_rail\": {\n    \"legacy\": \"28\",\n    \"1.13\": \"73\",\n    \"1.13.2\": \"73\"\n  },\n  \"minecraft:diamond\": {\n    \"legacy\": \"264\",\n    \"1.13\": \"476\",\n    \"1.13.2\": \"481\"\n  },\n  \"minecraft:diamond_axe\": {\n    \"legacy\": \"279\",\n    \"1.13\": \"491\",\n    \"1.13.2\": \"496\"\n  },\n  \"minecraft:diamond_block\": {\n    \"legacy\": \"57\",\n    \"1.13\": \"151\",\n    \"1.13.2\": \"151\"\n  },\n  \"minecraft:diamond_boots\": {\n    \"legacy\": \"313\",\n    \"1.13\": \"525\",\n    \"1.13.2\": \"530\"\n  },\n  \"minecraft:diamond_chestplate\": {\n    \"legacy\": \"311\",\n    \"1.13\": \"523\",\n    \"1.13.2\": \"528\"\n  },\n  \"minecraft:diamond_helmet\": {\n    \"legacy\": \"310\",\n    \"1.13\": \"522\",\n    \"1.13.2\": \"527\"\n  },\n  \"minecraft:diamond_hoe\": {\n    \"legacy\": \"293\",\n    \"1.13\": \"505\",\n    \"1.13.2\": \"510\"\n  },\n  \"minecraft:diamond_horse_armor\": {\n    \"legacy\": \"419\",\n    \"1.13\": \"724\",\n    \"1.13.2\": \"729\"\n  },\n  \"minecraft:diamond_leggings\": {\n    \"legacy\": \"312\",\n    \"1.13\": \"524\",\n    \"1.13.2\": \"529\"\n  },\n  \"minecraft:diamond_ore\": {\n    \"legacy\": \"56\",\n    \"1.13\": \"150\",\n    \"1.13.2\": \"150\"\n  },\n  \"minecraft:diamond_pickaxe\": {\n    \"legacy\": \"278\",\n    \"1.13\": \"490\",\n    \"1.13.2\": \"495\"\n  },\n  \"minecraft:diamond_shovel\": {\n    \"legacy\": \"277\",\n    \"1.13\": \"489\",\n    \"1.13.2\": \"494\"\n  },\n  \"minecraft:diamond_sword\": {\n    \"legacy\": \"276\",\n    \"1.13\": \"488\",\n    \"1.13.2\": \"493\"\n  },\n  \"minecraft:diorite\": {\n    \"1.13\": \"4\",\n    \"1.13.2\": \"4\"\n  },\n  \"minecraft:dirt\": {\n    \"legacy\": \"3\",\n    \"1.13\": \"9\",\n    \"1.13.2\": \"9\"\n  },\n  \"minecraft:dispenser\": {\n    \"legacy\": \"23\",\n    \"1.13\": \"67\",\n    \"1.13.2\": \"67\"\n  },\n  \"minecraft:dolphin_spawn_egg\": {\n    \"1.13\": \"641\",\n    \"1.13.2\": \"646\"\n  },\n  \"minecraft:donkey_spawn_egg\": {\n    \"1.13\": \"642\",\n    \"1.13.2\": \"647\"\n  },\n  \"minecraft:dragon_breath\": {\n    \"1.13\": \"752\",\n    \"1.13.2\": \"757\"\n  },\n  \"minecraft:dragon_egg\": {\n    \"legacy\": \"122\",\n    \"1.13\": \"227\",\n    \"1.13.2\": \"227\"\n  },\n  \"minecraft:dragon_head\": {\n    \"1.13\": \"703\",\n    \"1.13.2\": \"708\"\n  },\n  \"minecraft:dried_kelp\": {\n    \"1.13\": \"611\",\n    \"1.13.2\": \"616\"\n  },\n  \"minecraft:dried_kelp_block\": {\n    \"1.13\": \"555\",\n    \"1.13.2\": \"560\"\n  },\n  \"minecraft:dropper\": {\n    \"legacy\": \"158\",\n    \"1.13\": \"262\",\n    \"1.13.2\": \"262\"\n  },\n  \"minecraft:drowned_spawn_egg\": {\n    \"1.13\": \"643\",\n    \"1.13.2\": \"648\"\n  },\n  \"minecraft:egg\": {\n    \"legacy\": \"344\",\n    \"1.13\": \"561\",\n    \"1.13.2\": \"566\"\n  },\n  \"minecraft:elder_guardian_spawn_egg\": {\n    \"1.13\": \"644\",\n    \"1.13.2\": \"649\"\n  },\n  \"minecraft:elytra\": {\n    \"1.13\": \"758\",\n    \"1.13.2\": \"763\"\n  },\n  \"minecraft:emerald\": {\n    \"legacy\": \"388\",\n    \"1.13\": \"689\",\n    \"1.13.2\": \"694\"\n  },\n  \"minecraft:emerald_block\": {\n    \"legacy\": \"133\",\n    \"1.13\": \"233\",\n    \"1.13.2\": \"233\"\n  },\n  \"minecraft:emerald_ore\": {\n    \"legacy\": \"129\",\n    \"1.13\": \"230\",\n    \"1.13.2\": \"230\"\n  },\n  \"minecraft:enchanted_book\": {\n    \"legacy\": \"403\",\n    \"1.13\": \"709\",\n    \"1.13.2\": \"714\"\n  },\n  \"minecraft:enchanted_golden_apple\": {\n    \"1.13\": \"535\",\n    \"1.13.2\": \"540\"\n  },\n  \"minecraft:enchanting_table\": {\n    \"legacy\": \"116\",\n    \"1.13\": \"223\",\n    \"1.13.2\": \"223\"\n  },\n  \"minecraft:end_crystal\": {\n    \"1.13\": \"746\",\n    \"1.13.2\": \"751\"\n  },\n  \"minecraft:end_portal_frame\": {\n    \"legacy\": \"120\",\n    \"1.13\": \"224\",\n    \"1.13.2\": \"224\"\n  },\n  \"minecraft:end_rod\": {\n    \"1.13\": \"141\",\n    \"1.13.2\": \"141\"\n  },\n  \"minecraft:end_stone\": {\n    \"legacy\": \"121\",\n    \"1.13\": \"225\",\n    \"1.13.2\": \"225\"\n  },\n  \"minecraft:end_stone_bricks\": {\n    \"1.13\": \"226\",\n    \"1.13.2\": \"226\"\n  },\n  \"minecraft:ender_chest\": {\n    \"legacy\": \"130\",\n    \"1.13\": \"231\",\n    \"1.13.2\": \"231\"\n  },\n  \"minecraft:ender_eye\": {\n    \"legacy\": \"381\",\n    \"1.13\": \"632\",\n    \"1.13.2\": \"637\"\n  },\n  \"minecraft:ender_pearl\": {\n    \"legacy\": \"368\",\n    \"1.13\": \"619\",\n    \"1.13.2\": \"624\"\n  },\n  \"minecraft:enderman_spawn_egg\": {\n    \"1.13\": \"645\",\n    \"1.13.2\": \"650\"\n  },\n  \"minecraft:endermite_spawn_egg\": {\n    \"1.13\": \"646\",\n    \"1.13.2\": \"651\"\n  },\n  \"minecraft:evoker_spawn_egg\": {\n    \"1.13\": \"647\",\n    \"1.13.2\": \"652\"\n  },\n  \"minecraft:experience_bottle\": {\n    \"legacy\": \"384\",\n    \"1.13\": \"685\",\n    \"1.13.2\": \"690\"\n  },\n  \"minecraft:farmland\": {\n    \"legacy\": \"60\",\n    \"1.13\": \"153\",\n    \"1.13.2\": \"153\"\n  },\n  \"minecraft:feather\": {\n    \"legacy\": \"288\",\n    \"1.13\": \"500\",\n    \"1.13.2\": \"505\"\n  },\n  \"minecraft:fermented_spider_eye\": {\n    \"legacy\": \"376\",\n    \"1.13\": \"627\",\n    \"1.13.2\": \"632\"\n  },\n  \"minecraft:fern\": {\n    \"1.13\": \"77\",\n    \"1.13.2\": \"77\"\n  },\n  \"minecraft:filled_map\": {\n    \"legacy\": \"358\",\n    \"1.13\": \"608\",\n    \"1.13.2\": \"613\"\n  },\n  \"minecraft:fire_charge\": {\n    \"legacy\": \"385\",\n    \"1.13\": \"686\",\n    \"1.13.2\": \"691\"\n  },\n  \"minecraft:fire_coral\": {\n    \"1.13\": \"441\",\n    \"1.13.2\": \"441\"\n  },\n  \"minecraft:fire_coral_block\": {\n    \"1.13\": \"436\",\n    \"1.13.2\": \"436\"\n  },\n  \"minecraft:fire_coral_fan\": {\n    \"1.13\": \"446\",\n    \"1.13.2\": \"451\"\n  },\n  \"minecraft:firework_rocket\": {\n    \"legacy\": \"401\",\n    \"1.13\": \"707\",\n    \"1.13.2\": \"712\"\n  },\n  \"minecraft:firework_star\": {\n    \"legacy\": \"402\",\n    \"1.13\": \"708\",\n    \"1.13.2\": \"713\"\n  },\n  \"minecraft:fishing_rod\": {\n    \"legacy\": \"346\",\n    \"1.13\": \"563\",\n    \"1.13.2\": \"568\"\n  },\n  \"minecraft:flint\": {\n    \"legacy\": \"318\",\n    \"1.13\": \"530\",\n    \"1.13.2\": \"535\"\n  },\n  \"minecraft:flint_and_steel\": {\n    \"legacy\": \"259\",\n    \"1.13\": \"470\",\n    \"1.13.2\": \"475\"\n  },\n  \"minecraft:flower_pot\": {\n    \"legacy\": \"390\",\n    \"1.13\": \"691\",\n    \"1.13.2\": \"696\"\n  },\n  \"minecraft:furnace\": {\n    \"legacy\": \"61\",\n    \"1.13\": \"154\",\n    \"1.13.2\": \"154\"\n  },\n  \"minecraft:furnace_minecart\": {\n    \"legacy\": \"343\",\n    \"1.13\": \"560\",\n    \"1.13.2\": \"565\"\n  },\n  \"minecraft:ghast_spawn_egg\": {\n    \"1.13\": \"648\",\n    \"1.13.2\": \"653\"\n  },\n  \"minecraft:ghast_tear\": {\n    \"legacy\": \"370\",\n    \"1.13\": \"621\",\n    \"1.13.2\": \"626\"\n  },\n  \"minecraft:glass\": {\n    \"legacy\": \"20\",\n    \"1.13\": \"64\",\n    \"1.13.2\": \"64\"\n  },\n  \"minecraft:glass_bottle\": {\n    \"legacy\": \"374\",\n    \"1.13\": \"625\",\n    \"1.13.2\": \"630\"\n  },\n  \"minecraft:glass_pane\": {\n    \"legacy\": \"102\",\n    \"1.13\": \"207\",\n    \"1.13.2\": \"207\"\n  },\n  \"minecraft:glistering_melon_slice\": {\n    \"legacy\": \"382\",\n    \"1.13\": \"633\",\n    \"1.13.2\": \"638\"\n  },\n  \"minecraft:glowstone\": {\n    \"legacy\": \"89\",\n    \"1.13\": \"185\",\n    \"1.13.2\": \"185\"\n  },\n  \"minecraft:glowstone_dust\": {\n    \"legacy\": \"348\",\n    \"1.13\": \"565\",\n    \"1.13.2\": \"570\"\n  },\n  \"minecraft:gold_block\": {\n    \"legacy\": \"41\",\n    \"1.13\": \"110\",\n    \"1.13.2\": \"110\"\n  },\n  \"minecraft:gold_ingot\": {\n    \"legacy\": \"266\",\n    \"1.13\": \"478\",\n    \"1.13.2\": \"483\"\n  },\n  \"minecraft:gold_nugget\": {\n    \"legacy\": \"371\",\n    \"1.13\": \"622\",\n    \"1.13.2\": \"627\"\n  },\n  \"minecraft:gold_ore\": {\n    \"legacy\": \"14\",\n    \"1.13\": \"29\",\n    \"1.13.2\": \"29\"\n  },\n  \"minecraft:golden_apple\": {\n    \"legacy\": \"322\",\n    \"1.13\": \"534\",\n    \"1.13.2\": \"539\"\n  },\n  \"minecraft:golden_axe\": {\n    \"legacy\": \"286\",\n    \"1.13\": \"498\",\n    \"1.13.2\": \"503\"\n  },\n  \"minecraft:golden_boots\": {\n    \"legacy\": \"317\",\n    \"1.13\": \"529\",\n    \"1.13.2\": \"534\"\n  },\n  \"minecraft:golden_carrot\": {\n    \"legacy\": \"396\",\n    \"1.13\": \"697\",\n    \"1.13.2\": \"702\"\n  },\n  \"minecraft:golden_chestplate\": {\n    \"legacy\": \"315\",\n    \"1.13\": \"527\",\n    \"1.13.2\": \"532\"\n  },\n  \"minecraft:golden_helmet\": {\n    \"legacy\": \"314\",\n    \"1.13\": \"526\",\n    \"1.13.2\": \"531\"\n  },\n  \"minecraft:golden_hoe\": {\n    \"legacy\": \"294\",\n    \"1.13\": \"506\",\n    \"1.13.2\": \"511\"\n  },\n  \"minecraft:golden_horse_armor\": {\n    \"legacy\": \"418\",\n    \"1.13\": \"723\",\n    \"1.13.2\": \"728\"\n  },\n  \"minecraft:golden_leggings\": {\n    \"legacy\": \"316\",\n    \"1.13\": \"528\",\n    \"1.13.2\": \"533\"\n  },\n  \"minecraft:golden_pickaxe\": {\n    \"legacy\": \"285\",\n    \"1.13\": \"497\",\n    \"1.13.2\": \"502\"\n  },\n  \"minecraft:golden_shovel\": {\n    \"legacy\": \"284\",\n    \"1.13\": \"496\",\n    \"1.13.2\": \"501\"\n  },\n  \"minecraft:golden_sword\": {\n    \"legacy\": \"283\",\n    \"1.13\": \"495\",\n    \"1.13.2\": \"500\"\n  },\n  \"minecraft:granite\": {\n    \"1.13\": \"2\",\n    \"1.13.2\": \"2\"\n  },\n  \"minecraft:short_grass\": {\n    \"legacy\": \"2\",\n    \"1.13\": \"76\",\n    \"1.13.2\": \"76\"\n  },\n  \"minecraft:grass_block\": {\n    \"1.13\": \"8\",\n    \"1.13.2\": \"8\"\n  },\n  \"minecraft:gravel\": {\n    \"legacy\": \"13\",\n    \"1.13\": \"28\",\n    \"1.13.2\": \"28\"\n  },\n  \"minecraft:gray_banner\": {\n    \"1.13\": \"737\",\n    \"1.13.2\": \"742\"\n  },\n  \"minecraft:gray_bed\": {\n    \"1.13\": \"598\",\n    \"1.13.2\": \"603\"\n  },\n  \"minecraft:gray_carpet\": {\n    \"1.13\": \"289\",\n    \"1.13.2\": \"289\"\n  },\n  \"minecraft:gray_concrete\": {\n    \"1.13\": \"402\",\n    \"1.13.2\": \"402\"\n  },\n  \"minecraft:gray_concrete_powder\": {\n    \"1.13\": \"418\",\n    \"1.13.2\": \"418\"\n  },\n  \"minecraft:gray_dye\": {\n    \"1.13\": \"580\",\n    \"1.13.2\": \"585\"\n  },\n  \"minecraft:gray_glazed_terracotta\": {\n    \"1.13\": \"386\",\n    \"1.13.2\": \"386\"\n  },\n  \"minecraft:gray_shulker_box\": {\n    \"1.13\": \"370\",\n    \"1.13.2\": \"370\"\n  },\n  \"minecraft:gray_stained_glass\": {\n    \"1.13\": \"318\",\n    \"1.13.2\": \"318\"\n  },\n  \"minecraft:gray_stained_glass_pane\": {\n    \"1.13\": \"334\",\n    \"1.13.2\": \"334\"\n  },\n  \"minecraft:gray_terracotta\": {\n    \"1.13\": \"270\",\n    \"1.13.2\": \"270\"\n  },\n  \"minecraft:gray_wool\": {\n    \"1.13\": \"89\",\n    \"1.13.2\": \"89\"\n  },\n  \"minecraft:green_banner\": {\n    \"1.13\": \"743\",\n    \"1.13.2\": \"748\"\n  },\n  \"minecraft:green_bed\": {\n    \"1.13\": \"604\",\n    \"1.13.2\": \"609\"\n  },\n  \"minecraft:green_carpet\": {\n    \"1.13\": \"295\",\n    \"1.13.2\": \"295\"\n  },\n  \"minecraft:green_concrete\": {\n    \"1.13\": \"408\",\n    \"1.13.2\": \"408\"\n  },\n  \"minecraft:green_concrete_powder\": {\n    \"1.13\": \"424\",\n    \"1.13.2\": \"424\"\n  },\n  \"minecraft:green_dye\": {\n    \"1.13.2\": \"579\"\n  },\n  \"minecraft:green_glazed_terracotta\": {\n    \"1.13\": \"392\",\n    \"1.13.2\": \"392\"\n  },\n  \"minecraft:green_shulker_box\": {\n    \"1.13\": \"376\",\n    \"1.13.2\": \"376\"\n  },\n  \"minecraft:green_stained_glass\": {\n    \"1.13\": \"324\",\n    \"1.13.2\": \"324\"\n  },\n  \"minecraft:green_stained_glass_pane\": {\n    \"1.13\": \"340\",\n    \"1.13.2\": \"340\"\n  },\n  \"minecraft:green_terracotta\": {\n    \"1.13\": \"276\",\n    \"1.13.2\": \"276\"\n  },\n  \"minecraft:green_wool\": {\n    \"1.13\": \"95\",\n    \"1.13.2\": \"95\"\n  },\n  \"minecraft:guardian_spawn_egg\": {\n    \"1.13\": \"649\",\n    \"1.13.2\": \"654\"\n  },\n  \"minecraft:gunpowder\": {\n    \"legacy\": \"289\",\n    \"1.13\": \"501\",\n    \"1.13.2\": \"506\"\n  },\n  \"minecraft:hay_block\": {\n    \"legacy\": \"170\",\n    \"1.13\": \"281\",\n    \"1.13.2\": \"281\"\n  },\n  \"minecraft:heart_of_the_sea\": {\n    \"1.13\": \"784\",\n    \"1.13.2\": \"789\"\n  },\n  \"minecraft:heavy_weighted_pressure_plate\": {\n    \"legacy\": \"148\",\n    \"1.13\": \"252\",\n    \"1.13.2\": \"252\"\n  },\n  \"minecraft:hopper\": {\n    \"legacy\": \"154\",\n    \"1.13\": \"256\",\n    \"1.13.2\": \"256\"\n  },\n  \"minecraft:hopper_minecart\": {\n    \"legacy\": \"408\",\n    \"1.13\": \"713\",\n    \"1.13.2\": \"718\"\n  },\n  \"minecraft:horn_coral\": {\n    \"1.13\": \"442\",\n    \"1.13.2\": \"442\"\n  },\n  \"minecraft:horn_coral_block\": {\n    \"1.13\": \"437\",\n    \"1.13.2\": \"437\"\n  },\n  \"minecraft:horn_coral_fan\": {\n    \"1.13\": \"447\",\n    \"1.13.2\": \"452\"\n  },\n  \"minecraft:horse_spawn_egg\": {\n    \"1.13\": \"650\",\n    \"1.13.2\": \"655\"\n  },\n  \"minecraft:husk_spawn_egg\": {\n    \"1.13\": \"651\",\n    \"1.13.2\": \"656\"\n  },\n  \"minecraft:ice\": {\n    \"legacy\": \"79\",\n    \"1.13\": \"170\",\n    \"1.13.2\": \"170\"\n  },\n  \"minecraft:infested_chiseled_stone_bricks\": {\n    \"1.13\": \"198\",\n    \"1.13.2\": \"198\"\n  },\n  \"minecraft:infested_cobblestone\": {\n    \"1.13\": \"194\",\n    \"1.13.2\": \"194\"\n  },\n  \"minecraft:infested_cracked_stone_bricks\": {\n    \"1.13\": \"197\",\n    \"1.13.2\": \"197\"\n  },\n  \"minecraft:infested_mossy_stone_bricks\": {\n    \"1.13\": \"196\",\n    \"1.13.2\": \"196\"\n  },\n  \"minecraft:infested_stone\": {\n    \"1.13\": \"193\",\n    \"1.13.2\": \"193\"\n  },\n  \"minecraft:infested_stone_bricks\": {\n    \"1.13\": \"195\",\n    \"1.13.2\": \"195\"\n  },\n  \"minecraft:ink_sac\": {\n    \"1.13\": \"572\",\n    \"1.13.2\": \"577\"\n  },\n  \"minecraft:iron_axe\": {\n    \"legacy\": \"258\",\n    \"1.13\": \"469\",\n    \"1.13.2\": \"474\"\n  },\n  \"minecraft:iron_bars\": {\n    \"legacy\": \"101\",\n    \"1.13\": \"206\",\n    \"1.13.2\": \"206\"\n  },\n  \"minecraft:iron_block\": {\n    \"legacy\": \"42\",\n    \"1.13\": \"111\",\n    \"1.13.2\": \"111\"\n  },\n  \"minecraft:iron_boots\": {\n    \"legacy\": \"309\",\n    \"1.13\": \"521\",\n    \"1.13.2\": \"526\"\n  },\n  \"minecraft:iron_chestplate\": {\n    \"legacy\": \"307\",\n    \"1.13\": \"519\",\n    \"1.13.2\": \"524\"\n  },\n  \"minecraft:iron_door\": {\n    \"legacy\": \"330\",\n    \"1.13\": \"455\",\n    \"1.13.2\": \"460\"\n  },\n  \"minecraft:iron_helmet\": {\n    \"legacy\": \"306\",\n    \"1.13\": \"518\",\n    \"1.13.2\": \"523\"\n  },\n  \"minecraft:iron_hoe\": {\n    \"legacy\": \"292\",\n    \"1.13\": \"504\",\n    \"1.13.2\": \"509\"\n  },\n  \"minecraft:iron_horse_armor\": {\n    \"legacy\": \"417\",\n    \"1.13\": \"722\",\n    \"1.13.2\": \"727\"\n  },\n  \"minecraft:iron_ingot\": {\n    \"legacy\": \"265\",\n    \"1.13\": \"477\",\n    \"1.13.2\": \"482\"\n  },\n  \"minecraft:iron_leggings\": {\n    \"legacy\": \"308\",\n    \"1.13\": \"520\",\n    \"1.13.2\": \"525\"\n  },\n  \"minecraft:iron_nugget\": {\n    \"1.13\": \"766\",\n    \"1.13.2\": \"771\"\n  },\n  \"minecraft:iron_ore\": {\n    \"legacy\": \"15\",\n    \"1.13\": \"30\",\n    \"1.13.2\": \"30\"\n  },\n  \"minecraft:iron_pickaxe\": {\n    \"legacy\": \"257\",\n    \"1.13\": \"468\",\n    \"1.13.2\": \"473\"\n  },\n  \"minecraft:iron_shovel\": {\n    \"legacy\": \"256\",\n    \"1.13\": \"467\",\n    \"1.13.2\": \"472\"\n  },\n  \"minecraft:iron_sword\": {\n    \"legacy\": \"267\",\n    \"1.13\": \"479\",\n    \"1.13.2\": \"484\"\n  },\n  \"minecraft:iron_trapdoor\": {\n    \"legacy\": \"167\",\n    \"1.13\": \"280\",\n    \"1.13.2\": \"280\"\n  },\n  \"minecraft:item_frame\": {\n    \"legacy\": \"389\",\n    \"1.13\": \"690\",\n    \"1.13.2\": \"695\"\n  },\n  \"minecraft:jack_o_lantern\": {\n    \"legacy\": \"91\",\n    \"1.13\": \"186\",\n    \"1.13.2\": \"186\"\n  },\n  \"minecraft:jukebox\": {\n    \"legacy\": \"84\",\n    \"1.13\": \"174\",\n    \"1.13.2\": \"174\"\n  },\n  \"minecraft:jungle_boat\": {\n    \"1.13\": \"761\",\n    \"1.13.2\": \"766\"\n  },\n  \"minecraft:jungle_button\": {\n    \"1.13\": \"244\",\n    \"1.13.2\": \"244\"\n  },\n  \"minecraft:jungle_door\": {\n    \"legacy\": \"429\",\n    \"1.13\": \"459\",\n    \"1.13.2\": \"464\"\n  },\n  \"minecraft:jungle_fence\": {\n    \"legacy\": \"190\",\n    \"1.13\": \"178\",\n    \"1.13.2\": \"178\"\n  },\n  \"minecraft:jungle_fence_gate\": {\n    \"legacy\": \"185\",\n    \"1.13\": \"213\",\n    \"1.13.2\": \"213\"\n  },\n  \"minecraft:jungle_leaves\": {\n    \"1.13\": \"59\",\n    \"1.13.2\": \"59\"\n  },\n  \"minecraft:jungle_log\": {\n    \"1.13\": \"35\",\n    \"1.13.2\": \"35\"\n  },\n  \"minecraft:jungle_planks\": {\n    \"1.13\": \"16\",\n    \"1.13.2\": \"16\"\n  },\n  \"minecraft:jungle_pressure_plate\": {\n    \"1.13\": \"163\",\n    \"1.13.2\": \"163\"\n  },\n  \"minecraft:jungle_sapling\": {\n    \"1.13\": \"22\",\n    \"1.13.2\": \"22\"\n  },\n  \"minecraft:jungle_slab\": {\n    \"1.13\": \"115\",\n    \"1.13.2\": \"115\"\n  },\n  \"minecraft:jungle_stairs\": {\n    \"legacy\": \"136\",\n    \"1.13\": \"236\",\n    \"1.13.2\": \"236\"\n  },\n  \"minecraft:jungle_trapdoor\": {\n    \"1.13\": \"190\",\n    \"1.13.2\": \"190\"\n  },\n  \"minecraft:jungle_wood\": {\n    \"1.13\": \"53\",\n    \"1.13.2\": \"53\"\n  },\n  \"minecraft:kelp\": {\n    \"1.13\": \"554\",\n    \"1.13.2\": \"559\"\n  },\n  \"minecraft:knowledge_book\": {\n    \"1.13\": \"767\",\n    \"1.13.2\": \"772\"\n  },\n  \"minecraft:ladder\": {\n    \"legacy\": \"65\",\n    \"1.13\": \"155\",\n    \"1.13.2\": \"155\"\n  },\n  \"minecraft:lapis_block\": {\n    \"legacy\": \"22\",\n    \"1.13\": \"66\",\n    \"1.13.2\": \"66\"\n  },\n  \"minecraft:lapis_lazuli\": {\n    \"1.13\": \"576\",\n    \"1.13.2\": \"581\"\n  },\n  \"minecraft:lapis_ore\": {\n    \"legacy\": \"21\",\n    \"1.13\": \"65\",\n    \"1.13.2\": \"65\"\n  },\n  \"minecraft:large_fern\": {\n    \"1.13\": \"310\",\n    \"1.13.2\": \"310\"\n  },\n  \"minecraft:lava_bucket\": {\n    \"legacy\": \"327\",\n    \"1.13\": \"539\",\n    \"1.13.2\": \"544\"\n  },\n  \"minecraft:lead\": {\n    \"legacy\": \"420\",\n    \"1.13\": \"725\",\n    \"1.13.2\": \"730\"\n  },\n  \"minecraft:leather\": {\n    \"legacy\": \"334\",\n    \"1.13\": \"545\",\n    \"1.13.2\": \"550\"\n  },\n  \"minecraft:leather_boots\": {\n    \"legacy\": \"301\",\n    \"1.13\": \"513\",\n    \"1.13.2\": \"518\"\n  },\n  \"minecraft:leather_chestplate\": {\n    \"legacy\": \"299\",\n    \"1.13\": \"511\",\n    \"1.13.2\": \"516\"\n  },\n  \"minecraft:leather_helmet\": {\n    \"legacy\": \"298\",\n    \"1.13\": \"510\",\n    \"1.13.2\": \"515\"\n  },\n  \"minecraft:leather_leggings\": {\n    \"legacy\": \"300\",\n    \"1.13\": \"512\",\n    \"1.13.2\": \"517\"\n  },\n  \"minecraft:lever\": {\n    \"legacy\": \"69\",\n    \"1.13\": \"158\",\n    \"1.13.2\": \"158\"\n  },\n  \"minecraft:light_blue_banner\": {\n    \"1.13\": \"733\",\n    \"1.13.2\": \"738\"\n  },\n  \"minecraft:light_blue_bed\": {\n    \"1.13\": \"594\",\n    \"1.13.2\": \"599\"\n  },\n  \"minecraft:light_blue_carpet\": {\n    \"1.13\": \"285\",\n    \"1.13.2\": \"285\"\n  },\n  \"minecraft:light_blue_concrete\": {\n    \"1.13\": \"398\",\n    \"1.13.2\": \"398\"\n  },\n  \"minecraft:light_blue_concrete_powder\": {\n    \"1.13\": \"414\",\n    \"1.13.2\": \"414\"\n  },\n  \"minecraft:light_blue_dye\": {\n    \"1.13\": \"584\",\n    \"1.13.2\": \"589\"\n  },\n  \"minecraft:light_blue_glazed_terracotta\": {\n    \"1.13\": \"382\",\n    \"1.13.2\": \"382\"\n  },\n  \"minecraft:light_blue_shulker_box\": {\n    \"1.13\": \"366\",\n    \"1.13.2\": \"366\"\n  },\n  \"minecraft:light_blue_stained_glass\": {\n    \"1.13\": \"314\",\n    \"1.13.2\": \"314\"\n  },\n  \"minecraft:light_blue_stained_glass_pane\": {\n    \"1.13\": \"330\",\n    \"1.13.2\": \"330\"\n  },\n  \"minecraft:light_blue_terracotta\": {\n    \"1.13\": \"266\",\n    \"1.13.2\": \"266\"\n  },\n  \"minecraft:light_blue_wool\": {\n    \"1.13\": \"85\",\n    \"1.13.2\": \"85\"\n  },\n  \"minecraft:light_gray_banner\": {\n    \"1.13\": \"738\",\n    \"1.13.2\": \"743\"\n  },\n  \"minecraft:light_gray_bed\": {\n    \"1.13\": \"599\",\n    \"1.13.2\": \"604\"\n  },\n  \"minecraft:light_gray_carpet\": {\n    \"1.13\": \"290\",\n    \"1.13.2\": \"290\"\n  },\n  \"minecraft:light_gray_concrete\": {\n    \"1.13\": \"403\",\n    \"1.13.2\": \"403\"\n  },\n  \"minecraft:light_gray_concrete_powder\": {\n    \"1.13\": \"419\",\n    \"1.13.2\": \"419\"\n  },\n  \"minecraft:light_gray_dye\": {\n    \"legacy\": \"351\",\n    \"1.13\": \"579\",\n    \"1.13.2\": \"584\"\n  },\n  \"minecraft:light_gray_glazed_terracotta\": {\n    \"1.13\": \"387\",\n    \"1.13.2\": \"387\"\n  },\n  \"minecraft:light_gray_shulker_box\": {\n    \"1.13\": \"371\",\n    \"1.13.2\": \"371\"\n  },\n  \"minecraft:light_gray_stained_glass\": {\n    \"1.13\": \"319\",\n    \"1.13.2\": \"319\"\n  },\n  \"minecraft:light_gray_stained_glass_pane\": {\n    \"1.13\": \"335\",\n    \"1.13.2\": \"335\"\n  },\n  \"minecraft:light_gray_terracotta\": {\n    \"1.13\": \"271\",\n    \"1.13.2\": \"271\"\n  },\n  \"minecraft:light_gray_wool\": {\n    \"1.13\": \"90\",\n    \"1.13.2\": \"90\"\n  },\n  \"minecraft:light_weighted_pressure_plate\": {\n    \"legacy\": \"147\",\n    \"1.13\": \"251\",\n    \"1.13.2\": \"251\"\n  },\n  \"minecraft:lilac\": {\n    \"1.13\": \"306\",\n    \"1.13.2\": \"306\"\n  },\n  \"minecraft:lily_pad\": {\n    \"legacy\": \"111\",\n    \"1.13\": \"219\",\n    \"1.13.2\": \"219\"\n  },\n  \"minecraft:lime_banner\": {\n    \"1.13\": \"735\",\n    \"1.13.2\": \"740\"\n  },\n  \"minecraft:lime_bed\": {\n    \"1.13\": \"596\",\n    \"1.13.2\": \"601\"\n  },\n  \"minecraft:lime_carpet\": {\n    \"1.13\": \"287\",\n    \"1.13.2\": \"287\"\n  },\n  \"minecraft:lime_concrete\": {\n    \"1.13\": \"400\",\n    \"1.13.2\": \"400\"\n  },\n  \"minecraft:lime_concrete_powder\": {\n    \"1.13\": \"416\",\n    \"1.13.2\": \"416\"\n  },\n  \"minecraft:lime_dye\": {\n    \"1.13\": \"582\",\n    \"1.13.2\": \"587\"\n  },\n  \"minecraft:lime_glazed_terracotta\": {\n    \"1.13\": \"384\",\n    \"1.13.2\": \"384\"\n  },\n  \"minecraft:lime_shulker_box\": {\n    \"1.13\": \"368\",\n    \"1.13.2\": \"368\"\n  },\n  \"minecraft:lime_stained_glass\": {\n    \"1.13\": \"316\",\n    \"1.13.2\": \"316\"\n  },\n  \"minecraft:lime_stained_glass_pane\": {\n    \"1.13\": \"332\",\n    \"1.13.2\": \"332\"\n  },\n  \"minecraft:lime_terracotta\": {\n    \"1.13\": \"268\",\n    \"1.13.2\": \"268\"\n  },\n  \"minecraft:lime_wool\": {\n    \"1.13\": \"87\",\n    \"1.13.2\": \"87\"\n  },\n  \"minecraft:lingering_potion\": {\n    \"1.13\": \"756\",\n    \"1.13.2\": \"761\"\n  },\n  \"minecraft:llama_spawn_egg\": {\n    \"1.13\": \"652\",\n    \"1.13.2\": \"657\"\n  },\n  \"minecraft:magenta_banner\": {\n    \"1.13\": \"732\",\n    \"1.13.2\": \"737\"\n  },\n  \"minecraft:magenta_bed\": {\n    \"1.13\": \"593\",\n    \"1.13.2\": \"598\"\n  },\n  \"minecraft:magenta_carpet\": {\n    \"1.13\": \"284\",\n    \"1.13.2\": \"284\"\n  },\n  \"minecraft:magenta_concrete\": {\n    \"1.13\": \"397\",\n    \"1.13.2\": \"397\"\n  },\n  \"minecraft:magenta_concrete_powder\": {\n    \"1.13\": \"413\",\n    \"1.13.2\": \"413\"\n  },\n  \"minecraft:magenta_dye\": {\n    \"1.13\": \"585\",\n    \"1.13.2\": \"590\"\n  },\n  \"minecraft:magenta_glazed_terracotta\": {\n    \"1.13\": \"381\",\n    \"1.13.2\": \"381\"\n  },\n  \"minecraft:magenta_shulker_box\": {\n    \"1.13\": \"365\",\n    \"1.13.2\": \"365\"\n  },\n  \"minecraft:magenta_stained_glass\": {\n    \"1.13\": \"313\",\n    \"1.13.2\": \"313\"\n  },\n  \"minecraft:magenta_stained_glass_pane\": {\n    \"1.13\": \"329\",\n    \"1.13.2\": \"329\"\n  },\n  \"minecraft:magenta_terracotta\": {\n    \"1.13\": \"265\",\n    \"1.13.2\": \"265\"\n  },\n  \"minecraft:magenta_wool\": {\n    \"1.13\": \"84\",\n    \"1.13.2\": \"84\"\n  },\n  \"minecraft:magma_block\": {\n    \"1.13\": \"356\",\n    \"1.13.2\": \"356\"\n  },\n  \"minecraft:magma_cream\": {\n    \"legacy\": \"378\",\n    \"1.13\": \"629\",\n    \"1.13.2\": \"634\"\n  },\n  \"minecraft:magma_cube_spawn_egg\": {\n    \"1.13\": \"653\",\n    \"1.13.2\": \"658\"\n  },\n  \"minecraft:map\": {\n    \"legacy\": \"395\",\n    \"1.13\": \"696\",\n    \"1.13.2\": \"701\"\n  },\n  \"minecraft:melon\": {\n    \"legacy\": \"360\",\n    \"1.13\": \"208\",\n    \"1.13.2\": \"208\"\n  },\n  \"minecraft:melon_seeds\": {\n    \"legacy\": \"362\",\n    \"1.13\": \"613\",\n    \"1.13.2\": \"618\"\n  },\n  \"minecraft:melon_slice\": {\n    \"1.13\": \"610\",\n    \"1.13.2\": \"615\"\n  },\n  \"minecraft:milk_bucket\": {\n    \"legacy\": \"335\",\n    \"1.13\": \"546\",\n    \"1.13.2\": \"551\"\n  },\n  \"minecraft:minecart\": {\n    \"legacy\": \"328\",\n    \"1.13\": \"540\",\n    \"1.13.2\": \"545\"\n  },\n  \"minecraft:mooshroom_spawn_egg\": {\n    \"1.13\": \"654\",\n    \"1.13.2\": \"659\"\n  },\n  \"minecraft:mossy_cobblestone\": {\n    \"legacy\": \"48\",\n    \"1.13\": \"138\",\n    \"1.13.2\": \"138\"\n  },\n  \"minecraft:mossy_cobblestone_wall\": {\n    \"1.13\": \"240\",\n    \"1.13.2\": \"240\"\n  },\n  \"minecraft:mossy_stone_bricks\": {\n    \"1.13\": \"200\",\n    \"1.13.2\": \"200\"\n  },\n  \"minecraft:mule_spawn_egg\": {\n    \"1.13\": \"655\",\n    \"1.13.2\": \"660\"\n  },\n  \"minecraft:mushroom_stem\": {\n    \"1.13\": \"205\",\n    \"1.13.2\": \"205\"\n  },\n  \"minecraft:mushroom_stew\": {\n    \"legacy\": \"282\",\n    \"1.13\": \"494\",\n    \"1.13.2\": \"499\"\n  },\n  \"minecraft:music_disc_11\": {\n    \"legacy\": \"2266\",\n    \"1.13\": \"779\",\n    \"1.13.2\": \"784\"\n  },\n  \"minecraft:music_disc_13\": {\n    \"legacy\": \"2256\",\n    \"1.13\": \"769\",\n    \"1.13.2\": \"774\"\n  },\n  \"minecraft:music_disc_blocks\": {\n    \"legacy\": \"2258\",\n    \"1.13\": \"771\",\n    \"1.13.2\": \"776\"\n  },\n  \"minecraft:music_disc_cat\": {\n    \"legacy\": \"2257\",\n    \"1.13\": \"770\",\n    \"1.13.2\": \"775\"\n  },\n  \"minecraft:music_disc_chirp\": {\n    \"legacy\": \"2259\",\n    \"1.13\": \"772\",\n    \"1.13.2\": \"777\"\n  },\n  \"minecraft:music_disc_far\": {\n    \"legacy\": \"2260\",\n    \"1.13\": \"773\",\n    \"1.13.2\": \"778\"\n  },\n  \"minecraft:music_disc_mall\": {\n    \"legacy\": \"2261\",\n    \"1.13\": \"774\",\n    \"1.13.2\": \"779\"\n  },\n  \"minecraft:music_disc_mellohi\": {\n    \"legacy\": \"2262\",\n    \"1.13\": \"775\",\n    \"1.13.2\": \"780\"\n  },\n  \"minecraft:music_disc_stal\": {\n    \"legacy\": \"2263\",\n    \"1.13\": \"776\",\n    \"1.13.2\": \"781\"\n  },\n  \"minecraft:music_disc_strad\": {\n    \"legacy\": \"2264\",\n    \"1.13\": \"777\",\n    \"1.13.2\": \"782\"\n  },\n  \"minecraft:music_disc_wait\": {\n    \"legacy\": \"2267\",\n    \"1.13\": \"780\",\n    \"1.13.2\": \"785\"\n  },\n  \"minecraft:music_disc_ward\": {\n    \"legacy\": \"2265\",\n    \"1.13\": \"778\",\n    \"1.13.2\": \"783\"\n  },\n  \"minecraft:mutton\": {\n    \"legacy\": \"423\",\n    \"1.13\": \"728\",\n    \"1.13.2\": \"733\"\n  },\n  \"minecraft:mycelium\": {\n    \"legacy\": \"110\",\n    \"1.13\": \"218\",\n    \"1.13.2\": \"218\"\n  },\n  \"minecraft:name_tag\": {\n    \"legacy\": \"421\",\n    \"1.13\": \"726\",\n    \"1.13.2\": \"731\"\n  },\n  \"minecraft:nautilus_shell\": {\n    \"1.13\": \"783\",\n    \"1.13.2\": \"788\"\n  },\n  \"minecraft:nether_brick\": {\n    \"legacy\": \"112\",\n    \"1.13\": \"710\",\n    \"1.13.2\": \"715\"\n  },\n  \"minecraft:nether_brick_fence\": {\n    \"legacy\": \"113\",\n    \"1.13\": \"221\",\n    \"1.13.2\": \"221\"\n  },\n  \"minecraft:nether_brick_slab\": {\n    \"1.13\": \"124\",\n    \"1.13.2\": \"124\"\n  },\n  \"minecraft:nether_brick_stairs\": {\n    \"legacy\": \"114\",\n    \"1.13\": \"222\",\n    \"1.13.2\": \"222\"\n  },\n  \"minecraft:nether_bricks\": {\n    \"legacy\": \"405\",\n    \"1.13\": \"220\",\n    \"1.13.2\": \"220\"\n  },\n  \"minecraft:nether_quartz_ore\": {\n    \"legacy\": \"153\",\n    \"1.13\": \"255\",\n    \"1.13.2\": \"255\"\n  },\n  \"minecraft:nether_star\": {\n    \"legacy\": \"399\",\n    \"1.13\": \"705\",\n    \"1.13.2\": \"710\"\n  },\n  \"minecraft:nether_wart\": {\n    \"legacy\": \"372\",\n    \"1.13\": \"623\",\n    \"1.13.2\": \"628\"\n  },\n  \"minecraft:nether_wart_block\": {\n    \"1.13\": \"357\",\n    \"1.13.2\": \"357\"\n  },\n  \"minecraft:netherrack\": {\n    \"legacy\": \"87\",\n    \"1.13\": \"183\",\n    \"1.13.2\": \"183\"\n  },\n  \"minecraft:note_block\": {\n    \"legacy\": \"25\",\n    \"1.13\": \"71\",\n    \"1.13.2\": \"71\"\n  },\n  \"minecraft:oak_boat\": {\n    \"legacy\": \"333\",\n    \"1.13\": \"544\",\n    \"1.13.2\": \"549\"\n  },\n  \"minecraft:oak_button\": {\n    \"legacy\": \"143\",\n    \"1.13\": \"241\",\n    \"1.13.2\": \"241\"\n  },\n  \"minecraft:oak_door\": {\n    \"legacy\": \"324\",\n    \"1.13\": \"456\",\n    \"1.13.2\": \"461\"\n  },\n  \"minecraft:oak_fence\": {\n    \"legacy\": \"85\",\n    \"1.13\": \"175\",\n    \"1.13.2\": \"175\"\n  },\n  \"minecraft:oak_fence_gate\": {\n    \"legacy\": \"107\",\n    \"1.13\": \"210\",\n    \"1.13.2\": \"210\"\n  },\n  \"minecraft:oak_leaves\": {\n    \"legacy\": \"18\",\n    \"1.13\": \"56\",\n    \"1.13.2\": \"56\"\n  },\n  \"minecraft:oak_log\": {\n    \"legacy\": \"17\",\n    \"1.13\": \"32\",\n    \"1.13.2\": \"32\"\n  },\n  \"minecraft:oak_planks\": {\n    \"legacy\": \"5\",\n    \"1.13\": \"13\",\n    \"1.13.2\": \"13\"\n  },\n  \"minecraft:oak_pressure_plate\": {\n    \"legacy\": \"72\",\n    \"1.13\": \"160\",\n    \"1.13.2\": \"160\"\n  },\n  \"minecraft:oak_sapling\": {\n    \"legacy\": \"6\",\n    \"1.13\": \"19\",\n    \"1.13.2\": \"19\"\n  },\n  \"minecraft:oak_sign\": {\n    \"1.13.2\": \"541\"\n  },\n  \"minecraft:oak_slab\": {\n    \"legacy\": \"126\",\n    \"1.13\": \"112\",\n    \"1.13.2\": \"112\"\n  },\n  \"minecraft:oak_stairs\": {\n    \"legacy\": \"53\",\n    \"1.13\": \"148\",\n    \"1.13.2\": \"148\"\n  },\n  \"minecraft:oak_trapdoor\": {\n    \"legacy\": \"96\",\n    \"1.13\": \"187\",\n    \"1.13.2\": \"187\"\n  },\n  \"minecraft:oak_wood\": {\n    \"1.13\": \"50\",\n    \"1.13.2\": \"50\"\n  },\n  \"minecraft:observer\": {\n    \"1.13\": \"361\",\n    \"1.13.2\": \"361\"\n  },\n  \"minecraft:obsidian\": {\n    \"legacy\": \"49\",\n    \"1.13\": \"139\",\n    \"1.13.2\": \"139\"\n  },\n  \"minecraft:ocelot_spawn_egg\": {\n    \"1.13\": \"656\",\n    \"1.13.2\": \"661\"\n  },\n  \"minecraft:orange_banner\": {\n    \"1.13\": \"731\",\n    \"1.13.2\": \"736\"\n  },\n  \"minecraft:orange_bed\": {\n    \"1.13\": \"592\",\n    \"1.13.2\": \"597\"\n  },\n  \"minecraft:orange_carpet\": {\n    \"1.13\": \"283\",\n    \"1.13.2\": \"283\"\n  },\n  \"minecraft:orange_concrete\": {\n    \"1.13\": \"396\",\n    \"1.13.2\": \"396\"\n  },\n  \"minecraft:orange_concrete_powder\": {\n    \"1.13\": \"412\",\n    \"1.13.2\": \"412\"\n  },\n  \"minecraft:orange_dye\": {\n    \"1.13\": \"586\",\n    \"1.13.2\": \"591\"\n  },\n  \"minecraft:orange_glazed_terracotta\": {\n    \"1.13\": \"380\",\n    \"1.13.2\": \"380\"\n  },\n  \"minecraft:orange_shulker_box\": {\n    \"1.13\": \"364\",\n    \"1.13.2\": \"364\"\n  },\n  \"minecraft:orange_stained_glass\": {\n    \"1.13\": \"312\",\n    \"1.13.2\": \"312\"\n  },\n  \"minecraft:orange_stained_glass_pane\": {\n    \"1.13\": \"328\",\n    \"1.13.2\": \"328\"\n  },\n  \"minecraft:orange_terracotta\": {\n    \"1.13\": \"264\",\n    \"1.13.2\": \"264\"\n  },\n  \"minecraft:orange_tulip\": {\n    \"1.13\": \"104\",\n    \"1.13.2\": \"104\"\n  },\n  \"minecraft:orange_wool\": {\n    \"1.13\": \"83\",\n    \"1.13.2\": \"83\"\n  },\n  \"minecraft:oxeye_daisy\": {\n    \"1.13\": \"107\",\n    \"1.13.2\": \"107\"\n  },\n  \"minecraft:packed_ice\": {\n    \"legacy\": \"174\",\n    \"1.13\": \"300\",\n    \"1.13.2\": \"300\"\n  },\n  \"minecraft:painting\": {\n    \"legacy\": \"321\",\n    \"1.13\": \"533\",\n    \"1.13.2\": \"538\"\n  },\n  \"minecraft:paper\": {\n    \"legacy\": \"339\",\n    \"1.13\": \"556\",\n    \"1.13.2\": \"561\"\n  },\n  \"minecraft:parrot_spawn_egg\": {\n    \"1.13\": \"657\",\n    \"1.13.2\": \"662\"\n  },\n  \"minecraft:peony\": {\n    \"1.13\": \"308\",\n    \"1.13.2\": \"308\"\n  },\n  \"minecraft:petrified_oak_slab\": {\n    \"1.13\": \"120\",\n    \"1.13.2\": \"120\"\n  },\n  \"minecraft:phantom_membrane\": {\n    \"1.13\": \"782\",\n    \"1.13.2\": \"787\"\n  },\n  \"minecraft:phantom_spawn_egg\": {\n    \"1.13\": \"658\",\n    \"1.13.2\": \"663\"\n  },\n  \"minecraft:pig_spawn_egg\": {\n    \"1.13\": \"659\",\n    \"1.13.2\": \"664\"\n  },\n  \"minecraft:pink_banner\": {\n    \"1.13\": \"736\",\n    \"1.13.2\": \"741\"\n  },\n  \"minecraft:pink_bed\": {\n    \"1.13\": \"597\",\n    \"1.13.2\": \"602\"\n  },\n  \"minecraft:pink_carpet\": {\n    \"1.13\": \"288\",\n    \"1.13.2\": \"288\"\n  },\n  \"minecraft:pink_concrete\": {\n    \"1.13\": \"401\",\n    \"1.13.2\": \"401\"\n  },\n  \"minecraft:pink_concrete_powder\": {\n    \"1.13\": \"417\",\n    \"1.13.2\": \"417\"\n  },\n  \"minecraft:pink_dye\": {\n    \"1.13\": \"581\",\n    \"1.13.2\": \"586\"\n  },\n  \"minecraft:pink_glazed_terracotta\": {\n    \"1.13\": \"385\",\n    \"1.13.2\": \"385\"\n  },\n  \"minecraft:pink_shulker_box\": {\n    \"1.13\": \"369\",\n    \"1.13.2\": \"369\"\n  },\n  \"minecraft:pink_stained_glass\": {\n    \"1.13\": \"317\",\n    \"1.13.2\": \"317\"\n  },\n  \"minecraft:pink_stained_glass_pane\": {\n    \"1.13\": \"333\",\n    \"1.13.2\": \"333\"\n  },\n  \"minecraft:pink_terracotta\": {\n    \"1.13\": \"269\",\n    \"1.13.2\": \"269\"\n  },\n  \"minecraft:pink_tulip\": {\n    \"1.13\": \"106\",\n    \"1.13.2\": \"106\"\n  },\n  \"minecraft:pink_wool\": {\n    \"1.13\": \"88\",\n    \"1.13.2\": \"88\"\n  },\n  \"minecraft:piston\": {\n    \"legacy\": \"33\",\n    \"1.13\": \"81\",\n    \"1.13.2\": \"81\"\n  },\n  \"minecraft:player_head\": {\n    \"1.13\": \"700\",\n    \"1.13.2\": \"705\"\n  },\n  \"minecraft:podzol\": {\n    \"1.13\": \"11\",\n    \"1.13.2\": \"11\"\n  },\n  \"minecraft:poisonous_potato\": {\n    \"legacy\": \"394\",\n    \"1.13\": \"695\",\n    \"1.13.2\": \"700\"\n  },\n  \"minecraft:polar_bear_spawn_egg\": {\n    \"1.13\": \"660\",\n    \"1.13.2\": \"665\"\n  },\n  \"minecraft:polished_andesite\": {\n    \"1.13\": \"7\",\n    \"1.13.2\": \"7\"\n  },\n  \"minecraft:polished_diorite\": {\n    \"1.13\": \"5\",\n    \"1.13.2\": \"5\"\n  },\n  \"minecraft:polished_granite\": {\n    \"1.13\": \"3\",\n    \"1.13.2\": \"3\"\n  },\n  \"minecraft:popped_chorus_fruit\": {\n    \"1.13\": \"748\",\n    \"1.13.2\": \"753\"\n  },\n  \"minecraft:poppy\": {\n    \"legacy\": \"38\",\n    \"1.13\": \"99\",\n    \"1.13.2\": \"99\"\n  },\n  \"minecraft:porkchop\": {\n    \"legacy\": \"319\",\n    \"1.13\": \"531\",\n    \"1.13.2\": \"536\"\n  },\n  \"minecraft:potato\": {\n    \"legacy\": \"392\",\n    \"1.13\": \"693\",\n    \"1.13.2\": \"698\"\n  },\n  \"minecraft:potion\": {\n    \"legacy\": \"373\",\n    \"1.13\": \"624\",\n    \"1.13.2\": \"629\"\n  },\n  \"minecraft:powered_rail\": {\n    \"legacy\": \"27\",\n    \"1.13\": \"72\",\n    \"1.13.2\": \"72\"\n  },\n  \"minecraft:prismarine\": {\n    \"legacy\": \"168\",\n    \"1.13\": \"343\",\n    \"1.13.2\": \"343\"\n  },\n  \"minecraft:prismarine_brick_slab\": {\n    \"1.13\": \"129\",\n    \"1.13.2\": \"129\"\n  },\n  \"minecraft:prismarine_brick_stairs\": {\n    \"1.13\": \"347\",\n    \"1.13.2\": \"347\"\n  },\n  \"minecraft:prismarine_bricks\": {\n    \"1.13\": \"344\",\n    \"1.13.2\": \"344\"\n  },\n  \"minecraft:prismarine_crystals\": {\n    \"legacy\": \"410\",\n    \"1.13\": \"715\",\n    \"1.13.2\": \"720\"\n  },\n  \"minecraft:prismarine_shard\": {\n    \"legacy\": \"409\",\n    \"1.13\": \"714\",\n    \"1.13.2\": \"719\"\n  },\n  \"minecraft:prismarine_slab\": {\n    \"1.13\": \"128\",\n    \"1.13.2\": \"128\"\n  },\n  \"minecraft:prismarine_stairs\": {\n    \"1.13\": \"346\",\n    \"1.13.2\": \"346\"\n  },\n  \"minecraft:pufferfish\": {\n    \"1.13\": \"569\",\n    \"1.13.2\": \"574\"\n  },\n  \"minecraft:pufferfish_bucket\": {\n    \"1.13\": \"547\",\n    \"1.13.2\": \"552\"\n  },\n  \"minecraft:pufferfish_spawn_egg\": {\n    \"1.13\": \"661\",\n    \"1.13.2\": \"666\"\n  },\n  \"minecraft:pumpkin\": {\n    \"legacy\": \"86\",\n    \"1.13\": \"181\",\n    \"1.13.2\": \"181\"\n  },\n  \"minecraft:pumpkin_pie\": {\n    \"legacy\": \"400\",\n    \"1.13\": \"706\",\n    \"1.13.2\": \"711\"\n  },\n  \"minecraft:pumpkin_seeds\": {\n    \"legacy\": \"361\",\n    \"1.13\": \"612\",\n    \"1.13.2\": \"617\"\n  },\n  \"minecraft:purple_banner\": {\n    \"1.13\": \"740\",\n    \"1.13.2\": \"745\"\n  },\n  \"minecraft:purple_bed\": {\n    \"1.13\": \"601\",\n    \"1.13.2\": \"606\"\n  },\n  \"minecraft:purple_carpet\": {\n    \"1.13\": \"292\",\n    \"1.13.2\": \"292\"\n  },\n  \"minecraft:purple_concrete\": {\n    \"1.13\": \"405\",\n    \"1.13.2\": \"405\"\n  },\n  \"minecraft:purple_concrete_powder\": {\n    \"1.13\": \"421\",\n    \"1.13.2\": \"421\"\n  },\n  \"minecraft:purple_dye\": {\n    \"1.13\": \"577\",\n    \"1.13.2\": \"582\"\n  },\n  \"minecraft:purple_glazed_terracotta\": {\n    \"1.13\": \"389\",\n    \"1.13.2\": \"389\"\n  },\n  \"minecraft:purple_shulker_box\": {\n    \"1.13\": \"373\",\n    \"1.13.2\": \"373\"\n  },\n  \"minecraft:purple_stained_glass\": {\n    \"1.13\": \"321\",\n    \"1.13.2\": \"321\"\n  },\n  \"minecraft:purple_stained_glass_pane\": {\n    \"1.13\": \"337\",\n    \"1.13.2\": \"337\"\n  },\n  \"minecraft:purple_terracotta\": {\n    \"1.13\": \"273\",\n    \"1.13.2\": \"273\"\n  },\n  \"minecraft:purple_wool\": {\n    \"1.13\": \"92\",\n    \"1.13.2\": \"92\"\n  },\n  \"minecraft:purpur_block\": {\n    \"1.13\": \"144\",\n    \"1.13.2\": \"144\"\n  },\n  \"minecraft:purpur_pillar\": {\n    \"1.13\": \"145\",\n    \"1.13.2\": \"145\"\n  },\n  \"minecraft:purpur_slab\": {\n    \"1.13\": \"127\",\n    \"1.13.2\": \"127\"\n  },\n  \"minecraft:purpur_stairs\": {\n    \"1.13\": \"146\",\n    \"1.13.2\": \"146\"\n  },\n  \"minecraft:quartz\": {\n    \"legacy\": \"406\",\n    \"1.13\": \"711\",\n    \"1.13.2\": \"716\"\n  },\n  \"minecraft:quartz_block\": {\n    \"legacy\": \"155\",\n    \"1.13\": \"258\",\n    \"1.13.2\": \"258\"\n  },\n  \"minecraft:quartz_pillar\": {\n    \"1.13\": \"259\",\n    \"1.13.2\": \"259\"\n  },\n  \"minecraft:quartz_slab\": {\n    \"1.13\": \"125\",\n    \"1.13.2\": \"125\"\n  },\n  \"minecraft:quartz_stairs\": {\n    \"legacy\": \"156\",\n    \"1.13\": \"260\",\n    \"1.13.2\": \"260\"\n  },\n  \"minecraft:rabbit\": {\n    \"legacy\": \"411\",\n    \"1.13\": \"716\",\n    \"1.13.2\": \"721\"\n  },\n  \"minecraft:rabbit_foot\": {\n    \"legacy\": \"414\",\n    \"1.13\": \"719\",\n    \"1.13.2\": \"724\"\n  },\n  \"minecraft:rabbit_hide\": {\n    \"legacy\": \"415\",\n    \"1.13\": \"720\",\n    \"1.13.2\": \"725\"\n  },\n  \"minecraft:rabbit_spawn_egg\": {\n    \"1.13\": \"662\",\n    \"1.13.2\": \"667\"\n  },\n  \"minecraft:rabbit_stew\": {\n    \"legacy\": \"413\",\n    \"1.13\": \"718\",\n    \"1.13.2\": \"723\"\n  },\n  \"minecraft:rail\": {\n    \"legacy\": \"66\",\n    \"1.13\": \"156\",\n    \"1.13.2\": \"156\"\n  },\n  \"minecraft:red_banner\": {\n    \"1.13\": \"744\",\n    \"1.13.2\": \"749\"\n  },\n  \"minecraft:red_bed\": {\n    \"1.13\": \"605\",\n    \"1.13.2\": \"610\"\n  },\n  \"minecraft:red_carpet\": {\n    \"1.13\": \"296\",\n    \"1.13.2\": \"296\"\n  },\n  \"minecraft:red_concrete\": {\n    \"1.13\": \"409\",\n    \"1.13.2\": \"409\"\n  },\n  \"minecraft:red_concrete_powder\": {\n    \"1.13\": \"425\",\n    \"1.13.2\": \"425\"\n  },\n  \"minecraft:red_dye\": {\n    \"1.13.2\": \"578\"\n  },\n  \"minecraft:red_glazed_terracotta\": {\n    \"1.13\": \"393\",\n    \"1.13.2\": \"393\"\n  },\n  \"minecraft:red_mushroom\": {\n    \"legacy\": \"40\",\n    \"1.13\": \"109\",\n    \"1.13.2\": \"109\"\n  },\n  \"minecraft:red_mushroom_block\": {\n    \"legacy\": \"100\",\n    \"1.13\": \"204\",\n    \"1.13.2\": \"204\"\n  },\n  \"minecraft:red_nether_bricks\": {\n    \"1.13\": \"358\",\n    \"1.13.2\": \"358\"\n  },\n  \"minecraft:red_sand\": {\n    \"1.13\": \"27\",\n    \"1.13.2\": \"27\"\n  },\n  \"minecraft:red_sandstone\": {\n    \"legacy\": \"179\",\n    \"1.13\": \"350\",\n    \"1.13.2\": \"350\"\n  },\n  \"minecraft:red_sandstone_slab\": {\n    \"1.13\": \"126\",\n    \"1.13.2\": \"126\"\n  },\n  \"minecraft:red_sandstone_stairs\": {\n    \"legacy\": \"180\",\n    \"1.13\": \"353\",\n    \"1.13.2\": \"353\"\n  },\n  \"minecraft:red_shulker_box\": {\n    \"1.13\": \"377\",\n    \"1.13.2\": \"377\"\n  },\n  \"minecraft:red_stained_glass\": {\n    \"1.13\": \"325\",\n    \"1.13.2\": \"325\"\n  },\n  \"minecraft:red_stained_glass_pane\": {\n    \"1.13\": \"341\",\n    \"1.13.2\": \"341\"\n  },\n  \"minecraft:red_terracotta\": {\n    \"1.13\": \"277\",\n    \"1.13.2\": \"277\"\n  },\n  \"minecraft:red_tulip\": {\n    \"1.13\": \"103\",\n    \"1.13.2\": \"103\"\n  },\n  \"minecraft:red_wool\": {\n    \"1.13\": \"96\",\n    \"1.13.2\": \"96\"\n  },\n  \"minecraft:redstone\": {\n    \"legacy\": \"331\",\n    \"1.13\": \"542\",\n    \"1.13.2\": \"547\"\n  },\n  \"minecraft:redstone_block\": {\n    \"legacy\": \"152\",\n    \"1.13\": \"254\",\n    \"1.13.2\": \"254\"\n  },\n  \"minecraft:redstone_lamp\": {\n    \"legacy\": \"123\",\n    \"1.13\": \"228\",\n    \"1.13.2\": \"228\"\n  },\n  \"minecraft:redstone_ore\": {\n    \"legacy\": \"73\",\n    \"1.13\": \"166\",\n    \"1.13.2\": \"166\"\n  },\n  \"minecraft:redstone_torch\": {\n    \"legacy\": \"76\",\n    \"1.13\": \"167\",\n    \"1.13.2\": \"167\"\n  },\n  \"minecraft:repeater\": {\n    \"legacy\": \"356\",\n    \"1.13\": \"462\",\n    \"1.13.2\": \"467\"\n  },\n  \"minecraft:repeating_command_block\": {\n    \"1.13\": \"354\",\n    \"1.13.2\": \"354\"\n  },\n  \"minecraft:rose_bush\": {\n    \"1.13\": \"307\",\n    \"1.13.2\": \"307\"\n  },\n  \"minecraft:rotten_flesh\": {\n    \"legacy\": \"367\",\n    \"1.13\": \"618\",\n    \"1.13.2\": \"623\"\n  },\n  \"minecraft:saddle\": {\n    \"legacy\": \"329\",\n    \"1.13\": \"541\",\n    \"1.13.2\": \"546\"\n  },\n  \"minecraft:salmon\": {\n    \"1.13\": \"567\",\n    \"1.13.2\": \"572\"\n  },\n  \"minecraft:salmon_bucket\": {\n    \"1.13\": \"548\",\n    \"1.13.2\": \"553\"\n  },\n  \"minecraft:salmon_spawn_egg\": {\n    \"1.13\": \"663\",\n    \"1.13.2\": \"668\"\n  },\n  \"minecraft:sand\": {\n    \"legacy\": \"12\",\n    \"1.13\": \"26\",\n    \"1.13.2\": \"26\"\n  },\n  \"minecraft:sandstone\": {\n    \"legacy\": \"24\",\n    \"1.13\": \"68\",\n    \"1.13.2\": \"68\"\n  },\n  \"minecraft:sandstone_slab\": {\n    \"1.13\": \"119\",\n    \"1.13.2\": \"119\"\n  },\n  \"minecraft:sandstone_stairs\": {\n    \"legacy\": \"128\",\n    \"1.13\": \"229\",\n    \"1.13.2\": \"229\"\n  },\n  \"minecraft:turtle_scute\": {\n    \"1.13\": \"466\",\n    \"1.13.2\": \"471\"\n  },\n  \"minecraft:sea_lantern\": {\n    \"legacy\": \"169\",\n    \"1.13\": \"349\",\n    \"1.13.2\": \"349\"\n  },\n  \"minecraft:sea_pickle\": {\n    \"1.13\": \"80\",\n    \"1.13.2\": \"80\"\n  },\n  \"minecraft:seagrass\": {\n    \"1.13\": \"79\",\n    \"1.13.2\": \"79\"\n  },\n  \"minecraft:shears\": {\n    \"legacy\": \"359\",\n    \"1.13\": \"609\",\n    \"1.13.2\": \"614\"\n  },\n  \"minecraft:sheep_spawn_egg\": {\n    \"1.13\": \"664\",\n    \"1.13.2\": \"669\"\n  },\n  \"minecraft:shield\": {\n    \"1.13\": \"757\",\n    \"1.13.2\": \"762\"\n  },\n  \"minecraft:shulker_box\": {\n    \"1.13\": \"362\",\n    \"1.13.2\": \"362\"\n  },\n  \"minecraft:shulker_shell\": {\n    \"1.13\": \"765\",\n    \"1.13.2\": \"770\"\n  },\n  \"minecraft:shulker_spawn_egg\": {\n    \"1.13\": \"665\",\n    \"1.13.2\": \"670\"\n  },\n  \"minecraft:silverfish_spawn_egg\": {\n    \"1.13\": \"666\",\n    \"1.13.2\": \"671\"\n  },\n  \"minecraft:skeleton_horse_spawn_egg\": {\n    \"1.13\": \"668\",\n    \"1.13.2\": \"673\"\n  },\n  \"minecraft:skeleton_skull\": {\n    \"legacy\": \"397\",\n    \"1.13\": \"698\",\n    \"1.13.2\": \"703\"\n  },\n  \"minecraft:skeleton_spawn_egg\": {\n    \"1.13\": \"667\",\n    \"1.13.2\": \"672\"\n  },\n  \"minecraft:slime_ball\": {\n    \"legacy\": \"341\",\n    \"1.13\": \"558\",\n    \"1.13.2\": \"563\"\n  },\n  \"minecraft:slime_block\": {\n    \"legacy\": \"165\",\n    \"1.13\": \"303\",\n    \"1.13.2\": \"303\"\n  },\n  \"minecraft:slime_spawn_egg\": {\n    \"1.13\": \"669\",\n    \"1.13.2\": \"674\"\n  },\n  \"minecraft:smooth_quartz\": {\n    \"1.13\": \"131\",\n    \"1.13.2\": \"131\"\n  },\n  \"minecraft:smooth_red_sandstone\": {\n    \"1.13\": \"132\",\n    \"1.13.2\": \"132\"\n  },\n  \"minecraft:smooth_sandstone\": {\n    \"1.13\": \"133\",\n    \"1.13.2\": \"133\"\n  },\n  \"minecraft:smooth_stone\": {\n    \"1.13\": \"134\",\n    \"1.13.2\": \"134\"\n  },\n  \"minecraft:smooth_stone_slab\": {\n    \"1.13.2\": \"118\"\n  },\n  \"minecraft:snow\": {\n    \"legacy\": \"80\",\n    \"1.13\": \"169\",\n    \"1.13.2\": \"169\"\n  },\n  \"minecraft:snow_block\": {\n    \"legacy\": \"78\",\n    \"1.13\": \"171\",\n    \"1.13.2\": \"171\"\n  },\n  \"minecraft:snowball\": {\n    \"legacy\": \"332\",\n    \"1.13\": \"543\",\n    \"1.13.2\": \"548\"\n  },\n  \"minecraft:soul_sand\": {\n    \"legacy\": \"88\",\n    \"1.13\": \"184\",\n    \"1.13.2\": \"184\"\n  },\n  \"minecraft:spawner\": {\n    \"legacy\": \"52\",\n    \"1.13\": \"147\",\n    \"1.13.2\": \"147\"\n  },\n  \"minecraft:spectral_arrow\": {\n    \"1.13\": \"754\",\n    \"1.13.2\": \"759\"\n  },\n  \"minecraft:spider_eye\": {\n    \"legacy\": \"375\",\n    \"1.13\": \"626\",\n    \"1.13.2\": \"631\"\n  },\n  \"minecraft:spider_spawn_egg\": {\n    \"1.13\": \"670\",\n    \"1.13.2\": \"675\"\n  },\n  \"minecraft:splash_potion\": {\n    \"1.13\": \"753\",\n    \"1.13.2\": \"758\"\n  },\n  \"minecraft:sponge\": {\n    \"legacy\": \"19\",\n    \"1.13\": \"62\",\n    \"1.13.2\": \"62\"\n  },\n  \"minecraft:spruce_boat\": {\n    \"1.13\": \"759\",\n    \"1.13.2\": \"764\"\n  },\n  \"minecraft:spruce_button\": {\n    \"1.13\": \"242\",\n    \"1.13.2\": \"242\"\n  },\n  \"minecraft:spruce_door\": {\n    \"legacy\": \"427\",\n    \"1.13\": \"457\",\n    \"1.13.2\": \"462\"\n  },\n  \"minecraft:spruce_fence\": {\n    \"legacy\": \"188\",\n    \"1.13\": \"176\",\n    \"1.13.2\": \"176\"\n  },\n  \"minecraft:spruce_fence_gate\": {\n    \"legacy\": \"183\",\n    \"1.13\": \"211\",\n    \"1.13.2\": \"211\"\n  },\n  \"minecraft:spruce_leaves\": {\n    \"1.13\": \"57\",\n    \"1.13.2\": \"57\"\n  },\n  \"minecraft:spruce_log\": {\n    \"1.13\": \"33\",\n    \"1.13.2\": \"33\"\n  },\n  \"minecraft:spruce_planks\": {\n    \"1.13\": \"14\",\n    \"1.13.2\": \"14\"\n  },\n  \"minecraft:spruce_pressure_plate\": {\n    \"1.13\": \"161\",\n    \"1.13.2\": \"161\"\n  },\n  \"minecraft:spruce_sapling\": {\n    \"1.13\": \"20\",\n    \"1.13.2\": \"20\"\n  },\n  \"minecraft:spruce_slab\": {\n    \"1.13\": \"113\",\n    \"1.13.2\": \"113\"\n  },\n  \"minecraft:spruce_stairs\": {\n    \"legacy\": \"134\",\n    \"1.13\": \"234\",\n    \"1.13.2\": \"234\"\n  },\n  \"minecraft:spruce_trapdoor\": {\n    \"1.13\": \"188\",\n    \"1.13.2\": \"188\"\n  },\n  \"minecraft:spruce_wood\": {\n    \"1.13\": \"51\",\n    \"1.13.2\": \"51\"\n  },\n  \"minecraft:squid_spawn_egg\": {\n    \"1.13\": \"671\",\n    \"1.13.2\": \"676\"\n  },\n  \"minecraft:stick\": {\n    \"legacy\": \"280\",\n    \"1.13\": \"492\",\n    \"1.13.2\": \"497\"\n  },\n  \"minecraft:sticky_piston\": {\n    \"legacy\": \"29\",\n    \"1.13\": \"74\",\n    \"1.13.2\": \"74\"\n  },\n  \"minecraft:stone\": {\n    \"legacy\": \"1\",\n    \"1.13\": \"1\",\n    \"1.13.2\": \"1\"\n  },\n  \"minecraft:stone_axe\": {\n    \"legacy\": \"275\",\n    \"1.13\": \"487\",\n    \"1.13.2\": \"492\"\n  },\n  \"minecraft:stone_brick_slab\": {\n    \"1.13\": \"123\",\n    \"1.13.2\": \"123\"\n  },\n  \"minecraft:stone_brick_stairs\": {\n    \"legacy\": \"109\",\n    \"1.13\": \"217\",\n    \"1.13.2\": \"217\"\n  },\n  \"minecraft:stone_bricks\": {\n    \"legacy\": \"98\",\n    \"1.13\": \"199\",\n    \"1.13.2\": \"199\"\n  },\n  \"minecraft:stone_button\": {\n    \"legacy\": \"77\",\n    \"1.13\": \"168\",\n    \"1.13.2\": \"168\"\n  },\n  \"minecraft:stone_hoe\": {\n    \"legacy\": \"291\",\n    \"1.13\": \"503\",\n    \"1.13.2\": \"508\"\n  },\n  \"minecraft:stone_pickaxe\": {\n    \"legacy\": \"274\",\n    \"1.13\": \"486\",\n    \"1.13.2\": \"491\"\n  },\n  \"minecraft:stone_pressure_plate\": {\n    \"legacy\": \"70\",\n    \"1.13\": \"159\",\n    \"1.13.2\": \"159\"\n  },\n  \"minecraft:stone_shovel\": {\n    \"legacy\": \"273\",\n    \"1.13\": \"485\",\n    \"1.13.2\": \"490\"\n  },\n  \"minecraft:stone_slab\": {\n    \"legacy\": \"182\",\n    \"1.13\": \"118\"\n  },\n  \"minecraft:stone_sword\": {\n    \"legacy\": \"272\",\n    \"1.13\": \"484\",\n    \"1.13.2\": \"489\"\n  },\n  \"minecraft:stray_spawn_egg\": {\n    \"1.13\": \"672\",\n    \"1.13.2\": \"677\"\n  },\n  \"minecraft:string\": {\n    \"legacy\": \"287\",\n    \"1.13\": \"499\",\n    \"1.13.2\": \"504\"\n  },\n  \"minecraft:stripped_acacia_log\": {\n    \"1.13\": \"42\",\n    \"1.13.2\": \"42\"\n  },\n  \"minecraft:stripped_acacia_wood\": {\n    \"1.13\": \"48\",\n    \"1.13.2\": \"48\"\n  },\n  \"minecraft:stripped_birch_log\": {\n    \"1.13\": \"40\",\n    \"1.13.2\": \"40\"\n  },\n  \"minecraft:stripped_birch_wood\": {\n    \"1.13\": \"46\",\n    \"1.13.2\": \"46\"\n  },\n  \"minecraft:stripped_dark_oak_log\": {\n    \"1.13\": \"43\",\n    \"1.13.2\": \"43\"\n  },\n  \"minecraft:stripped_dark_oak_wood\": {\n    \"1.13\": \"49\",\n    \"1.13.2\": \"49\"\n  },\n  \"minecraft:stripped_jungle_log\": {\n    \"1.13\": \"41\",\n    \"1.13.2\": \"41\"\n  },\n  \"minecraft:stripped_jungle_wood\": {\n    \"1.13\": \"47\",\n    \"1.13.2\": \"47\"\n  },\n  \"minecraft:stripped_oak_log\": {\n    \"1.13\": \"38\",\n    \"1.13.2\": \"38\"\n  },\n  \"minecraft:stripped_oak_wood\": {\n    \"1.13\": \"44\",\n    \"1.13.2\": \"44\"\n  },\n  \"minecraft:stripped_spruce_log\": {\n    \"1.13\": \"39\",\n    \"1.13.2\": \"39\"\n  },\n  \"minecraft:stripped_spruce_wood\": {\n    \"1.13\": \"45\",\n    \"1.13.2\": \"45\"\n  },\n  \"minecraft:structure_block\": {\n    \"1.13\": \"464\",\n    \"1.13.2\": \"469\"\n  },\n  \"minecraft:structure_void\": {\n    \"1.13\": \"360\",\n    \"1.13.2\": \"360\"\n  },\n  \"minecraft:sugar\": {\n    \"legacy\": \"353\",\n    \"1.13\": \"589\",\n    \"1.13.2\": \"594\"\n  },\n  \"minecraft:sugar_cane\": {\n    \"legacy\": \"338\",\n    \"1.13\": \"553\",\n    \"1.13.2\": \"558\"\n  },\n  \"minecraft:sunflower\": {\n    \"legacy\": \"175\",\n    \"1.13\": \"305\",\n    \"1.13.2\": \"305\"\n  },\n  \"minecraft:tall_grass\": {\n    \"legacy\": \"31\",\n    \"1.13\": \"309\",\n    \"1.13.2\": \"309\"\n  },\n  \"minecraft:terracotta\": {\n    \"1.13\": \"298\",\n    \"1.13.2\": \"298\"\n  },\n  \"minecraft:tipped_arrow\": {\n    \"1.13\": \"755\",\n    \"1.13.2\": \"760\"\n  },\n  \"minecraft:tnt\": {\n    \"legacy\": \"46\",\n    \"1.13\": \"136\",\n    \"1.13.2\": \"136\"\n  },\n  \"minecraft:tnt_minecart\": {\n    \"legacy\": \"407\",\n    \"1.13\": \"712\",\n    \"1.13.2\": \"717\"\n  },\n  \"minecraft:torch\": {\n    \"legacy\": \"50\",\n    \"1.13\": \"140\",\n    \"1.13.2\": \"140\"\n  },\n  \"minecraft:totem_of_undying\": {\n    \"1.13\": \"764\",\n    \"1.13.2\": \"769\"\n  },\n  \"minecraft:trapped_chest\": {\n    \"legacy\": \"146\",\n    \"1.13\": \"250\",\n    \"1.13.2\": \"250\"\n  },\n  \"minecraft:trident\": {\n    \"1.13\": \"781\",\n    \"1.13.2\": \"786\"\n  },\n  \"minecraft:tripwire_hook\": {\n    \"legacy\": \"131\",\n    \"1.13\": \"232\",\n    \"1.13.2\": \"232\"\n  },\n  \"minecraft:tropical_fish\": {\n    \"legacy\": \"349\",\n    \"1.13\": \"568\",\n    \"1.13.2\": \"573\"\n  },\n  \"minecraft:tropical_fish_bucket\": {\n    \"1.13\": \"550\",\n    \"1.13.2\": \"555\"\n  },\n  \"minecraft:tropical_fish_spawn_egg\": {\n    \"1.13\": \"673\",\n    \"1.13.2\": \"678\"\n  },\n  \"minecraft:tube_coral\": {\n    \"1.13\": \"438\",\n    \"1.13.2\": \"438\"\n  },\n  \"minecraft:tube_coral_block\": {\n    \"1.13\": \"433\",\n    \"1.13.2\": \"433\"\n  },\n  \"minecraft:tube_coral_fan\": {\n    \"1.13\": \"443\",\n    \"1.13.2\": \"448\"\n  },\n  \"minecraft:turtle_egg\": {\n    \"1.13\": \"427\",\n    \"1.13.2\": \"427\"\n  },\n  \"minecraft:turtle_helmet\": {\n    \"1.13\": \"465\",\n    \"1.13.2\": \"470\"\n  },\n  \"minecraft:turtle_spawn_egg\": {\n    \"1.13\": \"674\",\n    \"1.13.2\": \"679\"\n  },\n  \"minecraft:vex_spawn_egg\": {\n    \"1.13\": \"675\",\n    \"1.13.2\": \"680\"\n  },\n  \"minecraft:villager_spawn_egg\": {\n    \"1.13\": \"676\",\n    \"1.13.2\": \"681\"\n  },\n  \"minecraft:vindicator_spawn_egg\": {\n    \"1.13\": \"677\",\n    \"1.13.2\": \"682\"\n  },\n  \"minecraft:vine\": {\n    \"legacy\": \"106\",\n    \"1.13\": \"209\",\n    \"1.13.2\": \"209\"\n  },\n  \"minecraft:water_bucket\": {\n    \"legacy\": \"326\",\n    \"1.13\": \"538\",\n    \"1.13.2\": \"543\"\n  },\n  \"minecraft:wet_sponge\": {\n    \"1.13\": \"63\",\n    \"1.13.2\": \"63\"\n  },\n  \"minecraft:wheat\": {\n    \"legacy\": \"296\",\n    \"1.13\": \"508\",\n    \"1.13.2\": \"513\"\n  },\n  \"minecraft:wheat_seeds\": {\n    \"legacy\": \"295\",\n    \"1.13\": \"507\",\n    \"1.13.2\": \"512\"\n  },\n  \"minecraft:white_banner\": {\n    \"legacy\": \"425\",\n    \"1.13\": \"730\",\n    \"1.13.2\": \"735\"\n  },\n  \"minecraft:white_bed\": {\n    \"legacy\": \"355\",\n    \"1.13\": \"591\",\n    \"1.13.2\": \"596\"\n  },\n  \"minecraft:white_carpet\": {\n    \"legacy\": \"171\",\n    \"1.13\": \"282\",\n    \"1.13.2\": \"282\"\n  },\n  \"minecraft:white_concrete\": {\n    \"legacy\": \"159\",\n    \"1.13\": \"395\",\n    \"1.13.2\": \"395\"\n  },\n  \"minecraft:white_concrete_powder\": {\n    \"1.13\": \"411\",\n    \"1.13.2\": \"411\"\n  },\n  \"minecraft:white_glazed_terracotta\": {\n    \"1.13\": \"379\",\n    \"1.13.2\": \"379\"\n  },\n  \"minecraft:white_shulker_box\": {\n    \"1.13\": \"363\",\n    \"1.13.2\": \"363\"\n  },\n  \"minecraft:white_stained_glass\": {\n    \"legacy\": \"95\",\n    \"1.13\": \"311\",\n    \"1.13.2\": \"311\"\n  },\n  \"minecraft:white_stained_glass_pane\": {\n    \"legacy\": \"160\",\n    \"1.13\": \"327\",\n    \"1.13.2\": \"327\"\n  },\n  \"minecraft:white_terracotta\": {\n    \"1.13\": \"263\",\n    \"1.13.2\": \"263\"\n  },\n  \"minecraft:white_tulip\": {\n    \"1.13\": \"105\",\n    \"1.13.2\": \"105\"\n  },\n  \"minecraft:white_wool\": {\n    \"legacy\": \"35\",\n    \"1.13\": \"82\",\n    \"1.13.2\": \"82\"\n  },\n  \"minecraft:witch_spawn_egg\": {\n    \"1.13\": \"678\",\n    \"1.13.2\": \"683\"\n  },\n  \"minecraft:wither_skeleton_skull\": {\n    \"1.13\": \"699\",\n    \"1.13.2\": \"704\"\n  },\n  \"minecraft:wither_skeleton_spawn_egg\": {\n    \"1.13\": \"679\",\n    \"1.13.2\": \"684\"\n  },\n  \"minecraft:wolf_spawn_egg\": {\n    \"legacy\": \"383\",\n    \"1.13\": \"680\",\n    \"1.13.2\": \"685\"\n  },\n  \"minecraft:wooden_axe\": {\n    \"legacy\": \"271\",\n    \"1.13\": \"483\",\n    \"1.13.2\": \"488\"\n  },\n  \"minecraft:wooden_hoe\": {\n    \"legacy\": \"290\",\n    \"1.13\": \"502\",\n    \"1.13.2\": \"507\"\n  },\n  \"minecraft:wooden_pickaxe\": {\n    \"legacy\": \"270\",\n    \"1.13\": \"482\",\n    \"1.13.2\": \"487\"\n  },\n  \"minecraft:wooden_shovel\": {\n    \"legacy\": \"269\",\n    \"1.13\": \"481\",\n    \"1.13.2\": \"486\"\n  },\n  \"minecraft:wooden_sword\": {\n    \"legacy\": \"268\",\n    \"1.13\": \"480\",\n    \"1.13.2\": \"485\"\n  },\n  \"minecraft:writable_book\": {\n    \"legacy\": \"386\",\n    \"1.13\": \"687\",\n    \"1.13.2\": \"692\"\n  },\n  \"minecraft:written_book\": {\n    \"legacy\": \"387\",\n    \"1.13\": \"688\",\n    \"1.13.2\": \"693\"\n  },\n  \"minecraft:yellow_banner\": {\n    \"1.13\": \"734\",\n    \"1.13.2\": \"739\"\n  },\n  \"minecraft:yellow_bed\": {\n    \"1.13\": \"595\",\n    \"1.13.2\": \"600\"\n  },\n  \"minecraft:yellow_carpet\": {\n    \"1.13\": \"286\",\n    \"1.13.2\": \"286\"\n  },\n  \"minecraft:yellow_concrete\": {\n    \"1.13\": \"399\",\n    \"1.13.2\": \"399\"\n  },\n  \"minecraft:yellow_concrete_powder\": {\n    \"1.13\": \"415\",\n    \"1.13.2\": \"415\"\n  },\n  \"minecraft:yellow_dye\": {\n    \"1.13.2\": \"588\"\n  },\n  \"minecraft:yellow_glazed_terracotta\": {\n    \"1.13\": \"383\",\n    \"1.13.2\": \"383\"\n  },\n  \"minecraft:yellow_shulker_box\": {\n    \"1.13\": \"367\",\n    \"1.13.2\": \"367\"\n  },\n  \"minecraft:yellow_stained_glass\": {\n    \"1.13\": \"315\",\n    \"1.13.2\": \"315\"\n  },\n  \"minecraft:yellow_stained_glass_pane\": {\n    \"1.13\": \"331\",\n    \"1.13.2\": \"331\"\n  },\n  \"minecraft:yellow_terracotta\": {\n    \"1.13\": \"267\",\n    \"1.13.2\": \"267\"\n  },\n  \"minecraft:yellow_wool\": {\n    \"1.13\": \"86\",\n    \"1.13.2\": \"86\"\n  },\n  \"minecraft:zombie_head\": {\n    \"1.13\": \"701\",\n    \"1.13.2\": \"706\"\n  },\n  \"minecraft:zombie_horse_spawn_egg\": {\n    \"1.13\": \"682\",\n    \"1.13.2\": \"687\"\n  },\n  \"minecraft:zombie_spawn_egg\": {\n    \"1.13\": \"681\",\n    \"1.13.2\": \"686\"\n  },\n  \"minecraft:zombie_villager_spawn_egg\": {\n    \"1.13\": \"684\",\n    \"1.13.2\": \"689\"\n  }\n}"
  },
  {
    "path": "plugin/mapping/legacyblocks.json",
    "content": "{\n  \"0\": \"minecraft:air\",\n  \"1\": \"minecraft:stone\",\n  \"2\": \"minecraft:grass_block\",\n  \"3\": \"minecraft:dirt\",\n  \"4\": \"minecraft:cobblestone\",\n  \"5\": \"minecraft:oak_planks\",\n  \"6\": \"minecraft:oak_sapling\",\n  \"7\": \"minecraft:bedrock\",\n  \"8\": \"minecraft:water\",\n  \"9\": \"minecraft:water\",\n  \"10\": \"minecraft:lava\",\n  \"11\": \"minecraft:lava\",\n  \"12\": \"minecraft:sand\",\n  \"13\": \"minecraft:gravel\",\n  \"14\": \"minecraft:gold_ore\",\n  \"15\": \"minecraft:iron_ore\",\n  \"16\": \"minecraft:coal_ore\",\n  \"17\": \"minecraft:oak_log\",\n  \"18\": \"minecraft:oak_leaves\",\n  \"19\": \"minecraft:sponge\",\n  \"20\": \"minecraft:glass\",\n  \"21\": \"minecraft:lapis_ore\",\n  \"22\": \"minecraft:lapis_block\",\n  \"23\": \"minecraft:dispenser\",\n  \"24\": \"minecraft:sandstone\",\n  \"25\": \"minecraft:note_block\",\n  \"26\": \"minecraft:red_bed\",\n  \"27\": \"minecraft:powered_rail\",\n  \"28\": \"minecraft:detector_rail\",\n  \"29\": \"minecraft:sticky_piston\",\n  \"30\": \"minecraft:cobweb\",\n  \"31\": \"minecraft:short_grass\",\n  \"32\": \"minecraft:dead_bush\",\n  \"33\": \"minecraft:piston\",\n  \"34\": \"minecraft:piston_head\",\n  \"35\": \"minecraft:white_wool\",\n  \"37\": \"minecraft:dandelion\",\n  \"38\": \"minecraft:poppy\",\n  \"39\": \"minecraft:brown_mushroom\",\n  \"40\": \"minecraft:red_mushroom\",\n  \"41\": \"minecraft:gold_block\",\n  \"42\": \"minecraft:iron_block\",\n  \"43\": \"minecraft:stone_slab[type=double]\",\n  \"44\": \"minecraft:stone_slab\",\n  \"45\": \"minecraft:bricks\",\n  \"46\": \"minecraft:tnt\",\n  \"47\": \"minecraft:bookshelf\",\n  \"48\": \"minecraft:mossy_cobblestone\",\n  \"49\": \"minecraft:obsidian\",\n  \"50\": \"minecraft:torch\",\n  \"51\": \"minecraft:fire\",\n  \"52\": \"minecraft:spawner\",\n  \"53\": \"minecraft:oak_stairs\",\n  \"54\": \"minecraft:chest\",\n  \"55\": \"minecraft:redstone_wire\",\n  \"56\": \"minecraft:diamond_ore\",\n  \"57\": \"minecraft:diamond_block\",\n  \"58\": \"minecraft:crafting_table\",\n  \"59\": \"minecraft:wheat\",\n  \"60\": \"minecraft:farmland\",\n  \"61\": \"minecraft:furnace\",\n  \"62\": \"minecraft:furnace[lit=true]\",\n  \"63\": \"minecraft:oak_sign\",\n  \"64\": \"minecraft:oak_door\",\n  \"65\": \"minecraft:ladder\",\n  \"66\": \"minecraft:rail\",\n  \"67\": \"minecraft:cobblestone_stairs\",\n  \"68\": \"minecraft:oak_wall_sign\",\n  \"69\": \"minecraft:lever\",\n  \"70\": \"minecraft:stone_pressure_plate\",\n  \"71\": \"minecraft:iron_door\",\n  \"72\": \"minecraft:oak_pressure_plate\",\n  \"73\": \"minecraft:redstone_ore\",\n  \"74\": \"minecraft:redstone_ore[lit=true]\",\n  \"75\": \"minecraft:redstone_torch[lit=false]\",\n  \"76\": \"minecraft:redstone_torch\",\n  \"77\": \"minecraft:stone_button\",\n  \"78\": \"minecraft:snow\",\n  \"79\": \"minecraft:ice\",\n  \"80\": \"minecraft:snow_block\",\n  \"81\": \"minecraft:cactus\",\n  \"82\": \"minecraft:clay\",\n  \"83\": \"minecraft:sugar_cane\",\n  \"84\": \"minecraft:jukebox\",\n  \"85\": \"minecraft:oak_fence\",\n  \"86\": \"minecraft:pumpkin\",\n  \"87\": \"minecraft:netherrack\",\n  \"88\": \"minecraft:soul_sand\",\n  \"89\": \"minecraft:glowstone\",\n  \"90\": \"minecraft:nether_portal\",\n  \"91\": \"minecraft:jack_o_lantern\",\n  \"92\": \"minecraft:cake\",\n  \"93\": \"minecraft:repeater\",\n  \"94\": \"minecraft:repeater[powered=true]\",\n  \"95\": \"minecraft:white_stained_glass\",\n  \"96\": \"minecraft:oak_trapdoor\",\n  \"98\": \"minecraft:stone_bricks\",\n  \"99\": \"minecraft:brown_mushroom_block\",\n  \"100\": \"minecraft:red_mushroom_block\",\n  \"101\": \"minecraft:iron_bars\",\n  \"102\": \"minecraft:glass_pane\",\n  \"103\": \"minecraft:melon\",\n  \"104\": \"minecraft:pumpkin_stem\",\n  \"105\": \"minecraft:melon_stem\",\n  \"106\": \"minecraft:vine\",\n  \"107\": \"minecraft:oak_fence_gate\",\n  \"108\": \"minecraft:brick_stairs\",\n  \"109\": \"minecraft:stone_brick_stairs\",\n  \"110\": \"minecraft:mycelium\",\n  \"111\": \"minecraft:lily_pad\",\n  \"112\": \"minecraft:nether_bricks\",\n  \"113\": \"minecraft:nether_brick_fence\",\n  \"114\": \"minecraft:nether_brick_stairs\",\n  \"115\": \"minecraft:nether_wart\",\n  \"116\": \"minecraft:enchanting_table\",\n  \"117\": \"minecraft:brewing_stand\",\n  \"118\": \"minecraft:cauldron\",\n  \"119\": \"minecraft:end_portal\",\n  \"120\": \"minecraft:end_portal_frame\",\n  \"121\": \"minecraft:end_stone\",\n  \"122\": \"minecraft:dragon_egg\",\n  \"123\": \"minecraft:redstone_lamp\",\n  \"124\": \"minecraft:redstone_lamp[lit=true]\",\n  \"125\": \"minecraft:oak_slab[type=double]\",\n  \"126\": \"minecraft:oak_slab\",\n  \"127\": \"minecraft:cocoa\",\n  \"128\": \"minecraft:sandstone_stairs\",\n  \"129\": \"minecraft:emerald_ore\",\n  \"130\": \"minecraft:ender_chest\",\n  \"131\": \"minecraft:tripwire_hook\",\n  \"132\": \"minecraft:tripwire\",\n  \"133\": \"minecraft:emerald_block\",\n  \"134\": \"minecraft:spruce_stairs\",\n  \"135\": \"minecraft:birch_stairs\",\n  \"136\": \"minecraft:jungle_stairs\",\n  \"137\": \"minecraft:command_block\",\n  \"138\": \"minecraft:beacon\",\n  \"139\": \"minecraft:cobblestone_wall\",\n  \"140\": \"minecraft:flower_pot\",\n  \"141\": \"minecraft:carrots\",\n  \"142\": \"minecraft:potatoes\",\n  \"143\": \"minecraft:oak_button\",\n  \"144\": \"minecraft:skeleton_skull\",\n  \"145\": \"minecraft:anvil\",\n  \"146\": \"minecraft:trapped_chest\",\n  \"147\": \"minecraft:light_weighted_pressure_plate\",\n  \"148\": \"minecraft:heavy_weighted_pressure_plate\",\n  \"149\": \"minecraft:comparator\",\n  \"150\": \"minecraft:comparator[powered=true]\",\n  \"151\": \"minecraft:daylight_detector\",\n  \"152\": \"minecraft:redstone_block\",\n  \"153\": \"minecraft:nether_quartz_ore\",\n  \"154\": \"minecraft:hopper\",\n  \"155\": \"minecraft:quartz_block\",\n  \"156\": \"minecraft:quartz_stairs\",\n  \"157\": \"minecraft:activator_rail\",\n  \"158\": \"minecraft:dropper\",\n  \"159\": \"minecraft:white_terracotta\",\n  \"160\": \"minecraft:white_stained_glass_pane\",\n  \"161\": \"minecraft:acacia_leaves\",\n  \"162\": \"minecraft:acacia_log\",\n  \"163\": \"minecraft:acacia_stairs\",\n  \"164\": \"minecraft:dark_oak_stairs\",\n  \"165\": \"minecraft:slime_block\",\n  \"166\": \"minecraft:barrier\",\n  \"167\": \"minecraft:iron_trapdoor\",\n  \"168\": \"minecraft:prismarine\",\n  \"169\": \"minecraft:sea_lantern\",\n  \"170\": \"minecraft:hay_block\",\n  \"171\": \"minecraft:white_carpet\",\n  \"172\": \"minecraft:terracotta\",\n  \"173\": \"minecraft:coal_block\",\n  \"174\": \"minecraft:packed_ice\",\n  \"175\": \"minecraft:sunflower\",\n  \"176\": \"minecraft:white_banner\",\n  \"177\": \"minecraft:white_wall_banner\",\n  \"178\": \"minecraft:daylight_detector[inverted=true]\",\n  \"179\": \"minecraft:red_sandstone\",\n  \"180\": \"minecraft:red_sandstone_stairs\",\n  \"181\": \"minecraft:red_sandstone_slab[type=double]\",\n  \"182\": \"minecraft:red_sandstone_slab\",\n  \"183\": \"minecraft:spruce_fence_gate\",\n  \"184\": \"minecraft:birch_fence_gate\",\n  \"185\": \"minecraft:jungle_fence_gate\",\n  \"186\": \"minecraft:dark_oak_fence_gate\",\n  \"187\": \"minecraft:acacia_fence_gate\",\n  \"188\": \"minecraft:spruce_fence\",\n  \"189\": \"minecraft:birch_fence\",\n  \"190\": \"minecraft:jungle_fence\",\n  \"191\": \"minecraft:dark_oak_fence\",\n  \"192\": \"minecraft:acacia_fence\",\n  \"193\": \"minecraft:spruce_door\",\n  \"194\": \"minecraft:birch_door\",\n  \"195\": \"minecraft:jungle_door\",\n  \"196\": \"minecraft:acacia_door\",\n  \"197\": \"minecraft:dark_oak_door\",\n  \"198\": \"minecraft:end_rod\",\n  \"199\": \"minecraft:chorus_plant\",\n  \"200\": \"minecraft:chorus_flower\",\n  \"201\": \"minecraft:purpur_block\",\n  \"202\": \"minecraft:purpur_pillar\",\n  \"203\": \"minecraft:purpur_stairs\",\n  \"204\": \"minecraft:purpur_slab[type=double]\",\n  \"205\": \"minecraft:purpur_slab\",\n  \"206\": \"minecraft:end_stone_bricks\",\n  \"207\": \"minecraft:beetroots\",\n  \"208\": \"minecraft:dirt_path\",\n  \"209\": \"minecraft:end_gateway\",\n  \"210\": \"minecraft:repeating_command_block\",\n  \"211\": \"minecraft:chain_command_block\",\n  \"212\": \"minecraft:frosted_ice\",\n  \"213\": \"minecraft:magma_block\",\n  \"214\": \"minecraft:nether_wart_block\",\n  \"215\": \"minecraft:red_nether_bricks\",\n  \"216\": \"minecraft:bone_block\",\n  \"217\": \"minecraft:structure_void\",\n  \"218\": \"minecraft:observer\",\n  \"219\": \"minecraft:white_shulker_box\",\n  \"220\": \"minecraft:orange_shulker_box\",\n  \"221\": \"minecraft:magenta_shulker_box\",\n  \"222\": \"minecraft:light_blue_shulker_box\",\n  \"223\": \"minecraft:yellow_shulker_box\",\n  \"224\": \"minecraft:lime_shulker_box\",\n  \"225\": \"minecraft:pink_shulker_box\",\n  \"226\": \"minecraft:gray_shulker_box\",\n  \"227\": \"minecraft:light_gray_shulker_box\",\n  \"228\": \"minecraft:cyan_shulker_box\",\n  \"229\": \"minecraft:purple_shulker_box\",\n  \"230\": \"minecraft:blue_shulker_box\",\n  \"231\": \"minecraft:brown_shulker_box\",\n  \"232\": \"minecraft:green_shulker_box\",\n  \"233\": \"minecraft:red_shulker_box\",\n  \"234\": \"minecraft:black_shulker_box\",\n  \"235\": \"minecraft:white_glazed_terracotta\",\n  \"236\": \"minecraft:orange_glazed_terracotta\",\n  \"237\": \"minecraft:magenta_glazed_terracotta\",\n  \"238\": \"minecraft:light_blue_glazed_terracotta\",\n  \"239\": \"minecraft:yellow_glazed_terracotta\",\n  \"240\": \"minecraft:lime_glazed_terracotta\",\n  \"241\": \"minecraft:pink_glazed_terracotta\",\n  \"242\": \"minecraft:gray_glazed_terracotta\",\n  \"243\": \"minecraft:light_gray_glazed_terracotta\",\n  \"244\": \"minecraft:cyan_glazed_terracotta\",\n  \"245\": \"minecraft:purple_glazed_terracotta\",\n  \"246\": \"minecraft:blue_glazed_terracotta\",\n  \"247\": \"minecraft:brown_glazed_terracotta\",\n  \"248\": \"minecraft:green_glazed_terracotta\",\n  \"249\": \"minecraft:red_glazed_terracotta\",\n  \"250\": \"minecraft:black_glazed_terracotta\",\n  \"251\": \"minecraft:white_concrete\",\n  \"252\": \"minecraft:white_concrete_powder\",\n  \"253\": \"minecraft:air\",\n  \"254\": \"minecraft:air\",\n  \"255\": \"minecraft:structure_block\"\n}"
  },
  {
    "path": "plugin/mapping/tag_types.json",
    "content": "{\n  \"tag_types\": {\n    \"blocks\": \"minecraft:block\",\n    \"entity_types\": \"minecraft:entity_type\",\n    \"fluids\": \"minecraft:fluid\",\n    \"game_events\": \"minecraft:game_event\",\n    \"items\": \"minecraft:item\",\n    \"damage_type\": \"minecraft:damage_type\",\n    \"banner_pattern\": \"minecraft:banner_pattern\"\n  },\n  \"supported_tag_types\": [\n    \"minecraft:block\",\n    \"minecraft:item\",\n    \"minecraft:fluid\"\n  ]\n}"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi;\n\nimport com.google.inject.Inject;\nimport com.velocitypowered.api.event.PostOrder;\nimport com.velocitypowered.api.event.Subscribe;\nimport com.velocitypowered.api.event.player.KickedFromServerEvent;\nimport com.velocitypowered.api.event.proxy.ProxyInitializeEvent;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.plugin.Plugin;\nimport com.velocitypowered.api.plugin.annotation.DataDirectory;\nimport com.velocitypowered.api.proxy.Player;\nimport com.velocitypowered.api.proxy.ProxyServer;\nimport com.velocitypowered.api.proxy.server.RegisteredServer;\nimport com.velocitypowered.natives.compression.VelocityCompressor;\nimport com.velocitypowered.natives.util.Natives;\nimport com.velocitypowered.proxy.VelocityServer;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.event.VelocityEventManager;\nimport com.velocitypowered.proxy.network.Connections;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.netty.MinecraftCompressDecoder;\nimport com.velocitypowered.proxy.protocol.netty.MinecraftCompressorAndLengthEncoder;\nimport com.velocitypowered.proxy.protocol.netty.MinecraftDecoder;\nimport com.velocitypowered.proxy.protocol.netty.MinecraftEncoder;\nimport com.velocitypowered.proxy.protocol.netty.MinecraftVarintLengthEncoder;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.channel.ChannelHandler;\nimport io.netty.channel.ChannelPipeline;\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.nio.file.Path;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.Set;\nimport java.util.UUID;\nimport java.util.concurrent.ConcurrentHashMap;\nimport java.util.function.Function;\nimport net.elytrium.commons.config.YamlConfig;\nimport net.elytrium.commons.kyori.serialization.Serializer;\nimport net.elytrium.commons.kyori.serialization.Serializers;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.commons.utils.updates.UpdatesChecker;\nimport net.elytrium.fastprepare.PreparedPacketFactory;\nimport net.elytrium.fastprepare.handler.PreparedPacketEncoder;\nimport net.elytrium.limboapi.api.Limbo;\nimport net.elytrium.limboapi.api.LimboFactory;\nimport net.elytrium.limboapi.api.chunk.BuiltInBiome;\nimport net.elytrium.limboapi.api.chunk.Dimension;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\nimport net.elytrium.limboapi.api.chunk.VirtualChunk;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport net.elytrium.limboapi.api.file.BuiltInWorldFileType;\nimport net.elytrium.limboapi.api.file.WorldFile;\nimport net.elytrium.limboapi.api.material.Block;\nimport net.elytrium.limboapi.api.material.Item;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.protocol.PreparedPacket;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.elytrium.limboapi.api.protocol.packets.PacketFactory;\nimport net.elytrium.limboapi.file.WorldFileTypeRegistry;\nimport net.elytrium.limboapi.injection.disconnect.DisconnectListener;\nimport net.elytrium.limboapi.injection.event.EventManagerHook;\nimport net.elytrium.limboapi.injection.login.LoginListener;\nimport net.elytrium.limboapi.injection.login.LoginTasksQueue;\nimport net.elytrium.limboapi.injection.packet.LegacyPlayerListItemHook;\nimport net.elytrium.limboapi.injection.packet.LimboCompressDecoder;\nimport net.elytrium.limboapi.injection.packet.MinecraftDiscardCompressDecoder;\nimport net.elytrium.limboapi.injection.packet.MinecraftLimitedCompressDecoder;\nimport net.elytrium.limboapi.injection.packet.PreparedPacketImpl;\nimport net.elytrium.limboapi.injection.packet.RemovePlayerInfoHook;\nimport net.elytrium.limboapi.injection.packet.UpsertPlayerInfoHook;\nimport net.elytrium.limboapi.material.Biome;\nimport net.elytrium.limboapi.protocol.LimboProtocol;\nimport net.elytrium.limboapi.protocol.packets.PacketFactoryImpl;\nimport net.elytrium.limboapi.server.CachedPackets;\nimport net.elytrium.limboapi.server.LimboImpl;\nimport net.elytrium.limboapi.server.item.SimpleItemComponentManager;\nimport net.elytrium.limboapi.server.item.SimpleItemComponentMap;\nimport net.elytrium.limboapi.server.world.SimpleBlock;\nimport net.elytrium.limboapi.server.world.SimpleBlockEntity;\nimport net.elytrium.limboapi.server.world.SimpleItem;\nimport net.elytrium.limboapi.server.world.SimpleTagManager;\nimport net.elytrium.limboapi.server.world.SimpleWorld;\nimport net.elytrium.limboapi.server.world.chunk.SimpleChunk;\nimport net.elytrium.limboapi.utils.ReloadListener;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport net.kyori.adventure.text.Component;\nimport net.kyori.adventure.text.serializer.ComponentSerializer;\nimport org.bstats.velocity.Metrics;\nimport org.checkerframework.checker.nullness.qual.MonotonicNonNull;\nimport org.slf4j.Logger;\n\n@Plugin(\n    id = \"limboapi\",\n    name = \"LimboAPI\",\n    version = BuildConstants.LIMBO_VERSION,\n    description = \"Velocity plugin for making virtual servers.\",\n    url = \"https://elytrium.net/\",\n    authors = {\n        \"Elytrium (https://elytrium.net/)\",\n    }\n)\npublic class LimboAPI implements LimboFactory {\n\n  private static final int SUPPORTED_MAXIMUM_PROTOCOL_VERSION_NUMBER = 775;\n\n  @MonotonicNonNull\n  private static Logger LOGGER;\n  @MonotonicNonNull\n  private static Serializer SERIALIZER;\n\n  public static final ConcurrentHashMap<Player, UUID> INITIAL_ID = new ConcurrentHashMap<>();\n\n  private static final MethodHandle STATE_FIELD;\n\n  private final VelocityServer server;\n  private final Metrics.Factory metricsFactory;\n  private final File configFile;\n  private final Set<Player> players;\n  private final CachedPackets packets;\n  private final PacketFactory packetFactory;\n  private final SimpleItemComponentManager itemComponentManager = new SimpleItemComponentManager();\n  private final HashMap<Player, LoginTasksQueue> loginQueue;\n  private final HashMap<Player, Function<KickedFromServerEvent, Boolean>> kickCallback;\n  private final HashMap<Player, RegisteredServer> nextServer;\n\n  private PreparedPacketFactory preparedPacketFactory;\n  private PreparedPacketFactory configPreparedPacketFactory;\n  private PreparedPacketFactory loginUncompressedPreparedPacketFactory;\n  private PreparedPacketFactory loginPreparedPacketFactory;\n  private ProtocolVersion minVersion;\n  private ProtocolVersion maxVersion;\n  private LoginListener loginListener;\n  private boolean compressionEnabled;\n  private EventManagerHook eventManagerHook;\n\n  @Inject\n  public LimboAPI(Logger logger, ProxyServer server, Metrics.Factory metricsFactory, @DataDirectory Path dataDirectory) {\n    setLogger(logger);\n\n    this.server = (VelocityServer) server;\n    this.metricsFactory = metricsFactory;\n    this.configFile = dataDirectory.resolve(\"config.yml\").toFile();\n    this.players = new HashSet<>();\n    this.packetFactory = new PacketFactoryImpl();\n    this.packets = new CachedPackets(this);\n    this.loginQueue = new HashMap<>();\n    this.kickCallback = new HashMap<>();\n    this.nextServer = new HashMap<>();\n\n    int maximumProtocolVersionNumber = ProtocolVersion.MAXIMUM_VERSION.getProtocol();\n    if (maximumProtocolVersionNumber < SUPPORTED_MAXIMUM_PROTOCOL_VERSION_NUMBER) {\n      LOGGER.error(\"Please update Velocity (https://papermc.io/downloads#Velocity). LimboAPI support: https://ely.su/discord\");\n      this.server.shutdown();\n      return;\n    } else if (maximumProtocolVersionNumber != SUPPORTED_MAXIMUM_PROTOCOL_VERSION_NUMBER) {\n      LOGGER.warn(\"Current LimboAPI version doesn't support current Velocity version (protocol version numbers: supported - {}, velocity - {})\",\n          SUPPORTED_MAXIMUM_PROTOCOL_VERSION_NUMBER, maximumProtocolVersionNumber);\n      LOGGER.warn(\"Please update LimboAPI (https://github.com/Elytrium/LimboAPI/releases). LimboAPI support: https://ely.su/discord\");\n    }\n\n    LOGGER.info(\"Initializing Simple Virtual World system...\");\n    SimpleBlock.init();\n    SimpleBlockEntity.init();\n    SimpleItem.init();\n    SimpleTagManager.init();\n    LOGGER.info(\"Hooking into PlayerList/UpsertPlayerInfo and StateRegistry...\");\n    try {\n      LegacyPlayerListItemHook.init(this, LimboProtocol.PLAY_CLIENTBOUND_REGISTRY);\n      UpsertPlayerInfoHook.init(this, LimboProtocol.PLAY_CLIENTBOUND_REGISTRY);\n      RemovePlayerInfoHook.init(this, LimboProtocol.PLAY_CLIENTBOUND_REGISTRY);\n\n      LimboProtocol.init();\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  @Subscribe\n  public void onProxyInitialization(ProxyInitializeEvent event) {\n    Settings.IMP.setLogger(LOGGER);\n\n    if (Settings.IMP.reload(this.configFile, Settings.IMP.PREFIX) == YamlConfig.LoadResult.CONFIG_NOT_EXISTS) {\n      LOGGER.warn(\"************* FIRST LAUNCH *************\");\n      LOGGER.warn(\"Thanks for installing LimboAPI!\");\n      LOGGER.warn(\"(C) 2021 - 2024 Elytrium\");\n      LOGGER.warn(\"\");\n      LOGGER.warn(\"Check out our plugins here: https://ely.su/github <3\");\n      LOGGER.warn(\"Discord: https://ely.su/discord\");\n      LOGGER.warn(\"****************************************\");\n    }\n\n    int level = this.server.getConfiguration().getCompressionLevel();\n    int threshold = this.server.getConfiguration().getCompressionThreshold();\n    this.preparedPacketFactory = new PreparedPacketFactory(\n        PreparedPacketImpl::new,\n        LimboProtocol.getLimboStateRegistry(),\n        this.compressionEnabled,\n        level,\n        threshold,\n        Settings.IMP.MAIN.SAVE_UNCOMPRESSED_PACKETS,\n        true,\n        Settings.IMP.MAIN.COMPATIBILITY_MODE\n    );\n    this.configPreparedPacketFactory = new PreparedPacketFactory(\n        PreparedPacketImpl::new,\n        StateRegistry.CONFIG,\n        this.compressionEnabled,\n        level,\n        threshold,\n        Settings.IMP.MAIN.SAVE_UNCOMPRESSED_PACKETS,\n        true,\n        Settings.IMP.MAIN.COMPATIBILITY_MODE\n    );\n    this.loginUncompressedPreparedPacketFactory = new PreparedPacketFactory(\n        PreparedPacketImpl::new,\n        StateRegistry.LOGIN,\n        false,\n        level,\n        threshold,\n        false,\n        true,\n        Settings.IMP.MAIN.COMPATIBILITY_MODE\n    );\n    this.loginPreparedPacketFactory = new PreparedPacketFactory(\n        PreparedPacketImpl::new,\n        StateRegistry.LOGIN,\n        this.compressionEnabled,\n        level,\n        threshold,\n        Settings.IMP.MAIN.SAVE_UNCOMPRESSED_PACKETS,\n        true,\n        Settings.IMP.MAIN.COMPATIBILITY_MODE\n    );\n    this.reloadPreparedPacketFactory();\n    this.reload();\n\n    this.metricsFactory.make(this, 12530);\n\n    if (Settings.IMP.MAIN.CHECK_FOR_UPDATES) {\n      if (!UpdatesChecker.checkVersionByURL(\"https://raw.githubusercontent.com/Elytrium/LimboAPI/master/VERSION\", Settings.IMP.VERSION)) {\n        LOGGER.error(\"****************************************\");\n        LOGGER.warn(\"The new LimboAPI update was found, please update.\");\n        LOGGER.error(\"https://github.com/Elytrium/LimboAPI/releases/\");\n        LOGGER.error(\"****************************************\");\n      }\n    }\n  }\n\n  @Subscribe(order = PostOrder.LAST)\n  public void postProxyInitialization(ProxyInitializeEvent event) throws IllegalAccessException {\n    this.eventManagerHook.reloadHandlers();\n  }\n\n  public void reload() {\n    Settings.IMP.reload(this.configFile, Settings.IMP.PREFIX);\n    ComponentSerializer<Component, Component, String> serializer = Settings.IMP.SERIALIZER.getSerializer();\n    if (serializer == null) {\n      LOGGER.warn(\"The specified serializer could not be founded, using default. (LEGACY_AMPERSAND)\");\n      setSerializer(new Serializer(Objects.requireNonNull(Serializers.LEGACY_AMPERSAND.getSerializer())));\n    } else {\n      setSerializer(new Serializer(serializer));\n    }\n\n    LOGGER.info(\"Creating and preparing packets...\");\n    this.reloadVersion();\n    this.packets.createPackets();\n    this.loginListener = new LoginListener(this, this.server);\n    this.eventManagerHook = new EventManagerHook(this, this.server.getEventManager());\n    VelocityEventManager eventManager = this.server.getEventManager();\n    eventManager.unregisterListeners(this);\n    eventManager.register(this, this.loginListener);\n    eventManager.register(this, this.eventManagerHook);\n    eventManager.register(this, new DisconnectListener(this));\n    eventManager.register(this, new ReloadListener(this));\n\n    LOGGER.info(\"Loaded!\");\n  }\n\n  private void reloadVersion() {\n    if (Settings.IMP.MAIN.PREPARE_MAX_VERSION.equals(\"LATEST\")) {\n      this.maxVersion = ProtocolVersion.MAXIMUM_VERSION;\n    } else {\n      this.maxVersion = ProtocolVersion.valueOf(\"MINECRAFT_\" + Settings.IMP.MAIN.PREPARE_MAX_VERSION);\n    }\n\n    this.minVersion = ProtocolVersion.valueOf(\"MINECRAFT_\" + Settings.IMP.MAIN.PREPARE_MIN_VERSION);\n\n    if (ProtocolVersion.MAXIMUM_VERSION.compareTo(this.maxVersion) > 0 || ProtocolVersion.MINIMUM_VERSION.compareTo(this.minVersion) < 0) {\n      LOGGER.warn(\n          \"Currently working only with \"\n              + this.minVersion.getVersionIntroducedIn() + \" - \" + this.maxVersion.getMostRecentSupportedVersion()\n              + \" versions, modify the plugins/limboapi/config.yml file if you want the plugin to work with other versions.\"\n      );\n    }\n  }\n\n  public void reloadPreparedPacketFactory() {\n    int level = this.server.getConfiguration().getCompressionLevel();\n    int threshold = this.server.getConfiguration().getCompressionThreshold();\n    this.compressionEnabled = threshold != -1;\n\n    this.preparedPacketFactory.updateCompressor(this.compressionEnabled, level, threshold,\n        Settings.IMP.MAIN.SAVE_UNCOMPRESSED_PACKETS, Settings.IMP.MAIN.COMPATIBILITY_MODE);\n    this.configPreparedPacketFactory.updateCompressor(this.compressionEnabled, level, threshold,\n        Settings.IMP.MAIN.SAVE_UNCOMPRESSED_PACKETS, Settings.IMP.MAIN.COMPATIBILITY_MODE);\n    this.loginPreparedPacketFactory.updateCompressor(this.compressionEnabled, level, threshold,\n        Settings.IMP.MAIN.SAVE_UNCOMPRESSED_PACKETS, Settings.IMP.MAIN.COMPATIBILITY_MODE);\n  }\n\n  @Override\n  public VirtualBlock createSimpleBlock(Block block) {\n    return SimpleBlock.fromLegacyID((short) block.getID());\n  }\n\n  @Override\n  public VirtualBlock createSimpleBlock(short legacyID) {\n    return SimpleBlock.fromLegacyID(legacyID);\n  }\n\n  @Override\n  public VirtualBlock createSimpleBlock(String modernID) {\n    return SimpleBlock.fromModernID(modernID);\n  }\n\n  @Override\n  public VirtualBlock createSimpleBlock(String modernID, Map<String, String> properties) {\n    return SimpleBlock.fromModernID(modernID, properties);\n  }\n\n  @Override\n  public VirtualBlock createSimpleBlock(short id, boolean modern) {\n    if (modern) {\n      return SimpleBlock.solid(id);\n    } else {\n      return SimpleBlock.fromLegacyID(id);\n    }\n  }\n\n  @Override\n  public VirtualBlock createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, short id) {\n    return new SimpleBlock(solid, air, motionBlocking, id);\n  }\n\n  @Override\n  public VirtualBlock createSimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, Map<String, String> properties) {\n    return new SimpleBlock(solid, air, motionBlocking, modernID, properties);\n  }\n\n  @Override\n  public VirtualWorld createVirtualWorld(Dimension dimension, double posX, double posY, double posZ, float yaw, float pitch) {\n    return new SimpleWorld(dimension, posX, posY, posZ, yaw, pitch);\n  }\n\n  @Override\n  public VirtualChunk createVirtualChunk(int posX, int posZ) {\n    return new SimpleChunk(posX, posZ);\n  }\n\n  @Override\n  public VirtualChunk createVirtualChunk(int posX, int posZ, VirtualBiome defaultBiome) {\n    return new SimpleChunk(posX, posZ, defaultBiome);\n  }\n\n  @Override\n  public VirtualChunk createVirtualChunk(int posX, int posZ, BuiltInBiome defaultBiome) {\n    return new SimpleChunk(posX, posZ, Biome.of(defaultBiome));\n  }\n\n  @Override\n  public Limbo createLimbo(VirtualWorld world) {\n    return new LimboImpl(this, world);\n  }\n\n  @Override\n  public void releasePreparedPacketThread(Thread thread) {\n    this.preparedPacketFactory.releaseThread(thread);\n  }\n\n  @Override\n  public PreparedPacket createPreparedPacket() {\n    return (PreparedPacket) this.preparedPacketFactory.createPreparedPacket(this.minVersion, this.maxVersion);\n  }\n\n  @Override\n  public PreparedPacket createPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion) {\n    return (PreparedPacket) this.preparedPacketFactory.createPreparedPacket(minVersion, maxVersion);\n  }\n\n  @Override\n  public PreparedPacket createConfigPreparedPacket() {\n    return (PreparedPacket) this.configPreparedPacketFactory.createPreparedPacket(this.minVersion, this.maxVersion);\n  }\n\n  @Override\n  public PreparedPacket createConfigPreparedPacket(ProtocolVersion minVersion, ProtocolVersion maxVersion) {\n    return (PreparedPacket) this.configPreparedPacketFactory.createPreparedPacket(minVersion, maxVersion);\n  }\n\n  public ByteBuf encodeSingleLogin(MinecraftPacket packet, ProtocolVersion version) {\n    return this.loginPreparedPacketFactory.encodeSingle(packet, version);\n  }\n\n  public ByteBuf encodeSingleLoginUncompressed(MinecraftPacket packet, ProtocolVersion version) {\n    return this.loginUncompressedPreparedPacketFactory.encodeSingle(packet, version);\n  }\n\n  public void inject3rdParty(Player player, MinecraftConnection connection, ChannelPipeline pipeline) {\n    StateRegistry state = connection.getState();\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) < 0\n        || (state != StateRegistry.CONFIG && state != StateRegistry.LOGIN)) {\n      this.preparedPacketFactory.inject(player, connection, pipeline);\n    } else {\n      this.configPreparedPacketFactory.inject(player, connection, pipeline);\n    }\n  }\n\n  public void setState(MinecraftConnection connection, StateRegistry stateRegistry) {\n    connection.setState(stateRegistry);\n    this.setEncoderState(connection, stateRegistry);\n    this.fixDecoderState(connection, stateRegistry);\n  }\n\n  public void setActiveSessionHandler(MinecraftConnection connection, StateRegistry stateRegistry,\n                                      MinecraftSessionHandler sessionHandler) {\n    connection.setActiveSessionHandler(stateRegistry, sessionHandler);\n    this.setEncoderState(connection, stateRegistry);\n    this.fixDecoderState(connection, stateRegistry);\n  }\n\n  public void setEncoderState(MinecraftConnection connection, StateRegistry state) {\n    // As CONFIG state was added in 1.20.2, no need to track it for lower versions\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) < 0) {\n      return;\n    }\n\n    if (Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n      MinecraftEncoder encoder = connection.getChannel().pipeline().get(MinecraftEncoder.class);\n      if (encoder != null) {\n        encoder.setState(state);\n      }\n    }\n\n    PreparedPacketEncoder encoder = connection.getChannel().pipeline().get(PreparedPacketEncoder.class);\n    if (encoder != null) {\n      if (state != StateRegistry.CONFIG && state != StateRegistry.LOGIN) {\n        encoder.setFactory(this.preparedPacketFactory);\n      } else {\n        encoder.setFactory(this.configPreparedPacketFactory);\n      }\n    }\n  }\n\n  public void fixDecoderState(MinecraftConnection connection, StateRegistry state) {\n    if (state.name() == null) { // custom state\n      MinecraftDecoder decoder = connection.getChannel().pipeline().get(MinecraftDecoder.class);\n      if (decoder != null) {\n        try {\n          // Let decoder know what we're in PLAY state, or it will kick the player.\n          STATE_FIELD.invokeExact(decoder, StateRegistry.PLAY);\n        } catch (Throwable throwable) {\n          LimboAPI.getLogger().error(\"Failed to fixup decoder\", throwable);\n        }\n      }\n    }\n  }\n\n  public void deject3rdParty(ChannelPipeline pipeline) {\n    this.preparedPacketFactory.deject(pipeline);\n  }\n\n  public void fixDecompressor(ChannelPipeline pipeline, int threshold, boolean onLogin) {\n    ChannelHandler decoder;\n    if (onLogin && Settings.IMP.MAIN.DISCARD_COMPRESSION_ON_LOGIN) {\n      decoder = new MinecraftDiscardCompressDecoder();\n    } else if (!onLogin && Settings.IMP.MAIN.DISCARD_COMPRESSION_AFTER_LOGIN) {\n      decoder = new MinecraftDiscardCompressDecoder();\n    } else {\n      int level = this.server.getConfiguration().getCompressionLevel();\n      VelocityCompressor compressor = Natives.compress.get().create(level);\n      decoder = new MinecraftLimitedCompressDecoder(threshold, compressor);\n    }\n\n    if (Settings.IMP.MAIN.COMPATIBILITY_MODE && pipeline.context(Connections.COMPRESSION_DECODER) != null) {\n      pipeline.replace(Connections.COMPRESSION_DECODER, Connections.COMPRESSION_DECODER, decoder);\n    } else {\n      pipeline.addBefore(Connections.MINECRAFT_DECODER, Connections.COMPRESSION_DECODER, decoder);\n    }\n  }\n\n  public void fixCompressor(ChannelPipeline pipeline, ProtocolVersion version) {\n    ChannelHandler compressionHandler = pipeline.get(Connections.COMPRESSION_ENCODER);\n    if (compressionHandler == null) {\n      if (!Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n        pipeline.addBefore(Connections.MINECRAFT_DECODER, Connections.FRAME_ENCODER, MinecraftVarintLengthEncoder.INSTANCE);\n      }\n    } else {\n      int level = this.server.getConfiguration().getCompressionLevel();\n      int compressionThreshold = this.server.getConfiguration().getCompressionThreshold();\n      VelocityCompressor compressor = Natives.compress.get().create(level);\n      if (!Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n        MinecraftCompressorAndLengthEncoder encoder = new MinecraftCompressorAndLengthEncoder(compressionThreshold, compressor);\n        pipeline.remove(compressionHandler);\n        pipeline.addBefore(Connections.MINECRAFT_ENCODER, Connections.COMPRESSION_ENCODER, encoder);\n      }\n\n      if (pipeline.get(Connections.COMPRESSION_DECODER) instanceof LimboCompressDecoder) {\n        MinecraftCompressDecoder decoder = new MinecraftCompressDecoder(compressionThreshold, compressor, ProtocolUtils.Direction.SERVERBOUND);\n        pipeline.replace(Connections.COMPRESSION_DECODER, Connections.COMPRESSION_DECODER, decoder);\n      } else if (Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n        compressor.close();\n      }\n    }\n  }\n\n  @Override\n  public void passLoginLimbo(Player player) {\n    if (this.loginQueue.containsKey(player)) {\n      this.loginQueue.get(player).next();\n    }\n  }\n\n  @Override\n  public VirtualItem getItem(Item item) {\n    return SimpleItem.fromItem(item);\n  }\n\n  @Override\n  public VirtualItem getItem(String itemID) {\n    return SimpleItem.fromModernID(itemID);\n  }\n\n  @Override\n  public VirtualItem getLegacyItem(int itemLegacyID) {\n    return SimpleItem.fromLegacyID(itemLegacyID);\n  }\n\n  @Override\n  public ItemComponentMap createItemComponentMap() {\n    return new SimpleItemComponentMap(this.itemComponentManager);\n  }\n\n  @Override\n  public VirtualBlockEntity getBlockEntity(String entityID) {\n    return SimpleBlockEntity.fromModernID(entityID);\n  }\n\n  @Override\n  public PacketFactory getPacketFactory() {\n    return this.packetFactory;\n  }\n\n  public VelocityServer getServer() {\n    return this.server;\n  }\n\n  public void setLimboJoined(Player player) {\n    if (!this.isLimboJoined(player)) {\n      ConnectedPlayer connectedPlayer = (ConnectedPlayer) player;\n      connectedPlayer.getPhase().onFirstJoin(connectedPlayer);\n      this.players.add(player);\n    }\n  }\n\n  public void unsetLimboJoined(Player player) {\n    this.players.remove(player);\n  }\n\n  public boolean isLimboJoined(Player player) {\n    return this.players.contains(player);\n  }\n\n  public CachedPackets getPackets() {\n    return this.packets;\n  }\n\n  public void addLoginQueue(Player player, LoginTasksQueue queue) {\n    this.loginQueue.put(player, queue);\n  }\n\n  public void removeLoginQueue(Player player) {\n    this.loginQueue.remove(player);\n  }\n\n  public boolean hasLoginQueue(Player player) {\n    return this.loginQueue.containsKey(player);\n  }\n\n  public LoginTasksQueue getLoginQueue(Player player) {\n    return this.loginQueue.get(player);\n  }\n\n  public void setKickCallback(Player player, Function<KickedFromServerEvent, Boolean> queue) {\n    this.kickCallback.put(player, queue);\n  }\n\n  public void removeKickCallback(Player player) {\n    this.kickCallback.remove(player);\n  }\n\n  public Function<KickedFromServerEvent, Boolean> getKickCallback(Player player) {\n    return this.kickCallback.get(player);\n  }\n\n  public void setNextServer(Player player, RegisteredServer nextServer) {\n    this.nextServer.put(player, nextServer);\n  }\n\n  public void removeNextServer(Player player) {\n    this.nextServer.remove(player);\n  }\n\n  public boolean hasNextServer(Player player) {\n    return this.nextServer.containsKey(player);\n  }\n\n  public RegisteredServer getNextServer(Player player) {\n    return this.nextServer.get(player);\n  }\n\n  public void setInitialID(Player player, UUID nextServer) {\n    INITIAL_ID.put(player, nextServer);\n  }\n\n  public void removeInitialID(Player player) {\n    INITIAL_ID.remove(player);\n  }\n\n  public UUID getInitialID(Player player) {\n    return INITIAL_ID.get(player);\n  }\n\n  public LoginListener getLoginListener() {\n    return this.loginListener;\n  }\n\n  public boolean isCompressionEnabled() {\n    return this.compressionEnabled;\n  }\n\n  public PreparedPacketFactory getPreparedPacketFactory() {\n    return this.preparedPacketFactory;\n  }\n\n  public ProtocolVersion getPrepareMinVersion() {\n    return this.minVersion;\n  }\n\n  public ProtocolVersion getPrepareMaxVersion() {\n    return this.maxVersion;\n  }\n\n  public EventManagerHook getEventManagerHook() {\n    return this.eventManagerHook;\n  }\n\n  @Override\n  public WorldFile openWorldFile(BuiltInWorldFileType apiType, Path file) throws IOException {\n    return WorldFileTypeRegistry.fromApiType(apiType, file);\n  }\n\n  @Override\n  public WorldFile openWorldFile(BuiltInWorldFileType apiType, InputStream stream) throws IOException {\n    return WorldFileTypeRegistry.fromApiType(apiType, stream);\n  }\n\n  @Override\n  public WorldFile openWorldFile(BuiltInWorldFileType apiType, CompoundBinaryTag tag) {\n    return WorldFileTypeRegistry.fromApiType(apiType, tag);\n  }\n\n  private static void setLogger(Logger logger) {\n    LOGGER = logger;\n  }\n\n  public static Logger getLogger() {\n    return LOGGER;\n  }\n\n  private static void setSerializer(Serializer serializer) {\n    SERIALIZER = serializer;\n  }\n\n  public static Serializer getSerializer() {\n    return SERIALIZER;\n  }\n\n  static {\n    try {\n      STATE_FIELD = MethodHandles.privateLookupIn(MinecraftDecoder.class, MethodHandles.lookup())\n          .findSetter(MinecraftDecoder.class, \"state\", StateRegistry.class);\n    } catch (NoSuchFieldException | IllegalAccessException e) {\n      throw new RuntimeException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/Settings.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi;\n\nimport java.util.List;\nimport net.elytrium.commons.config.YamlConfig;\nimport net.elytrium.commons.kyori.serialization.Serializers;\n\npublic class Settings extends YamlConfig {\n\n  @Ignore\n  public static final Settings IMP = new Settings();\n\n  @Final\n  public String VERSION = BuildConstants.LIMBO_VERSION;\n\n  @Comment({\n      \"Available serializers:\",\n      \"LEGACY_AMPERSAND - \\\"&c&lExample &c&9Text\\\".\",\n      \"LEGACY_SECTION - \\\"§c§lExample §c§9Text\\\".\",\n      \"MINIMESSAGE - \\\"<bold><red>Example</red> <blue>Text</blue></bold>\\\". (https://webui.adventure.kyori.net/)\",\n      \"GSON - \\\"[{\\\"text\\\":\\\"Example\\\",\\\"bold\\\":true,\\\"color\\\":\\\"red\\\"},{\\\"text\\\":\\\" \\\",\\\"bold\\\":true},{\\\"text\\\":\\\"Text\\\",\\\"bold\\\":true,\\\"color\\\":\\\"blue\\\"}]\\\". (https://minecraft.tools/en/json_text.php/)\",\n      \"GSON_COLOR_DOWNSAMPLING - Same as GSON, but uses downsampling.\"\n  })\n  public Serializers SERIALIZER = Serializers.LEGACY_AMPERSAND;\n  public String PREFIX = \"LimboAPI &6>>&f\";\n\n  @Create\n  public MAIN MAIN;\n\n  @Comment(\"Don't use \\\\n, use {NL} for new line, and {PRFX} for prefix.\")\n  public static class MAIN {\n\n    public boolean CHECK_FOR_UPDATES = true;\n\n    public int MAX_CHAT_MESSAGE_LENGTH = 256;\n    public int MAX_BRAND_NAME_LENGTH = 64;\n    public int MAX_UNKNOWN_PACKET_LENGTH = 2048;\n    public int MAX_SINGLE_GENERIC_PACKET_LENGTH = 4096;\n    public int MAX_MULTI_GENERIC_PACKET_LENGTH = 131072;\n    @Comment({\n        \"Default max packet length (in bytes) that will be proceeded, other packets will be dropped.\",\n        \"Can be increased with Limbo#setMaxSuppressPacketLength\"\n    })\n    public int MAX_PACKET_LENGTH_TO_SUPPRESS_IT = 512;\n    @Comment({\n        \"Discards all packets longer than compression-threshold. Helps to mitigate some attacks.\",\n        \"Needs compression-threshold to be 300 or higher to support 1.19 chat-signing, so it is disabled by default\"\n    })\n    public boolean DISCARD_COMPRESSION_ON_LOGIN = false;\n    public boolean DISCARD_COMPRESSION_AFTER_LOGIN = false;\n    @Comment({\n        \"LimboAPI will consume more RAM if this option is enabled, but compatibility with other plugins will be better\",\n        \"Enable it if you have a plugin installed that bypasses compression (e.g. Geyser)\"\n    })\n    public boolean SAVE_UNCOMPRESSED_PACKETS = true;\n    @Comment({\n        \"WARNING: do not change when proxy is running, it will break exsiting connections\",\n        \"LimboAPI will be running in compatibility mode, allowing other plugins to\",\n        \"intercept or modify packets sent by it, but will reduce performance in some cases.\",\n        \"Enable if you are using plugins that modify packets. (e.g. ViaVersion, Raknetify or PacketEvents)\",\n        \"Require 'save-uncompressed-packets: true' to work properly\"\n    })\n    public boolean COMPATIBILITY_MODE = false;\n\n    @Comment(\"Logging for connect and disconnect messages.\")\n    public boolean LOGGING_ENABLED = true;\n    @Comment({\n        \"Change the parameters below, if you want to reduce the RAM consumption.\",\n        \"Use VelocityTools to completely block Minecraft versions (https://github.com/Elytrium/VelocityTools/releases/latest).\",\n        \"Available versions:\",\n        \"1_7_2, 1_7_6, 1_8, 1_9, 1_9_1, 1_9_2, 1_9_4, 1_10, 1_11, 1_11_1, 1_12, 1_12_1, 1_12_2,\",\n        \"1_13, 1_13_1, 1_13_2, 1_14, 1_14_1, 1_14_2, 1_14_3, 1_14_4, 1_15, 1_15_1, 1_15_2,\",\n        \"1_16, 1_16_1, 1_16_2, 1_16_3, 1_16_4, 1_17, 1_17_1, 1_18, 1_18_2, 1_19, 1_19_1, 1_19_3,\",\n        \"1_20, 1_20_2, 1_20_3, 1_20_5, 1_21, 1_21_2, 1_21_4, 1_21_5, 1_21_6, 1_21_7, 1_21_9, 1_21_11,\",\n        \"26_1, LATEST\"\n    })\n    public String PREPARE_MIN_VERSION = \"1_7_2\";\n    public String PREPARE_MAX_VERSION = \"LATEST\";\n\n    @Comment(\"Helpful if you want some plugins proceed before LimboAPI. For example, it is needed to Floodgate to replace UUID.\")\n    public List<String> PRE_LIMBO_PROFILE_REQUEST_PLUGINS = List.of(\"floodgate\", \"geyser\");\n\n    @Comment(\"Should reduced debug info be enabled (reduced information in F3) if there is no preference for Limbo\")\n    public boolean REDUCED_DEBUG_INFO = false;\n\n    @Comment(\"Used to hide unsigned chat popup\")\n    public boolean SEND_ENFORCE_SECURE_CHAT = true;\n\n    public int VIEW_DISTANCE = 10;\n\n    public int SIMULATION_DISTANCE = 9;\n\n    @Comment({\n        \"How many chunks we should send when a player spawns.\",\n        \" 0 = send no chunks on spawn.\",\n        \" 1 = send only the spawn chunk.\",\n        \" 2 = send the spawn chunk and chunks next to the spawn chunk.\",\n        \" 3 = send the spawn chunk, chunks next to the spawn chunk and next to these chunks.\",\n        \" and so on..\"\n    })\n    public int CHUNK_RADIUS_SEND_ON_SPAWN = 2;\n\n    @Comment(\"How many chunks we should send per tick\")\n    public int CHUNKS_PER_TICK = 16;\n\n    @Comment(\"Maximum delay for receiving ChatSession packet (for online-mode client-side race condition mitigation)\")\n    public int CHAT_SESSION_PACKET_TIMEOUT = 5000;\n\n    @Comment(\"Ability to force disable chat signing on 1.19.3+\")\n    public boolean FORCE_DISABLE_MODERN_CHAT_SIGNING = true;\n\n    @Create\n    public MESSAGES MESSAGES;\n\n    public static class MESSAGES {\n\n      public String TOO_BIG_PACKET = \"{PRFX}{NL}{NL}&cYour client sent too big packet!\";\n      public String INVALID_PING = \"{PRFX}{NL}{NL}&cYour client sent invalid ping packet!\";\n      public String INVALID_SWITCH = \"{PRFX}{NL}{NL}&cYour client sent an unexpected state switching packet!\";\n      public String TIME_OUT = \"{PRFX}{NL}{NL}Timed out.\";\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/file/MCEditSchematicFile.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.file;\n\nimport net.elytrium.limboapi.api.LimboFactory;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport net.elytrium.limboapi.api.file.WorldFile;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\n\npublic class MCEditSchematicFile implements WorldFile {\n\n  private final short width;\n  private final short height;\n  private final short length;\n  private final byte[] blocks;\n  private byte[] addBlocks = new byte[0];\n\n  public MCEditSchematicFile(CompoundBinaryTag tag) {\n    this.width = tag.getShort(\"Width\");\n    this.height = tag.getShort(\"Height\");\n    this.length = tag.getShort(\"Length\");\n    this.blocks = tag.getByteArray(\"Blocks\");\n\n    if (tag.keySet().contains(\"AddBlocks\")) {\n      this.addBlocks = tag.getByteArray(\"AddBlocks\");\n    }\n  }\n\n  @Override\n  public void toWorld(LimboFactory factory, VirtualWorld world, int offsetX, int offsetY, int offsetZ, int lightLevel) {\n    short[] blockIDs = new short[this.blocks.length];\n    for (int index = 0; index < blockIDs.length; ++index) {\n      if ((index >> 1) >= this.addBlocks.length) {\n        blockIDs[index] = (short) (this.blocks[index] & 0xFF);\n      } else {\n        if ((index & 1) == 0) {\n          blockIDs[index] = (short) (((this.addBlocks[index >> 1] & 0x0F) << 8) + (this.addBlocks[index] & 0xFF));\n        } else {\n          blockIDs[index] = (short) (((this.addBlocks[index >> 1] & 0xF0) << 4) + (this.addBlocks[index] & 0xFF));\n        }\n      }\n    }\n\n    for (int posX = 0; posX < this.width; ++posX) {\n      for (int posY = 0; posY < this.height; ++posY) {\n        for (int posZ = 0; posZ < this.length; ++posZ) {\n          int index = (posY * this.length + posZ) * this.width + posX;\n          world.setBlock(posX + offsetX, posY + offsetY, posZ + offsetZ, factory.createSimpleBlock(blockIDs[index]));\n        }\n      }\n    }\n\n    world.fillSkyLight(lightLevel);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/file/StructureNbtFile.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.file;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.LimboFactory;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport net.elytrium.limboapi.api.file.WorldFile;\nimport net.kyori.adventure.nbt.BinaryTag;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport net.kyori.adventure.nbt.ListBinaryTag;\n\npublic class StructureNbtFile implements WorldFile {\n\n  private final ListBinaryTag blocks;\n  private final ListBinaryTag palette;\n\n  public StructureNbtFile(CompoundBinaryTag tag) {\n    this.blocks = tag.getList(\"blocks\");\n    this.palette = tag.getList(\"palette\");\n  }\n\n  @Override\n  public void toWorld(LimboFactory factory, VirtualWorld world, int offsetX, int offsetY, int offsetZ, int lightLevel) {\n    VirtualBlock[] palettedBlocks = new VirtualBlock[this.palette.size()];\n    for (int i = 0; i < this.palette.size(); ++i) {\n      CompoundBinaryTag map = this.palette.getCompound(i);\n\n      Map<String, String> propertiesMap = null;\n      if (map.keySet().contains(\"Properties\")) {\n        propertiesMap = new HashMap<>();\n        CompoundBinaryTag properties = map.getCompound(\"Properties\");\n        for (String entry : properties.keySet()) {\n          propertiesMap.put(entry, properties.getString(entry));\n        }\n      }\n\n      palettedBlocks[i] = factory.createSimpleBlock(map.getString(\"Name\"), propertiesMap);\n    }\n\n    for (BinaryTag binaryTag : this.blocks) {\n      CompoundBinaryTag blockMap = (CompoundBinaryTag) binaryTag;\n      ListBinaryTag posTag = blockMap.getList(\"pos\");\n      VirtualBlock block = palettedBlocks[blockMap.getInt(\"state\")];\n      int x = offsetX + posTag.getInt(0);\n      int y = offsetY + posTag.getInt(1);\n      int z = offsetZ + posTag.getInt(2);\n      world.setBlock(x, y, z, block);\n\n      CompoundBinaryTag blockEntityNbt = blockMap.getCompound(\"nbt\");\n      if (!blockEntityNbt.keySet().isEmpty()) {\n        world.setBlockEntity(x, y, z, blockEntityNbt, factory.getBlockEntity(block.getModernStringID()));\n      }\n    }\n\n    world.fillSkyLight(lightLevel);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/file/WorldEditSchemFile.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.file;\n\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.buffer.Unpooled;\nimport net.elytrium.limboapi.api.LimboFactory;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport net.elytrium.limboapi.api.file.WorldFile;\nimport net.kyori.adventure.nbt.BinaryTag;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport net.kyori.adventure.nbt.IntBinaryTag;\nimport net.kyori.adventure.nbt.ListBinaryTag;\n\npublic class WorldEditSchemFile implements WorldFile {\n\n  private final short width;\n  private final short height;\n  private final short length;\n  private final int[] blocks;\n  private final CompoundBinaryTag palette;\n  private final ListBinaryTag blockEntities;\n\n  public WorldEditSchemFile(CompoundBinaryTag rootTag) {\n\n    ByteBuf blockDataBuf;\n\n    if (rootTag.contains(\"Width\")) {\n      // Check is it old worldedit schema\n      this.width = rootTag.getShort(\"Width\");\n      this.height = rootTag.getShort(\"Height\");\n      this.length = rootTag.getShort(\"Length\");\n      this.palette = rootTag.getCompound(\"Palette\");\n\n      blockDataBuf = Unpooled.wrappedBuffer(rootTag.getByteArray(\"BlockData\"));\n\n      this.blockEntities = rootTag.getList(\"BlockEntities\");\n\n    } else if (rootTag.getCompound(\"Schematic\").contains(\"Blocks\")) {\n      // Check is it new worldedit schema\n      CompoundBinaryTag schematicTag = rootTag.getCompound(\"Schematic\");\n\n      this.width = schematicTag.getShort(\"Width\");\n      this.height = schematicTag.getShort(\"Height\");\n      this.length = schematicTag.getShort(\"Length\");\n\n      CompoundBinaryTag blocksTag = schematicTag.getCompound(\"Blocks\");\n      this.palette = blocksTag.getCompound(\"Palette\");\n\n      blockDataBuf = Unpooled.wrappedBuffer(blocksTag.getByteArray(\"Data\"));\n\n      this.blockEntities = blocksTag.getList(\"BlockEntities\");\n    } else {\n      // Unknown schema, throw exception\n      throw new IllegalArgumentException(\"Invalid worldedit file format. Please open an issue on GitHub.\");\n    }\n\n    this.blocks = new int[this.width * this.height * this.length];\n    for (int i = 0; i < this.blocks.length; i++) {\n      this.blocks[i] = ProtocolUtils.readVarInt(blockDataBuf);\n    }\n  }\n\n  @Override\n  public void toWorld(LimboFactory factory, VirtualWorld world, int offsetX, int offsetY, int offsetZ, int lightLevel) {\n    VirtualBlock[] palettedBlocks = new VirtualBlock[this.palette.keySet().size()];\n    this.palette.forEach((entry) -> palettedBlocks[((IntBinaryTag) entry.getValue()).value()] = factory.createSimpleBlock(entry.getKey()));\n\n    for (int posX = 0; posX < this.width; ++posX) {\n      for (int posY = 0; posY < this.height; ++posY) {\n        for (int posZ = 0; posZ < this.length; ++posZ) {\n          int index = (posY * this.length + posZ) * this.width + posX;\n          world.setBlock(posX + offsetX, posY + offsetY, posZ + offsetZ, palettedBlocks[this.blocks[index]]);\n        }\n      }\n    }\n\n    for (BinaryTag blockEntity : this.blockEntities) {\n      CompoundBinaryTag blockEntityData = (CompoundBinaryTag) blockEntity;\n      int[] posTag = blockEntityData.getIntArray(\"Pos\");\n      world.setBlockEntity(\n          offsetX + posTag[0],\n          offsetY + posTag[1],\n          offsetZ + posTag[2],\n          blockEntityData,\n          factory.getBlockEntity(blockEntityData.getString(\"Id\")));\n    }\n\n    world.fillSkyLight(lightLevel);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/file/WorldFileTypeRegistry.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.file;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.nio.file.Path;\nimport java.util.EnumMap;\nimport java.util.function.Function;\nimport net.elytrium.limboapi.api.file.BuiltInWorldFileType;\nimport net.elytrium.limboapi.api.file.WorldFile;\nimport net.kyori.adventure.nbt.BinaryTagIO;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\n\npublic enum WorldFileTypeRegistry {\n  SCHEMATIC(BuiltInWorldFileType.SCHEMATIC, MCEditSchematicFile::new),\n  WORLDEDIT_SCHEM(BuiltInWorldFileType.WORLDEDIT_SCHEM, WorldEditSchemFile::new),\n  STRUCTURE(BuiltInWorldFileType.STRUCTURE, StructureNbtFile::new);\n\n  private static final EnumMap<BuiltInWorldFileType, WorldFileTypeRegistry> API_TYPE_MAP = new EnumMap<>(BuiltInWorldFileType.class);\n  private final BuiltInWorldFileType apiType;\n  private final Function<CompoundBinaryTag, WorldFile> worldFileFunction;\n\n  static {\n    for (WorldFileTypeRegistry pluginType : WorldFileTypeRegistry.values()) {\n      API_TYPE_MAP.put(pluginType.apiType, pluginType);\n    }\n  }\n\n  WorldFileTypeRegistry(BuiltInWorldFileType apiType, Function<CompoundBinaryTag, WorldFile> worldFileFunction) {\n    this.apiType = apiType;\n    this.worldFileFunction = worldFileFunction;\n  }\n\n  public static WorldFileTypeRegistry fromApiType(BuiltInWorldFileType apiType) {\n    return API_TYPE_MAP.get(apiType);\n  }\n\n  public static WorldFile fromApiType(BuiltInWorldFileType apiType, Path file) throws IOException {\n    return fromApiType(apiType).fromNbt(file);\n  }\n\n  public static WorldFile fromApiType(BuiltInWorldFileType apiType, InputStream stream) throws IOException {\n    return fromApiType(apiType).fromNbt(stream);\n  }\n\n  public static WorldFile fromApiType(BuiltInWorldFileType apiType, CompoundBinaryTag tag) {\n    return fromApiType(apiType).fromNbt(tag);\n  }\n\n  public WorldFile fromNbt(Path file) throws IOException {\n    return this.fromNbt(BinaryTagIO.unlimitedReader().read(file, BinaryTagIO.Compression.GZIP));\n  }\n\n  public WorldFile fromNbt(InputStream stream) throws IOException {\n    return this.fromNbt(BinaryTagIO.unlimitedReader().read(stream, BinaryTagIO.Compression.GZIP));\n  }\n\n  public WorldFile fromNbt(CompoundBinaryTag tag) {\n    return this.worldFileFunction.apply(tag);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/disconnect/DisconnectListener.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.disconnect;\n\nimport com.velocitypowered.api.event.Subscribe;\nimport com.velocitypowered.api.event.connection.DisconnectEvent;\nimport com.velocitypowered.api.proxy.Player;\nimport net.elytrium.limboapi.LimboAPI;\n\npublic class DisconnectListener {\n\n  private final LimboAPI plugin;\n\n  public DisconnectListener(LimboAPI plugin) {\n    this.plugin = plugin;\n  }\n\n  @Subscribe\n  public void onDisconnect(DisconnectEvent event) {\n    Player player = event.getPlayer();\n    this.plugin.unsetLimboJoined(player);\n    this.plugin.removeLoginQueue(player);\n    this.plugin.removeKickCallback(player);\n    this.plugin.removeNextServer(player);\n    this.plugin.removeInitialID(player);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/dummy/ClosedChannel.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.dummy;\n\nimport io.netty.buffer.ByteBufAllocator;\nimport io.netty.channel.Channel;\nimport io.netty.channel.ChannelConfig;\nimport io.netty.channel.ChannelFuture;\nimport io.netty.channel.ChannelId;\nimport io.netty.channel.ChannelMetadata;\nimport io.netty.channel.ChannelPipeline;\nimport io.netty.channel.ChannelProgressivePromise;\nimport io.netty.channel.ChannelPromise;\nimport io.netty.channel.EventLoop;\nimport io.netty.util.Attribute;\nimport io.netty.util.AttributeKey;\nimport java.net.SocketAddress;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\npublic class ClosedChannel implements Channel {\n\n  private final EventLoop eventLoop;\n\n  public ClosedChannel(EventLoop eventLoop) {\n    this.eventLoop = eventLoop;\n  }\n\n  @Override\n  public ChannelId id() {\n    return null;\n  }\n\n  @Override\n  public EventLoop eventLoop() {\n    return this.eventLoop;\n  }\n\n  @Override\n  public Channel parent() {\n    return null;\n  }\n\n  @Override\n  public ChannelConfig config() {\n    return null;\n  }\n\n  @Override\n  public boolean isOpen() {\n    return false;\n  }\n\n  @Override\n  public boolean isRegistered() {\n    return false;\n  }\n\n  @Override\n  public boolean isActive() {\n    return false;\n  }\n\n  @Override\n  public ChannelMetadata metadata() {\n    return null;\n  }\n\n  @Override\n  public SocketAddress localAddress() {\n    return null;\n  }\n\n  @Override\n  public SocketAddress remoteAddress() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture closeFuture() {\n    return null;\n  }\n\n  @Override\n  public boolean isWritable() {\n    return false;\n  }\n\n  @Override\n  public long bytesBeforeUnwritable() {\n    return 0;\n  }\n\n  @Override\n  public long bytesBeforeWritable() {\n    return 0;\n  }\n\n  @Override\n  public Unsafe unsafe() {\n    return null;\n  }\n\n  @Override\n  public ChannelPipeline pipeline() {\n    return null;\n  }\n\n  @Override\n  public ByteBufAllocator alloc() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture bind(SocketAddress localAddress) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture bind(SocketAddress localAddress, ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture connect(SocketAddress remoteAddress) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture connect(SocketAddress remoteAddress, ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture disconnect() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture disconnect(ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture close() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture close(ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture deregister() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture deregister(ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public Channel read() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture write(Object msg) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture write(Object msg, ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public Channel flush() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture writeAndFlush(Object msg, ChannelPromise promise) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture writeAndFlush(Object msg) {\n    return null;\n  }\n\n  @Override\n  public ChannelPromise newPromise() {\n    return null;\n  }\n\n  @Override\n  public ChannelProgressivePromise newProgressivePromise() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture newSucceededFuture() {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture newFailedFuture(Throwable cause) {\n    return null;\n  }\n\n  @Override\n  public ChannelPromise voidPromise() {\n    return null;\n  }\n\n  @Override\n  public <T> Attribute<T> attr(AttributeKey<T> key) {\n    return null;\n  }\n\n  @Override\n  public <T> boolean hasAttr(AttributeKey<T> key) {\n    return false;\n  }\n\n  @Override\n  public int compareTo(@NonNull Channel o) {\n    return 0;\n  }\n\n  @Override\n  public boolean equals(Object o) {\n    return o instanceof ClosedChannel && this.compareTo((Channel) o) == 0;\n  }\n\n  @Override\n  public int hashCode() {\n    return 0;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/dummy/ClosedMinecraftConnection.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.dummy;\n\nimport com.velocitypowered.proxy.VelocityServer;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport io.netty.channel.Channel;\n\npublic class ClosedMinecraftConnection extends MinecraftConnection {\n\n  public ClosedMinecraftConnection(Channel channel, VelocityServer server) {\n    super(channel, server);\n  }\n\n  @Override\n  public boolean isClosed() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/dummy/DummyEventPool.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.dummy;\n\nimport edu.umd.cs.findbugs.annotations.SuppressFBWarnings;\nimport io.netty.channel.Channel;\nimport io.netty.channel.ChannelFuture;\nimport io.netty.channel.ChannelPromise;\nimport io.netty.channel.EventLoop;\nimport io.netty.channel.EventLoopGroup;\nimport io.netty.util.concurrent.EventExecutor;\nimport io.netty.util.concurrent.Future;\nimport io.netty.util.concurrent.ProgressivePromise;\nimport io.netty.util.concurrent.Promise;\nimport io.netty.util.concurrent.ScheduledFuture;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.concurrent.Callable;\nimport java.util.concurrent.TimeUnit;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\n@SuppressWarnings(\"ConstantConditions\")\n@SuppressFBWarnings(value = \"NP_NONNULL_RETURN_VIOLATION\", justification = \"This is dummy class.\")\npublic class DummyEventPool implements EventLoop {\n\n  @Override\n  public EventLoopGroup parent() {\n    return null;\n  }\n\n  @Override\n  public boolean inEventLoop() {\n    return true;\n  }\n\n  @Override\n  public boolean inEventLoop(Thread thread) {\n    return true;\n  }\n\n  @Override\n  public <V> Promise<V> newPromise() {\n    return null;\n  }\n\n  @Override\n  public <V> ProgressivePromise<V> newProgressivePromise() {\n    return null;\n  }\n\n  @Override\n  public <V> Future<V> newSucceededFuture(V v) {\n    return null;\n  }\n\n  @Override\n  public <V> Future<V> newFailedFuture(Throwable throwable) {\n    return null;\n  }\n\n  @Override\n  public boolean isShuttingDown() {\n    return false;\n  }\n\n  @Override\n  public Future<?> shutdownGracefully() {\n    return null;\n  }\n\n  @Override\n  public Future<?> shutdownGracefully(long l, long l1, TimeUnit timeUnit) {\n    return null;\n  }\n\n  @Override\n  public Future<?> terminationFuture() {\n    return null;\n  }\n\n  @Override\n  public void shutdown() {\n\n  }\n\n  @Override\n  public List<Runnable> shutdownNow() {\n    return null;\n  }\n\n  @Override\n  public boolean isShutdown() {\n    return false;\n  }\n\n  @Override\n  public boolean isTerminated() {\n    return false;\n  }\n\n  @Override\n  public boolean awaitTermination(long l, @NonNull TimeUnit timeUnit) {\n    return false;\n  }\n\n  @Override\n  public EventLoop next() {\n    return null;\n  }\n\n  @Override\n  public Iterator<EventExecutor> iterator() {\n    return null;\n  }\n\n  @Override\n  public Future<?> submit(Runnable runnable) {\n    return null;\n  }\n\n  @Override\n  public <T> Future<T> submit(Runnable runnable, T t) {\n    return null;\n  }\n\n  @Override\n  public <T> Future<T> submit(Callable<T> callable) {\n    return null;\n  }\n\n  @NonNull\n  @Override\n  public <T> List<java.util.concurrent.Future<T>> invokeAll(@NonNull Collection<? extends Callable<T>> collection) {\n    return null;\n  }\n\n  @NonNull\n  @Override\n  public <T> List<java.util.concurrent.Future<T>> invokeAll(@NonNull Collection<? extends Callable<T>> collection, long l, @NonNull TimeUnit timeUnit) {\n    return null;\n  }\n\n  @NonNull\n  @Override\n  public <T> T invokeAny(@NonNull Collection<? extends Callable<T>> collection) {\n    return null;\n  }\n\n  @Override\n  public <T> T invokeAny(@NonNull Collection<? extends Callable<T>> collection, long l, @NonNull TimeUnit timeUnit) {\n    return null;\n  }\n\n  @Override\n  public ScheduledFuture<?> schedule(Runnable runnable, long l, TimeUnit timeUnit) {\n    return null;\n  }\n\n  @Override\n  public <V> ScheduledFuture<V> schedule(Callable<V> callable, long l, TimeUnit timeUnit) {\n    return null;\n  }\n\n  @Override\n  public ScheduledFuture<?> scheduleAtFixedRate(Runnable runnable, long l, long l1, TimeUnit timeUnit) {\n    return null;\n  }\n\n  @Override\n  public ScheduledFuture<?> scheduleWithFixedDelay(Runnable runnable, long l, long l1, TimeUnit timeUnit) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture register(Channel channel) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture register(ChannelPromise channelPromise) {\n    return null;\n  }\n\n  @Override\n  public ChannelFuture register(Channel channel, ChannelPromise channelPromise) {\n    return null;\n  }\n\n  @Override\n  public void execute(@NonNull Runnable runnable) {\n\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/event/EventManagerHook.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.event;\n\nimport com.google.common.collect.ListMultimap;\nimport com.velocitypowered.api.event.EventTask;\nimport com.velocitypowered.api.event.PostOrder;\nimport com.velocitypowered.api.event.Subscribe;\nimport com.velocitypowered.api.event.player.GameProfileRequestEvent;\nimport com.velocitypowered.api.event.player.KickedFromServerEvent;\nimport com.velocitypowered.api.plugin.PluginContainer;\nimport com.velocitypowered.api.util.GameProfile;\nimport com.velocitypowered.proxy.event.VelocityEventManager;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.MethodType;\nimport java.lang.reflect.Array;\nimport java.lang.reflect.Field;\nimport java.lang.reflect.Method;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.function.Function;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.Settings;\n\n@SuppressWarnings(\"unchecked\")\npublic class EventManagerHook {\n\n  private static final Field HANDLERS_BY_TYPE_FIELD;\n  private static final Class<?> HANDLER_REGISTRATION_CLASS;\n  private static final MethodHandle PLUGIN_FIELD;\n  private static final MethodHandle FIRE_METHOD;\n  private static final MethodHandle FUTURE_FIELD;\n\n  private final Set<GameProfile> proceededProfiles = new HashSet<>();\n  private final LimboAPI plugin;\n  private final VelocityEventManager eventManager;\n\n  private Object handlerRegistrations;\n  private boolean hasHandlerRegistration;\n\n  public EventManagerHook(LimboAPI plugin, VelocityEventManager eventManager) {\n    this.plugin = plugin;\n    this.eventManager = eventManager;\n  }\n\n  @Subscribe(order = PostOrder.FIRST)\n  public EventTask onGameProfileRequest(GameProfileRequestEvent event) {\n    GameProfile originalProfile = event.getGameProfile();\n    if (this.proceededProfiles.remove(originalProfile)) {\n      return null;\n    } else {\n      CompletableFuture<GameProfileRequestEvent> fireFuture = new CompletableFuture<>();\n      CompletableFuture<GameProfileRequestEvent> hookFuture = new CompletableFuture<>();\n      fireFuture.thenAccept(modifiedEvent -> {\n        try {\n          this.plugin.getLoginListener().hookLoginSession(modifiedEvent);\n          hookFuture.complete(modifiedEvent);\n        } catch (Throwable e) {\n          LimboAPI.getLogger().error(\"Failed to handle GameProfileRequestEvent\", e);\n          throw new ReflectionException(e);\n        }\n      });\n\n      if (this.hasHandlerRegistration) {\n        try {\n          FIRE_METHOD.invoke(this.eventManager, fireFuture, event, 0, false, this.handlerRegistrations);\n        } catch (Throwable e) {\n          fireFuture.complete(event);\n          throw new ReflectionException(e);\n        }\n      } else {\n        fireFuture.complete(event);\n      }\n\n      // ignoring other subscribers by directly completing the future\n      return EventTask.withContinuation(continuation -> hookFuture.whenComplete((result, cause) -> {\n        try {\n          CompletableFuture<GameProfileRequestEvent> future = (CompletableFuture<GameProfileRequestEvent>) FUTURE_FIELD.invokeExact(continuation);\n          if (future != null) {\n            future.complete(result);\n          }\n        } catch (Throwable e) {\n          throw new ReflectionException(e);\n        }\n      }));\n    }\n  }\n\n  @Subscribe(order = PostOrder.LAST)\n  public EventTask onKickedFromServer(KickedFromServerEvent event) {\n    CompletableFuture<KickedFromServerEvent> hookFuture = new CompletableFuture<>();\n    try {\n      Function<KickedFromServerEvent, Boolean> callback = this.plugin.getKickCallback(event.getPlayer());\n      if (callback == null || !callback.apply(event)) {\n        hookFuture.complete(event);\n      }\n    } catch (Throwable throwable) {\n      LimboAPI.getLogger().error(\"Failed to handle KickCallback, ignoring its result\", throwable);\n      hookFuture.complete(event);\n    }\n\n    // if kick callback is null and no exception occurred, hookFuture won't be ever finished, and\n    // the event chain would be broken, that is what we need.\n    return EventTask.resumeWhenComplete(hookFuture);\n  }\n\n  public void proceedProfile(GameProfile profile) {\n    this.proceededProfiles.add(profile);\n  }\n\n  @SuppressWarnings(\"rawtypes\")\n  public void reloadHandlers() throws IllegalAccessException {\n    ListMultimap<Class<?>, ?> handlersMap = (ListMultimap<Class<?>, ?>) HANDLERS_BY_TYPE_FIELD.get(this.eventManager);\n    List disabledHandlers = handlersMap.get(GameProfileRequestEvent.class);\n    List preEvents = new ArrayList<>();\n    List newHandlers = new ArrayList<>(disabledHandlers);\n\n    if (this.handlerRegistrations != null) {\n      for (int i = 0; i < Array.getLength(this.handlerRegistrations); ++i) {\n        preEvents.add(Array.get(this.handlerRegistrations, i));\n      }\n    }\n\n    try {\n      for (Object handler : disabledHandlers) {\n        PluginContainer pluginContainer = (PluginContainer) PLUGIN_FIELD.invoke(handler);\n        String id = pluginContainer.getDescription().getId();\n        if (Settings.IMP.MAIN.PRE_LIMBO_PROFILE_REQUEST_PLUGINS.contains(id)) {\n          LimboAPI.getLogger().info(\"Hooking all GameProfileRequestEvent events from {} \", id);\n          preEvents.add(handler);\n          newHandlers.remove(handler);\n        }\n      }\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n\n    handlersMap.replaceValues(GameProfileRequestEvent.class, newHandlers);\n    this.handlerRegistrations = Array.newInstance(HANDLER_REGISTRATION_CLASS, preEvents.size());\n\n    for (int i = 0; i < preEvents.size(); ++i) {\n      Array.set(this.handlerRegistrations, i, preEvents.get(i));\n    }\n\n    this.hasHandlerRegistration = !preEvents.isEmpty();\n  }\n\n  static {\n    try {\n      HANDLERS_BY_TYPE_FIELD = VelocityEventManager.class.getDeclaredField(\"handlersByType\");\n      HANDLERS_BY_TYPE_FIELD.setAccessible(true);\n\n      HANDLER_REGISTRATION_CLASS = Class.forName(\"com.velocitypowered.proxy.event.VelocityEventManager$HandlerRegistration\");\n      PLUGIN_FIELD = MethodHandles.privateLookupIn(HANDLER_REGISTRATION_CLASS, MethodHandles.lookup())\n          .findGetter(HANDLER_REGISTRATION_CLASS, \"plugin\", PluginContainer.class);\n\n      Class<?> continuationTaskClass = Class.forName(\"com.velocitypowered.proxy.event.VelocityEventManager$ContinuationTask\");\n      FUTURE_FIELD = MethodHandles.privateLookupIn(continuationTaskClass, MethodHandles.lookup())\n          .findGetter(continuationTaskClass, \"future\", CompletableFuture.class);\n\n      // The desired 5-argument fire method is private, and its 5th argument is the array of the private class,\n      // so we can't pass it into the Class#getDeclaredMethod(Class...) method.\n      Method fireMethod = Arrays.stream(VelocityEventManager.class.getDeclaredMethods())\n          .filter(method -> method.getName().equals(\"fire\") && method.getParameterCount() == 5)\n          .findFirst()\n          .orElseThrow();\n      fireMethod.setAccessible(true);\n      FIRE_METHOD = MethodHandles.privateLookupIn(VelocityEventManager.class, MethodHandles.lookup())\n          .findVirtual(VelocityEventManager.class, \"fire\", MethodType.methodType(\n              void.class,\n              CompletableFuture.class,\n              Object.class,\n              int.class,\n              boolean.class,\n              Array.newInstance(HANDLER_REGISTRATION_CLASS, 0).getClass()\n          ));\n    } catch (NoSuchFieldException | ClassNotFoundException | IllegalAccessException | NoSuchMethodException e) {\n      throw new ReflectionException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/login/LoginListener.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n * This file contains some parts of Velocity, licensed under the AGPLv3 License (AGPLv3).\n *\n * Copyright (C) 2018 Velocity Contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.login;\n\nimport com.velocitypowered.api.event.Subscribe;\nimport com.velocitypowered.api.event.player.GameProfileRequestEvent;\nimport com.velocitypowered.api.event.player.PlayerChooseInitialServerEvent;\nimport com.velocitypowered.api.event.player.ServerConnectedEvent;\nimport com.velocitypowered.api.network.HandshakeIntent;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.proxy.InboundConnection;\nimport com.velocitypowered.api.proxy.crypto.IdentifiedKey;\nimport com.velocitypowered.api.proxy.player.TabList;\nimport com.velocitypowered.api.util.GameProfile;\nimport com.velocitypowered.api.util.UuidUtils;\nimport com.velocitypowered.natives.compression.VelocityCompressor;\nimport com.velocitypowered.natives.util.Natives;\nimport com.velocitypowered.proxy.VelocityServer;\nimport com.velocitypowered.proxy.config.PlayerInfoForwarding;\nimport com.velocitypowered.proxy.config.VelocityConfiguration;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.client.AuthSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.connection.client.InitialInboundConnection;\nimport com.velocitypowered.proxy.connection.client.LoginInboundConnection;\nimport com.velocitypowered.proxy.crypto.IdentifiedKeyImpl;\nimport com.velocitypowered.proxy.network.Connections;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.VelocityConnectionEvent;\nimport com.velocitypowered.proxy.protocol.netty.MinecraftCompressorAndLengthEncoder;\nimport com.velocitypowered.proxy.protocol.packet.ServerLoginSuccessPacket;\nimport com.velocitypowered.proxy.protocol.packet.SetCompressionPacket;\nimport io.netty.channel.ChannelHandler;\nimport io.netty.channel.ChannelOutboundHandlerAdapter;\nimport io.netty.channel.ChannelPipeline;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.MethodType;\nimport java.lang.reflect.Field;\nimport java.net.InetSocketAddress;\nimport java.util.Objects;\nimport java.util.UUID;\nimport java.util.function.BiConsumer;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.Settings;\nimport net.elytrium.limboapi.api.event.LoginLimboRegisterEvent;\nimport net.elytrium.limboapi.injection.dummy.ClosedChannel;\nimport net.elytrium.limboapi.injection.dummy.ClosedMinecraftConnection;\nimport net.elytrium.limboapi.injection.dummy.DummyEventPool;\nimport net.elytrium.limboapi.injection.login.confirmation.LoginConfirmHandler;\nimport net.elytrium.limboapi.injection.packet.ServerLoginSuccessHook;\nimport net.elytrium.limboapi.injection.tablist.RewritingKeyedVelocityTabList;\nimport net.elytrium.limboapi.injection.tablist.RewritingVelocityTabList;\nimport net.elytrium.limboapi.injection.tablist.RewritingVelocityTabListLegacy;\nimport net.elytrium.limboapi.utils.LambdaUtil;\nimport net.kyori.adventure.text.Component;\nimport net.kyori.adventure.text.format.NamedTextColor;\n\npublic class LoginListener {\n\n  private static final ClosedMinecraftConnection CLOSED_MINECRAFT_CONNECTION;\n\n  private static final MethodHandle DELEGATE_FIELD;\n  private static final BiConsumer<Object, MinecraftConnection> MC_CONNECTION_SETTER;\n  private static final MethodHandle CONNECTED_PLAYER_CONSTRUCTOR;\n  private static final MethodHandle SPAWNED_FIELD;\n  private static final BiConsumer<ConnectedPlayer, TabList> TAB_LIST_SETTER;\n\n  private final LimboAPI plugin;\n  private final VelocityServer server;\n\n  public LoginListener(LimboAPI plugin, VelocityServer server) {\n    this.plugin = plugin;\n    this.server = server;\n  }\n\n  @Subscribe\n  public void hookInitialServer(PlayerChooseInitialServerEvent event) {\n    if (this.plugin.hasNextServer(event.getPlayer())) {\n      event.setInitialServer(this.plugin.getNextServer(event.getPlayer()));\n    }\n\n    this.plugin.setLimboJoined(event.getPlayer());\n  }\n\n  @SuppressWarnings(\"ConstantConditions\")\n  public void hookLoginSession(GameProfileRequestEvent event) throws Throwable {\n    LoginInboundConnection inboundConnection = (LoginInboundConnection) event.getConnection();\n    // In some cases, e.g. if the player logged out or was kicked right before the GameProfileRequestEvent hook,\n    // the connection will be broken (possibly by GC) and we can't get it from the delegate field.\n    if (LoginInboundConnection.class.isAssignableFrom(inboundConnection.getClass())) {\n      // Changing mcConnection to the closed one. For what? To break the \"initializePlayer\"\n      // method (which checks mcConnection.isActive()) and to override it. :)\n      InitialInboundConnection inbound = (InitialInboundConnection) DELEGATE_FIELD.invokeExact(inboundConnection);\n      MinecraftConnection connection = inbound.getConnection();\n\n      // Ensure that this method is always invoked inside EventLoop.\n      if (!connection.eventLoop().inEventLoop()) {\n        connection.eventLoop().execute(() -> {\n          try {\n            this.hookLoginSession(event);\n          } catch (Throwable e) {\n            throw new IllegalStateException(\"failed to handle login request\", e);\n          }\n        });\n        return;\n      }\n\n      Object handler = connection.getActiveSessionHandler();\n      MC_CONNECTION_SETTER.accept(handler, CLOSED_MINECRAFT_CONNECTION);\n\n      LoginConfirmHandler loginHandler = null;\n      if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n        connection.setActiveSessionHandler(StateRegistry.LOGIN,\n            loginHandler = new LoginConfirmHandler(this.plugin, connection));\n      }\n\n      // From Velocity.\n      if (!connection.isClosed()) {\n        try {\n          IdentifiedKey playerKey = inboundConnection.getIdentifiedKey();\n          if (playerKey != null) {\n            if (playerKey.getSignatureHolder() == null) {\n              if (playerKey instanceof IdentifiedKeyImpl unlinkedKey) {\n                // Failsafe\n                if (!unlinkedKey.internalAddHolder(event.getGameProfile().getId())) {\n                  playerKey = null;\n                }\n              }\n            } else if (!Objects.equals(playerKey.getSignatureHolder(), event.getGameProfile().getId())) {\n              playerKey = null;\n            }\n          }\n\n          // Initiate a regular connection and move over to it.\n          ConnectedPlayer player = (ConnectedPlayer) CONNECTED_PLAYER_CONSTRUCTOR.invokeExact(\n              this.server,\n              event.getGameProfile(),\n              connection,\n              inboundConnection.getVirtualHost().orElse(null),\n              ((InboundConnection) inboundConnection).getRawVirtualHost().orElse(null),\n              event.isOnlineMode(),\n              ((InboundConnection) inboundConnection).getHandshakeIntent(),\n              playerKey\n          );\n\n          if (connection.getProtocolVersion().noLessThan(ProtocolVersion.MINECRAFT_1_19_3)) {\n            TAB_LIST_SETTER.accept(player, new RewritingVelocityTabList(player));\n          } else if (connection.getProtocolVersion().noLessThan(ProtocolVersion.MINECRAFT_1_8)) {\n            TAB_LIST_SETTER.accept(player, new RewritingKeyedVelocityTabList(player, this.server));\n          } else {\n            TAB_LIST_SETTER.accept(player, new RewritingVelocityTabListLegacy(player, this.server));\n          }\n\n          if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n            loginHandler.setPlayer(player);\n          }\n          if (this.server.canRegisterConnection(player)) {\n            if (!connection.isClosed()) {\n              // Complete the Login process.\n              int threshold = this.server.getConfiguration().getCompressionThreshold();\n              ChannelPipeline pipeline = connection.getChannel().pipeline();\n              boolean compressionEnabled = threshold >= 0 && connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_8) >= 0;\n              if (compressionEnabled) {\n                connection.write(new SetCompressionPacket(threshold));\n                this.plugin.fixDecompressor(pipeline, threshold, true);\n                if (!Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n                  pipeline.addFirst(Connections.COMPRESSION_ENCODER, new ChannelOutboundHandlerAdapter());\n                } else {\n                  int level = this.server.getConfiguration().getCompressionLevel();\n                  VelocityCompressor compressor = Natives.compress.get().create(level);\n                  pipeline.addBefore(Connections.MINECRAFT_ENCODER, Connections.COMPRESSION_ENCODER,\n                      new MinecraftCompressorAndLengthEncoder(threshold, compressor));\n                  pipeline.remove(Connections.FRAME_ENCODER);\n                }\n              }\n\n              if (!Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n                pipeline.remove(Connections.FRAME_ENCODER);\n              }\n\n              this.plugin.inject3rdParty(player, connection, pipeline);\n              if (compressionEnabled) {\n                pipeline.fireUserEventTriggered(VelocityConnectionEvent.COMPRESSION_ENABLED);\n              } else {\n                pipeline.fireUserEventTriggered(VelocityConnectionEvent.COMPRESSION_DISABLED);\n              }\n\n              VelocityConfiguration configuration = this.server.getConfiguration();\n              UUID playerUniqueID = player.getUniqueId();\n              if (configuration.getPlayerInfoForwardingMode() == PlayerInfoForwarding.NONE) {\n                playerUniqueID = UuidUtils.generateOfflinePlayerUuid(player.getUsername());\n              }\n\n              ServerLoginSuccessPacket success = new ServerLoginSuccessPacket();\n              success.setUsername(player.getUsername());\n              success.setProperties(player.getGameProfileProperties());\n              success.setUuid(playerUniqueID);\n\n              if (Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n                connection.write(success);\n              } else {\n                ServerLoginSuccessHook successHook = new ServerLoginSuccessHook();\n                successHook.setUsername(player.getUsername());\n                successHook.setProperties(player.getGameProfileProperties());\n                successHook.setUuid(playerUniqueID);\n                connection.write(successHook);\n\n                ChannelHandler compressionHandler = pipeline.get(Connections.COMPRESSION_ENCODER);\n                if (compressionHandler != null) {\n                  connection.write(this.plugin.encodeSingleLogin(success, connection.getProtocolVersion()));\n                } else {\n                  ChannelHandler frameHandler = pipeline.get(Connections.FRAME_ENCODER);\n                  if (frameHandler != null) {\n                    pipeline.remove(frameHandler);\n                  }\n\n                  connection.write(this.plugin.encodeSingleLoginUncompressed(success, connection.getProtocolVersion()));\n                }\n              }\n\n              this.plugin.setInitialID(player, playerUniqueID);\n\n              if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n                loginHandler.thenRun(() -> this.fireRegisterEvent(player, connection, inbound, handler));\n              } else {\n                connection.setState(StateRegistry.PLAY);\n                this.fireRegisterEvent(player, connection, inbound, handler);\n              }\n            }\n          } else {\n            player.disconnect0(Component.translatable(\"velocity.error.already-connected-proxy\", NamedTextColor.RED), true);\n          }\n        } catch (Throwable e) {\n          inbound.getConnection().close();\n          throw e;\n        }\n      }\n    }\n  }\n\n  private void fireRegisterEvent(ConnectedPlayer player, MinecraftConnection connection,\n      InitialInboundConnection inbound, Object handler) {\n    this.server.getEventManager().fire(new LoginLimboRegisterEvent(player)).thenAcceptAsync(limboRegisterEvent -> {\n      LoginTasksQueue queue = new LoginTasksQueue(this.plugin, handler, this.server, player, inbound, limboRegisterEvent.getOnJoinCallbacks());\n      this.plugin.addLoginQueue(player, queue);\n      this.plugin.setKickCallback(player, limboRegisterEvent.getOnKickCallback());\n      queue.next();\n    }, connection.eventLoop()).exceptionally(t -> {\n      LimboAPI.getLogger().error(\"Exception while registering LimboAPI login handlers for {}.\", player, t);\n      return null;\n    });\n  }\n\n  @Subscribe\n  public void hookPlaySession(ServerConnectedEvent event) {\n    ConnectedPlayer player = (ConnectedPlayer) event.getPlayer();\n    MinecraftConnection connection = player.getConnection();\n\n    // 1.20.2+ can ignore this, as it should be despawned by default\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n      return;\n    }\n\n    connection.eventLoop().execute(() -> {\n      if (!(connection.getActiveSessionHandler() instanceof ClientPlaySessionHandler)) {\n        try {\n          ClientPlaySessionHandler playHandler = new ClientPlaySessionHandler(this.server, player);\n          SPAWNED_FIELD.invokeExact(playHandler, this.plugin.isLimboJoined(player));\n          connection.setActiveSessionHandler(connection.getState(), playHandler);\n        } catch (Throwable e) {\n          throw new ReflectionException(e);\n        }\n      }\n    });\n  }\n\n  static {\n    CLOSED_MINECRAFT_CONNECTION = new ClosedMinecraftConnection(new ClosedChannel(new DummyEventPool()), null);\n\n    try {\n      CONNECTED_PLAYER_CONSTRUCTOR = MethodHandles.privateLookupIn(ConnectedPlayer.class, MethodHandles.lookup())\n          .findConstructor(ConnectedPlayer.class,\n              MethodType.methodType(\n                  void.class,\n                  VelocityServer.class,\n                  GameProfile.class,\n                  MinecraftConnection.class,\n                  InetSocketAddress.class,\n                  String.class,\n                  boolean.class,\n                  HandshakeIntent.class,\n                  IdentifiedKey.class\n              )\n          );\n\n      DELEGATE_FIELD = MethodHandles.privateLookupIn(LoginInboundConnection.class, MethodHandles.lookup())\n          .findGetter(LoginInboundConnection.class, \"delegate\", InitialInboundConnection.class);\n\n      Field mcConnectionField = AuthSessionHandler.class.getDeclaredField(\"mcConnection\");\n      mcConnectionField.setAccessible(true);\n      MC_CONNECTION_SETTER = LambdaUtil.setterOf(mcConnectionField);\n\n      SPAWNED_FIELD = MethodHandles.privateLookupIn(ClientPlaySessionHandler.class, MethodHandles.lookup())\n          .findSetter(ClientPlaySessionHandler.class, \"spawned\", boolean.class);\n\n      Field tabListField = ConnectedPlayer.class.getDeclaredField(\"tabList\");\n      tabListField.setAccessible(true);\n      TAB_LIST_SETTER = LambdaUtil.setterOf(tabListField);\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/login/LoginTasksQueue.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n * This file contains some parts of Velocity, licensed under the AGPLv3 License (AGPLv3).\n *\n * Copyright (C) 2018 Velocity Contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.login;\n\nimport com.velocitypowered.api.event.EventManager;\nimport com.velocitypowered.api.event.connection.DisconnectEvent;\nimport com.velocitypowered.api.event.connection.LoginEvent;\nimport com.velocitypowered.api.event.connection.PostLoginEvent;\nimport com.velocitypowered.api.event.permission.PermissionsSetupEvent;\nimport com.velocitypowered.api.event.player.GameProfileRequestEvent;\nimport com.velocitypowered.api.event.player.PlayerClientBrandEvent;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.permission.PermissionFunction;\nimport com.velocitypowered.api.permission.PermissionProvider;\nimport com.velocitypowered.api.proxy.InboundConnection;\nimport com.velocitypowered.api.util.GameProfile;\nimport com.velocitypowered.proxy.VelocityServer;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.client.AuthSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ClientConfigSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.connection.client.InitialConnectSessionHandler;\nimport com.velocitypowered.proxy.network.Connections;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.LegacyPlayerListItemPacket;\nimport com.velocitypowered.proxy.protocol.packet.UpsertPlayerInfoPacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.ComponentHolder;\nimport edu.umd.cs.findbugs.annotations.SuppressFBWarnings;\nimport io.netty.channel.ChannelPipeline;\nimport io.netty.channel.EventLoop;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.MethodType;\nimport java.lang.reflect.Field;\nimport java.util.EnumSet;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.Optional;\nimport java.util.Queue;\nimport java.util.UUID;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.function.BiConsumer;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.injection.login.confirmation.LoginConfirmHandler;\nimport net.elytrium.limboapi.server.LimboSessionHandlerImpl;\nimport net.elytrium.limboapi.utils.LambdaUtil;\nimport net.kyori.adventure.text.Component;\nimport org.slf4j.Logger;\n\npublic class LoginTasksQueue {\n\n  private static final MethodHandle PROFILE_FIELD;\n  private static final PermissionProvider DEFAULT_PERMISSIONS;\n  private static final MethodHandle SET_PERMISSION_FUNCTION_METHOD;\n  private static final MethodHandle INITIAL_CONNECT_SESSION_HANDLER_CONSTRUCTOR;\n  private static final BiConsumer<Object, MinecraftConnection> MC_CONNECTION_SETTER;\n  private static final MethodHandle CONNECT_TO_INITIAL_SERVER_METHOD;\n  private static final MethodHandle SET_CLIENT_BRAND;\n  public static final BiConsumer<ClientConfigSessionHandler, String> BRAND_CHANNEL_SETTER;\n\n  private final LimboAPI plugin;\n  private final Object handler;\n  private final VelocityServer server;\n  private final ConnectedPlayer player;\n  private final InboundConnection inbound;\n  private final Queue<Runnable> queue;\n\n  public LoginTasksQueue(LimboAPI plugin, Object handler, VelocityServer server, ConnectedPlayer player,\n                         InboundConnection inbound, Queue<Runnable> queue) {\n    this.plugin = plugin;\n    this.handler = handler;\n    this.server = server;\n    this.player = player;\n    this.inbound = inbound;\n    this.queue = queue;\n  }\n\n  public void next() {\n    MinecraftConnection connection = this.player.getConnection();\n    if (connection.getChannel().isActive()) {\n      EventLoop eventLoop = connection.eventLoop();\n      if (this.queue.isEmpty()) {\n        eventLoop.execute(this::finish);\n      } else {\n        eventLoop.execute(Objects.requireNonNull(this.queue.poll()));\n      }\n    }\n  }\n\n  private void finish() {\n    this.plugin.removeLoginQueue(this.player);\n\n    EventManager eventManager = this.server.getEventManager();\n    MinecraftConnection connection = this.player.getConnection();\n    Logger logger = LimboAPI.getLogger();\n\n    this.plugin.getEventManagerHook().proceedProfile(this.player.getGameProfile());\n    eventManager.fire(new GameProfileRequestEvent(this.inbound, this.player.getGameProfile(), this.player.isOnlineMode())).thenAcceptAsync(\n        gameProfile -> {\n          try {\n            UUID uuid = this.plugin.getInitialID(this.player);\n            if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_19_1) <= 0) {\n              connection.delayedWrite(new LegacyPlayerListItemPacket(\n                  LegacyPlayerListItemPacket.REMOVE_PLAYER,\n                  List.of(new LegacyPlayerListItemPacket.Item(uuid))\n              ));\n\n              connection.delayedWrite(new LegacyPlayerListItemPacket(\n                  LegacyPlayerListItemPacket.ADD_PLAYER,\n                  List.of(\n                      new LegacyPlayerListItemPacket.Item(uuid)\n                          .setName(gameProfile.getUsername())\n                          .setProperties(gameProfile.getGameProfile().getProperties())\n                  )\n              ));\n            } else if (connection.getState() != StateRegistry.CONFIG) {\n              UpsertPlayerInfoPacket.Entry playerInfoEntry = new UpsertPlayerInfoPacket.Entry(uuid);\n              playerInfoEntry.setDisplayName(new ComponentHolder(this.player.getProtocolVersion(), Component.text(gameProfile.getUsername())));\n              playerInfoEntry.setProfile(gameProfile.getGameProfile());\n\n              connection.delayedWrite(new UpsertPlayerInfoPacket(\n                  EnumSet.of(\n                      UpsertPlayerInfoPacket.Action.UPDATE_DISPLAY_NAME,\n                      UpsertPlayerInfoPacket.Action.ADD_PLAYER),\n                  List.of(playerInfoEntry)));\n            }\n\n            PROFILE_FIELD.invokeExact(this.player, gameProfile.getGameProfile());\n\n            // From Velocity.\n            eventManager\n                .fire(new PermissionsSetupEvent(this.player, DEFAULT_PERMISSIONS))\n                .thenAcceptAsync(event -> {\n                  if (!connection.isClosed()) {\n                    // Wait for permissions to load, then set the players' permission function.\n                    PermissionFunction function = event.createFunction(this.player);\n                    if (function == null) {\n                      logger.error(\n                          \"A plugin permission provider {} provided an invalid permission function\"\n                              + \" for player {}. This is a bug in the plugin, not in Velocity. Falling\"\n                              + \" back to the default permission function.\",\n                          event.getProvider().getClass().getName(),\n                          this.player.getUsername()\n                      );\n                    } else {\n                      try {\n                        SET_PERMISSION_FUNCTION_METHOD.invokeExact(this.player, function);\n                      } catch (Throwable ex) {\n                        logger.error(\"Exception while completing injection to {}\", this.player, ex);\n                      }\n                    }\n                    try {\n                      this.initialize(connection);\n                    } catch (Throwable e) {\n                      throw new ReflectionException(e);\n                    }\n                  }\n                }, connection.eventLoop());\n          } catch (Throwable e) {\n            logger.error(\"Exception while completing injection to {}\", this.player, e);\n          }\n        }, connection.eventLoop());\n  }\n\n  // From Velocity.\n  private void initialize(MinecraftConnection connection) throws Throwable {\n    connection.setAssociation(this.player);\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) < 0\n        || connection.getState() != StateRegistry.CONFIG) {\n      this.plugin.setState(connection, StateRegistry.PLAY);\n    }\n\n    ChannelPipeline pipeline = connection.getChannel().pipeline();\n    this.plugin.deject3rdParty(pipeline);\n\n    if (pipeline.get(Connections.FRAME_ENCODER) == null) {\n      this.plugin.fixCompressor(pipeline, connection.getProtocolVersion());\n    }\n\n    Logger logger = LimboAPI.getLogger();\n    this.server.getEventManager().fire(new LoginEvent(this.player)).thenAcceptAsync(event -> {\n      if (connection.isClosed()) {\n        // The player was disconnected.\n        this.server.getEventManager().fireAndForget(new DisconnectEvent(this.player, DisconnectEvent.LoginStatus.CANCELLED_BY_USER_BEFORE_COMPLETE));\n      } else {\n        Optional<Component> reason = event.getResult().getReasonComponent();\n        if (reason.isPresent()) {\n          this.player.disconnect0(reason.get(), false);\n        } else {\n          if (this.server.registerConnection(this.player)) {\n            if (connection.getActiveSessionHandler() instanceof LoginConfirmHandler confirm) {\n              confirm.waitForConfirmation(() -> this.connectToServer(logger, this.player, connection));\n            } else {\n              this.connectToServer(logger, this.player, connection);\n            }\n          } else {\n            this.player.disconnect0(Component.translatable(\"velocity.error.already-connected-proxy\"), false);\n          }\n        }\n      }\n    }, connection.eventLoop()).exceptionally(t -> {\n      logger.error(\"Exception while completing login initialisation phase for {}\", this.player, t);\n      return null;\n    });\n  }\n\n  @SuppressFBWarnings(\"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE\")\n  private void connectToServer(Logger logger, ConnectedPlayer player, MinecraftConnection connection) {\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) < 0) {\n      try {\n        connection.setActiveSessionHandler(connection.getState(),\n            (InitialConnectSessionHandler) INITIAL_CONNECT_SESSION_HANDLER_CONSTRUCTOR.invokeExact(this.player, this.server));\n      } catch (Throwable e) {\n        throw new ReflectionException(e);\n      }\n    } else if (connection.getState() == StateRegistry.PLAY) {\n      // Synchronize with the client to ensure that it will not corrupt CONFIG state with PLAY packets\n      ((LimboSessionHandlerImpl) connection.getActiveSessionHandler())\n          .disconnectToConfig(() -> this.connectToServer(logger, player, connection));\n\n      return; // Re-running this method due to synchronization with the client\n    } else {\n      ClientConfigSessionHandler configHandler = new ClientConfigSessionHandler(this.server, this.player);\n\n      // 1.20.2+ client doesn't send ClientSettings and brand while switching state,\n      // so we need to use packets that was sent during LOGIN completion.\n      if (connection.getActiveSessionHandler() instanceof LimboSessionHandlerImpl sessionHandler) {\n        if (sessionHandler.getSettings() != null) {\n          this.player.setClientSettings(sessionHandler.getSettings());\n        }\n\n        // TODO: also queue non-vanilla plugin messages?\n        if (sessionHandler.getBrand() != null) {\n          try {\n            this.server.getEventManager().fireAndForget(new PlayerClientBrandEvent(this.player, sessionHandler.getBrand()));\n            SET_CLIENT_BRAND.invokeExact(this.player, sessionHandler.getBrand());\n            BRAND_CHANNEL_SETTER.accept(configHandler, \"minecraft:brand\");\n          } catch (Throwable e) {\n            throw new ReflectionException(e);\n          }\n        }\n      }\n\n      this.plugin.setActiveSessionHandler(connection, StateRegistry.CONFIG, configHandler);\n    }\n\n    this.server.getEventManager().fire(new PostLoginEvent(this.player)).thenAccept(postLoginEvent -> {\n      try {\n        MC_CONNECTION_SETTER.accept(this.handler, connection);\n        CONNECT_TO_INITIAL_SERVER_METHOD.invoke((AuthSessionHandler) this.handler, this.player);\n      } catch (Throwable e) {\n        throw new ReflectionException(e);\n      }\n    });\n  }\n\n  static {\n    try {\n      PROFILE_FIELD = MethodHandles.privateLookupIn(ConnectedPlayer.class, MethodHandles.lookup())\n          .findSetter(ConnectedPlayer.class, \"profile\", GameProfile.class);\n\n      Field defaultPermissionsField = ConnectedPlayer.class.getDeclaredField(\"DEFAULT_PERMISSIONS\");\n      defaultPermissionsField.setAccessible(true);\n      DEFAULT_PERMISSIONS = (PermissionProvider) defaultPermissionsField.get(null);\n\n      SET_PERMISSION_FUNCTION_METHOD = MethodHandles.privateLookupIn(ConnectedPlayer.class, MethodHandles.lookup())\n          .findVirtual(ConnectedPlayer.class, \"setPermissionFunction\", MethodType.methodType(void.class, PermissionFunction.class));\n\n      INITIAL_CONNECT_SESSION_HANDLER_CONSTRUCTOR = MethodHandles\n          .privateLookupIn(InitialConnectSessionHandler.class, MethodHandles.lookup())\n          .findConstructor(InitialConnectSessionHandler.class, MethodType.methodType(void.class, ConnectedPlayer.class, VelocityServer.class));\n\n      CONNECT_TO_INITIAL_SERVER_METHOD = MethodHandles.privateLookupIn(AuthSessionHandler.class, MethodHandles.lookup())\n          .findVirtual(AuthSessionHandler.class, \"connectToInitialServer\", MethodType.methodType(CompletableFuture.class, ConnectedPlayer.class));\n\n      Field mcConnectionField = AuthSessionHandler.class.getDeclaredField(\"mcConnection\");\n      mcConnectionField.setAccessible(true);\n      MC_CONNECTION_SETTER = LambdaUtil.setterOf(mcConnectionField);\n\n      SET_CLIENT_BRAND = MethodHandles.privateLookupIn(ConnectedPlayer.class, MethodHandles.lookup())\n          .findVirtual(ConnectedPlayer.class, \"setClientBrand\", MethodType.methodType(void.class, String.class));\n\n      Field brandChannelField = ClientConfigSessionHandler.class.getDeclaredField(\"brandChannel\");\n      brandChannelField.setAccessible(true);\n      BRAND_CHANNEL_SETTER = LambdaUtil.setterOf(brandChannelField);\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/login/confirmation/LoginConfirmHandler.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.login.confirmation;\n\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.LoginAcknowledgedPacket;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.channel.ChannelHandlerContext;\nimport io.netty.util.ReferenceCountUtil;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.MethodType;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.concurrent.CompletableFuture;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\n\npublic class LoginConfirmHandler implements MinecraftSessionHandler {\n\n  private static final boolean BACKPRESSURE_LOG =\n      Boolean.getBoolean(\"velocity.log-server-backpressure\");\n\n  private static final MethodHandle TEARDOWN_METHOD;\n\n  private final LimboAPI plugin;\n  private final CompletableFuture<Object> confirmation = new CompletableFuture<>();\n  private final List<MinecraftPacket> queuedPackets = new ArrayList<>();\n  private final MinecraftConnection connection;\n  private ConnectedPlayer player;\n\n  public LoginConfirmHandler(LimboAPI plugin, MinecraftConnection connection) {\n    this.plugin = plugin;\n    this.connection = connection;\n  }\n\n  public void setPlayer(ConnectedPlayer player) {\n    this.player = player;\n  }\n\n  public boolean isDone() {\n    return this.confirmation.isDone();\n  }\n\n  public CompletableFuture<Void> thenRun(Runnable runnable) {\n    return this.confirmation.thenRun(runnable);\n  }\n\n  public void waitForConfirmation(Runnable runnable) {\n    this.thenRun(() -> {\n      try {\n        runnable.run();\n      } catch (Throwable throwable) {\n        LimboAPI.getLogger().error(\"Failed to confirm transition for \" + this.player, throwable);\n      }\n\n      try {\n        ChannelHandlerContext ctx = this.connection.getChannel().pipeline().context(this.connection);\n        for (MinecraftPacket packet : this.queuedPackets) {\n          try {\n            this.connection.channelRead(ctx, packet);\n          } catch (Throwable throwable) {\n            LimboAPI.getLogger().error(\"{}: exception handling exception in {}\", ctx.channel().remoteAddress(),\n                this.connection.getActiveSessionHandler(), throwable);\n          }\n        }\n\n        this.queuedPackets.clear();\n      } catch (Throwable throwable) {\n        LimboAPI.getLogger().error(\"Failed to process packet queue for \" + this.player, throwable);\n      }\n    });\n  }\n\n  @Override\n  public boolean handle(LoginAcknowledgedPacket packet) {\n    this.plugin.setState(this.connection, StateRegistry.CONFIG);\n    this.confirmation.complete(this);\n    return true;\n  }\n\n  @Override\n  public void handleGeneric(MinecraftPacket packet) {\n    // As Velocity/LimboAPI can easly skip packets due to random delays, packets should be queued\n    if (this.connection.getState() == StateRegistry.CONFIG) {\n      this.queuedPackets.add(ReferenceCountUtil.retain(packet));\n    }\n  }\n\n  @Override\n  public void handleUnknown(ByteBuf buf) {\n    this.connection.close(true);\n  }\n\n  @Override\n  public void writabilityChanged() {\n    if (BACKPRESSURE_LOG) {\n      if (this.connection.getChannel().isWritable()) {\n        LimboAPI.getLogger().info(\"{} is writable, will auto-read\", this.player);\n      } else {\n        LimboAPI.getLogger().info(\"{} is not writable, not auto-reading\", this.player);\n      }\n    }\n  }\n\n  @Override\n  public void disconnected() {\n    try {\n      if (this.player != null) {\n        try {\n          TEARDOWN_METHOD.invokeExact(this.player);\n        } catch (Throwable e) {\n          throw new ReflectionException(e);\n        }\n      }\n    } finally {\n      for (MinecraftPacket packet : this.queuedPackets) {\n        ReferenceCountUtil.release(packet);\n      }\n    }\n  }\n\n  static {\n    try {\n      TEARDOWN_METHOD = MethodHandles.privateLookupIn(ConnectedPlayer.class, MethodHandles.lookup())\n          .findVirtual(ConnectedPlayer.class, \"teardown\", MethodType.methodType(void.class));\n    } catch (NoSuchMethodException | IllegalAccessException e) {\n      throw new ReflectionException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/LegacyPlayerListItemHook.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler;\nimport com.velocitypowered.proxy.connection.backend.VelocityServerConnection;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.LegacyPlayerListItemPacket;\nimport io.netty.util.collection.IntObjectMap;\nimport it.unimi.dsi.fastutil.objects.Object2IntMap;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.UUID;\nimport java.util.function.Supplier;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.protocol.LimboProtocol;\n\n@SuppressWarnings(\"unchecked\")\npublic class LegacyPlayerListItemHook extends LegacyPlayerListItemPacket {\n\n  private static final MethodHandle SERVER_CONN_FIELD;\n\n  private final LimboAPI plugin;\n\n  private LegacyPlayerListItemHook(LimboAPI plugin) {\n    this.plugin = plugin;\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof BackendPlaySessionHandler) {\n      List<Item> items = this.getItems();\n      for (int i = 0; i < items.size(); ++i) {\n        try {\n          Item item = items.get(i);\n          ConnectedPlayer player = ((VelocityServerConnection) SERVER_CONN_FIELD.invokeExact((BackendPlaySessionHandler) handler)).getPlayer();\n          UUID initialID = this.plugin.getInitialID(player);\n\n          if (player.getUniqueId().equals(item.getUuid())) {\n            items.set(i, new Item(initialID)\n                .setDisplayName(item.getDisplayName())\n                .setGameMode(item.getGameMode())\n                .setLatency(item.getLatency())\n                .setName(item.getName())\n                .setProperties(item.getProperties()));\n          }\n        } catch (Throwable e) {\n          throw new ReflectionException(e);\n        }\n      }\n    }\n\n    return super.handle(handler);\n  }\n\n  static {\n    try {\n      SERVER_CONN_FIELD = MethodHandles.privateLookupIn(BackendPlaySessionHandler.class, MethodHandles.lookup())\n          .findGetter(BackendPlaySessionHandler.class, \"serverConn\", VelocityServerConnection.class);\n    } catch (NoSuchFieldException | IllegalAccessException e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  public static void init(LimboAPI plugin, StateRegistry.PacketRegistry registry) throws ReflectiveOperationException {\n    // See LimboProtocol#overlayRegistry about var.\n    var playProtocolRegistryVersions = (Map<ProtocolVersion, StateRegistry.PacketRegistry.ProtocolRegistry>) LimboProtocol.VERSIONS_FIELD.get(registry);\n    playProtocolRegistryVersions.forEach((protocolVersion, protocolRegistry) -> {\n      try {\n        var packetIDToSupplier = (IntObjectMap<Supplier<? extends MinecraftPacket>>) LimboProtocol.PACKET_ID_TO_SUPPLIER_FIELD.get(protocolRegistry);\n        var packetClassToID = (Object2IntMap<Class<? extends MinecraftPacket>>) LimboProtocol.PACKET_CLASS_TO_ID_FIELD.get(protocolRegistry);\n\n        int id = packetClassToID.getInt(LegacyPlayerListItemPacket.class);\n        packetClassToID.put(LegacyPlayerListItemHook.class, id);\n        packetIDToSupplier.put(id, () -> new LegacyPlayerListItemHook(plugin));\n      } catch (ReflectiveOperationException e) {\n        throw new ReflectionException(e);\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/LimboCompressDecoder.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\npublic interface LimboCompressDecoder {\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/MinecraftDiscardCompressDecoder.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\nimport io.netty.buffer.ByteBuf;\nimport io.netty.channel.ChannelHandlerContext;\nimport io.netty.handler.codec.MessageToMessageDecoder;\nimport java.util.List;\n\npublic class MinecraftDiscardCompressDecoder extends MessageToMessageDecoder<ByteBuf> implements LimboCompressDecoder {\n\n  @Override\n  protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {\n    if (in.readByte() == 0) {\n      out.add(in.retain());\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/MinecraftLimitedCompressDecoder.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n * This file contains some parts of Velocity, licensed under the AGPLv3 License (AGPLv3).\n *\n * Copyright (C) 2018 Velocity Contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\nimport com.velocitypowered.natives.compression.VelocityCompressor;\nimport com.velocitypowered.natives.util.MoreByteBufUtils;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.netty.MinecraftCompressDecoder;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.channel.ChannelHandlerContext;\nimport java.util.List;\nimport net.elytrium.limboapi.Settings;\n\npublic class MinecraftLimitedCompressDecoder extends MinecraftCompressDecoder implements LimboCompressDecoder {\n\n  private final int threshold;\n  private final VelocityCompressor compressor;\n\n  private int uncompressedCap = Settings.IMP.MAIN.MAX_PACKET_LENGTH_TO_SUPPRESS_IT;\n\n  public MinecraftLimitedCompressDecoder(int threshold, VelocityCompressor compressor) {\n    super(threshold, compressor, ProtocolUtils.Direction.SERVERBOUND);\n    this.threshold = threshold;\n    this.compressor = compressor;\n  }\n\n  @Override\n  protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {\n    int claimedUncompressedSize = ProtocolUtils.readVarInt(in);\n    if (claimedUncompressedSize == 0) {\n      out.add(in.retain());\n    } else {\n      if (claimedUncompressedSize > Settings.IMP.MAIN.MAX_SINGLE_GENERIC_PACKET_LENGTH) {\n        ctx.close();\n      } else {\n        if (claimedUncompressedSize >= this.threshold && claimedUncompressedSize <= this.uncompressedCap) {\n          ByteBuf compatibleIn = MoreByteBufUtils.ensureCompatible(ctx.alloc(), this.compressor, in);\n          ByteBuf uncompressed = MoreByteBufUtils.preferredBuffer(ctx.alloc(), this.compressor, claimedUncompressedSize);\n          try {\n            this.compressor.inflate(compatibleIn, uncompressed, claimedUncompressedSize);\n            out.add(uncompressed);\n          } catch (Exception e) {\n            uncompressed.release();\n            throw e;\n          } finally {\n            compatibleIn.release();\n          }\n        }\n      }\n    }\n  }\n\n  public void setUncompressedCap(int uncompressedCap) {\n    this.uncompressedCap = uncompressedCap;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/PreparedPacketImpl.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.List;\nimport java.util.function.Function;\nimport net.elytrium.fastprepare.PreparedPacket;\nimport net.elytrium.fastprepare.PreparedPacketFactory;\n\npublic class PreparedPacketImpl extends PreparedPacket implements net.elytrium.limboapi.api.protocol.PreparedPacket {\n\n  public PreparedPacketImpl(ProtocolVersion minVersion, ProtocolVersion maxVersion, PreparedPacketFactory factory) {\n    super(minVersion, maxVersion, factory);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(T packet) {\n    return (PreparedPacketImpl) super.prepare(packet);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(T[] packets) {\n    return (PreparedPacketImpl) super.prepare(packets);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(List<T> packets) {\n    return (PreparedPacketImpl) super.prepare(packets);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(T packet, ProtocolVersion from) {\n    return (PreparedPacketImpl) super.prepare(packet, from);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(T packet, ProtocolVersion from, ProtocolVersion to) {\n    return (PreparedPacketImpl) super.prepare(packet, from, to);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(T[] packets, ProtocolVersion from) {\n    return (PreparedPacketImpl) super.prepare(packets, from);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(T[] packets, ProtocolVersion from, ProtocolVersion to) {\n    return (PreparedPacketImpl) super.prepare(packets, from, to);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(List<T> packets, ProtocolVersion from) {\n    return (PreparedPacketImpl) super.prepare(packets, from);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(List<T> packets, ProtocolVersion from, ProtocolVersion to) {\n    return (PreparedPacketImpl) super.prepare(packets, from, to);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(Function<ProtocolVersion, T> packet) {\n    return (PreparedPacketImpl) super.prepare(packet);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(Function<ProtocolVersion, T> packet, ProtocolVersion from) {\n    return (PreparedPacketImpl) super.prepare(packet, from);\n  }\n\n  @Override\n  public <T> PreparedPacketImpl prepare(Function<ProtocolVersion, T> packet, ProtocolVersion from, ProtocolVersion to) {\n    return (PreparedPacketImpl) super.prepare(packet, from, to);\n  }\n\n  @Override\n  public PreparedPacketImpl build() {\n    return (PreparedPacketImpl) super.build();\n  }\n\n  @Override\n  public void release() {\n    super.release();\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/RemovePlayerInfoHook.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler;\nimport com.velocitypowered.proxy.connection.backend.VelocityServerConnection;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.RemovePlayerInfoPacket;\nimport io.netty.util.collection.IntObjectMap;\nimport it.unimi.dsi.fastutil.objects.Object2IntMap;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.UUID;\nimport java.util.function.Supplier;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.protocol.LimboProtocol;\n\n@SuppressWarnings(\"unchecked\")\npublic class RemovePlayerInfoHook extends RemovePlayerInfoPacket {\n\n  private static final MethodHandle SERVER_CONN_FIELD;\n\n  private final LimboAPI plugin;\n\n  private RemovePlayerInfoHook(LimboAPI plugin) {\n    this.plugin = plugin;\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof BackendPlaySessionHandler) {\n      try {\n        ConnectedPlayer player = ((VelocityServerConnection) SERVER_CONN_FIELD.invokeExact((BackendPlaySessionHandler) handler)).getPlayer();\n        UUID initialID = this.plugin.getInitialID(player);\n        if (this.getProfilesToRemove() instanceof List<UUID> uuids) {\n          for (int i = 0; i < uuids.size(); i++) {\n            if (player.getUniqueId().equals(uuids.get(i))) {\n              uuids.set(i, initialID);\n            }\n          }\n        }\n      } catch (Throwable e) {\n        throw new ReflectionException(e);\n      }\n    }\n\n    return super.handle(handler);\n  }\n\n  static {\n    try {\n      SERVER_CONN_FIELD = MethodHandles.privateLookupIn(BackendPlaySessionHandler.class, MethodHandles.lookup())\n          .findGetter(BackendPlaySessionHandler.class, \"serverConn\", VelocityServerConnection.class);\n    } catch (NoSuchFieldException | IllegalAccessException e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  public static void init(LimboAPI plugin, StateRegistry.PacketRegistry registry) throws ReflectiveOperationException {\n    // See LimboProtocol#overlayRegistry about var.\n    var playProtocolRegistryVersions = (Map<ProtocolVersion, StateRegistry.PacketRegistry.ProtocolRegistry>) LimboProtocol.VERSIONS_FIELD.get(registry);\n    playProtocolRegistryVersions.forEach((protocolVersion, protocolRegistry) -> {\n      try {\n        var packetIDToSupplier = (IntObjectMap<Supplier<? extends MinecraftPacket>>) LimboProtocol.PACKET_ID_TO_SUPPLIER_FIELD.get(protocolRegistry);\n        var packetClassToID = (Object2IntMap<Class<? extends MinecraftPacket>>) LimboProtocol.PACKET_CLASS_TO_ID_FIELD.get(protocolRegistry);\n\n        int id = packetClassToID.getInt(RemovePlayerInfoPacket.class);\n        packetClassToID.put(RemovePlayerInfoHook.class, id);\n        packetIDToSupplier.put(id, () -> new RemovePlayerInfoHook(plugin));\n      } catch (ReflectiveOperationException e) {\n        throw new ReflectionException(e);\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/ServerLoginSuccessHook.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\nimport com.velocitypowered.proxy.protocol.packet.ServerLoginSuccessPacket;\nimport net.elytrium.fastprepare.dummy.DummyPacket;\n\npublic class ServerLoginSuccessHook extends ServerLoginSuccessPacket implements DummyPacket {\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/packet/UpsertPlayerInfoHook.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.packet;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.util.GameProfile;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler;\nimport com.velocitypowered.proxy.connection.backend.VelocityServerConnection;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.UpsertPlayerInfoPacket;\nimport io.netty.util.collection.IntObjectMap;\nimport it.unimi.dsi.fastutil.objects.Object2IntMap;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.UUID;\nimport java.util.function.Supplier;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.protocol.LimboProtocol;\n\n@SuppressWarnings(\"unchecked\")\npublic class UpsertPlayerInfoHook extends UpsertPlayerInfoPacket {\n\n  private static final MethodHandle SERVER_CONN_FIELD;\n\n  private final LimboAPI plugin;\n\n  private UpsertPlayerInfoHook(LimboAPI plugin) {\n    this.plugin = plugin;\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof BackendPlaySessionHandler) {\n      try {\n        ConnectedPlayer player = ((VelocityServerConnection) SERVER_CONN_FIELD.invokeExact((BackendPlaySessionHandler) handler)).getPlayer();\n        UUID initialID = this.plugin.getInitialID(player);\n        List<Entry> items = this.getEntries();\n\n        for (int i = 0; i < items.size(); ++i) {\n          Entry item = items.get(i);\n\n          if (player.getUniqueId().equals(item.getProfileId())) {\n            Entry fixedEntry = new Entry(initialID);\n            fixedEntry.setDisplayName(item.getDisplayName());\n            fixedEntry.setGameMode(item.getGameMode());\n            fixedEntry.setLatency(item.getLatency());\n            fixedEntry.setDisplayName(item.getDisplayName());\n            if (item.getProfile() != null && item.getProfile().getId().equals(player.getUniqueId())) {\n              fixedEntry.setProfile(new GameProfile(initialID, item.getProfile().getName(), item.getProfile().getProperties()));\n            } else {\n              fixedEntry.setProfile(item.getProfile());\n            }\n            fixedEntry.setListed(item.isListed());\n            fixedEntry.setListOrder(item.getListOrder());\n            fixedEntry.setChatSession(item.getChatSession());\n\n            items.set(i, fixedEntry);\n          }\n        }\n      } catch (Throwable e) {\n        throw new ReflectionException(e);\n      }\n    }\n\n    return super.handle(handler);\n  }\n\n  static {\n    try {\n      SERVER_CONN_FIELD = MethodHandles.privateLookupIn(BackendPlaySessionHandler.class, MethodHandles.lookup())\n          .findGetter(BackendPlaySessionHandler.class, \"serverConn\", VelocityServerConnection.class);\n    } catch (NoSuchFieldException | IllegalAccessException e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  public static void init(LimboAPI plugin, StateRegistry.PacketRegistry registry) throws ReflectiveOperationException {\n    // See LimboProtocol#overlayRegistry about var.\n    var playProtocolRegistryVersions = (Map<ProtocolVersion, StateRegistry.PacketRegistry.ProtocolRegistry>) LimboProtocol.VERSIONS_FIELD.get(registry);\n    playProtocolRegistryVersions.forEach((protocolVersion, protocolRegistry) -> {\n      try {\n        var packetIDToSupplier = (IntObjectMap<Supplier<? extends MinecraftPacket>>) LimboProtocol.PACKET_ID_TO_SUPPLIER_FIELD.get(protocolRegistry);\n        var packetClassToID = (Object2IntMap<Class<? extends MinecraftPacket>>) LimboProtocol.PACKET_CLASS_TO_ID_FIELD.get(protocolRegistry);\n\n        int id = packetClassToID.getInt(UpsertPlayerInfoPacket.class);\n        packetClassToID.put(UpsertPlayerInfoHook.class, id);\n        packetIDToSupplier.put(id, () -> new UpsertPlayerInfoHook(plugin));\n      } catch (ReflectiveOperationException e) {\n        throw new ReflectionException(e);\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingKeyedVelocityTabList.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.tablist;\n\nimport com.velocitypowered.api.proxy.ProxyServer;\nimport com.velocitypowered.api.proxy.player.TabListEntry;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.tablist.KeyedVelocityTabList;\nimport com.velocitypowered.proxy.tablist.KeyedVelocityTabListEntry;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.UUID;\n\npublic class RewritingKeyedVelocityTabList extends KeyedVelocityTabList implements RewritingTabList {\n\n  // To keep compatibility with other plugins that use internal fields\n  protected final ConnectedPlayer player;\n  protected final MinecraftConnection connection;\n  protected final ProxyServer proxyServer;\n  protected final Map<UUID, KeyedVelocityTabListEntry> entries;\n\n  public RewritingKeyedVelocityTabList(ConnectedPlayer player, ProxyServer proxyServer) {\n    super(player, proxyServer);\n    this.player = super.player;\n    this.connection = super.connection;\n    this.proxyServer = super.proxyServer;\n    this.entries = super.entries;\n  }\n\n  @Override\n  public void addEntry(TabListEntry entry) {\n    super.addEntry(this.rewriteEntry(entry));\n  }\n\n  @Override\n  public Optional<TabListEntry> getEntry(UUID uuid) {\n    return super.getEntry(this.rewriteUuid(uuid));\n  }\n\n  @Override\n  public boolean containsEntry(UUID uuid) {\n    return super.containsEntry(this.rewriteUuid(uuid));\n  }\n\n  @Override\n  public Optional<TabListEntry> removeEntry(UUID uuid) {\n    return super.removeEntry(this.rewriteUuid(uuid));\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingTabList.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.tablist;\n\nimport com.velocitypowered.api.proxy.Player;\nimport com.velocitypowered.api.proxy.player.TabListEntry;\nimport com.velocitypowered.api.util.GameProfile;\nimport java.util.UUID;\nimport net.elytrium.limboapi.LimboAPI;\n\npublic interface RewritingTabList {\n\n  Player getPlayer();\n\n  default TabListEntry rewriteEntry(TabListEntry entry) {\n    if (entry == null || entry.getProfile() == null || !this.getPlayer().getUniqueId().equals(entry.getProfile().getId())) {\n      return entry;\n    }\n\n    TabListEntry.Builder builder = TabListEntry.builder();\n    builder.tabList(entry.getTabList());\n    builder.profile(new GameProfile(this.rewriteUuid(entry.getProfile().getId()),\n        entry.getProfile().getName(), entry.getProfile().getProperties()));\n    builder.listed(entry.isListed());\n    builder.latency(entry.getLatency());\n    builder.gameMode(entry.getGameMode());\n    entry.getDisplayNameComponent().ifPresent(builder::displayName);\n    builder.chatSession(entry.getChatSession());\n    builder.listOrder(entry.getListOrder());\n    builder.showHat(entry.isShowHat());\n\n    return builder.build();\n  }\n\n  default UUID rewriteUuid(UUID uuid) {\n    if (this.getPlayer().getUniqueId().equals(uuid)) {\n      return LimboAPI.INITIAL_ID.getOrDefault(this.getPlayer(), uuid);\n    }\n\n    return uuid;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingVelocityTabList.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.tablist;\n\nimport com.velocitypowered.api.proxy.player.TabListEntry;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.tablist.VelocityTabList;\nimport com.velocitypowered.proxy.tablist.VelocityTabListEntry;\nimport java.lang.reflect.Field;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.UUID;\nimport java.util.function.Function;\nimport net.elytrium.limboapi.utils.LambdaUtil;\n\npublic class RewritingVelocityTabList extends VelocityTabList implements RewritingTabList {\n\n  private static final Function<VelocityTabList, Map<UUID, VelocityTabListEntry>> ENTRIES_GETTER;\n\n  static {\n    try {\n      Field field = VelocityTabList.class.getDeclaredField(\"entries\");\n      field.setAccessible(true);\n      ENTRIES_GETTER = LambdaUtil.getterOf(field);\n    } catch (Throwable throwable) {\n      throw new ExceptionInInitializerError(throwable);\n    }\n  }\n\n  // To keep compatibility with other plugins that use internal fields\n  private final ConnectedPlayer player;\n  private final MinecraftConnection connection;\n  private final Map<UUID, VelocityTabListEntry> entries;\n\n  public RewritingVelocityTabList(ConnectedPlayer player) {\n    super(player);\n    try {\n      this.player = player;\n      this.connection = player.getConnection();\n      this.entries = ENTRIES_GETTER.apply(this);\n    } catch (Throwable e) {\n      throw new IllegalStateException(e);\n    }\n  }\n\n  @Override\n  public void addEntry(TabListEntry entry) {\n    super.addEntry(this.rewriteEntry(entry));\n  }\n\n  @Override\n  public Optional<TabListEntry> getEntry(UUID uuid) {\n    return super.getEntry(this.rewriteUuid(uuid));\n  }\n\n  @Override\n  public boolean containsEntry(UUID uuid) {\n    return super.containsEntry(this.rewriteUuid(uuid));\n  }\n\n  @Override\n  public Optional<TabListEntry> removeEntry(UUID uuid) {\n    return super.removeEntry(this.rewriteUuid(uuid));\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/injection/tablist/RewritingVelocityTabListLegacy.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.injection.tablist;\n\nimport com.velocitypowered.api.proxy.ProxyServer;\nimport com.velocitypowered.api.proxy.player.TabListEntry;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.tablist.KeyedVelocityTabListEntry;\nimport com.velocitypowered.proxy.tablist.VelocityTabListLegacy;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.UUID;\n\npublic class RewritingVelocityTabListLegacy extends VelocityTabListLegacy implements RewritingTabList {\n\n  // To keep compatibility with other plugins that use internal fields\n  protected final ConnectedPlayer player;\n  protected final MinecraftConnection connection;\n  protected final ProxyServer proxyServer;\n  protected final Map<UUID, KeyedVelocityTabListEntry> entries;\n\n  public RewritingVelocityTabListLegacy(ConnectedPlayer player, ProxyServer proxyServer) {\n    super(player, proxyServer);\n    this.player = super.player;\n    this.connection = super.connection;\n    this.proxyServer = super.proxyServer;\n    this.entries = super.entries;\n  }\n\n  @Override\n  public void addEntry(TabListEntry entry) {\n    super.addEntry(this.rewriteEntry(entry));\n  }\n\n  @Override\n  public Optional<TabListEntry> getEntry(UUID uuid) {\n    return super.getEntry(this.rewriteUuid(uuid));\n  }\n\n  @Override\n  public boolean containsEntry(UUID uuid) {\n    return super.containsEntry(this.rewriteUuid(uuid));\n  }\n\n  @Override\n  public Optional<TabListEntry> removeEntry(UUID uuid) {\n    return super.removeEntry(this.rewriteUuid(uuid));\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/material/Biome.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.material;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.Arrays;\nimport java.util.EnumMap;\nimport java.util.stream.Collectors;\nimport net.elytrium.limboapi.api.chunk.BuiltInBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.material.Biome.Effects.MoodSound;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport net.kyori.adventure.nbt.CompoundBinaryTag.Builder;\nimport net.kyori.adventure.nbt.ListBinaryTag;\nimport org.checkerframework.checker.nullness.qual.NonNull;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic enum Biome implements VirtualBiome {\n\n  PLAINS(\n      BuiltInBiome.PLAINS,\n      \"minecraft:plains\",\n      1,\n      new Element(\n          true, 0.125F, 0.8F, 0.05F, 0.4F, \"plains\",\n          Effects.builder(7907327, 329011, 12638463, 415920)\n              .moodSound(MoodSound.of(6000, 2.0, 8, \"minecraft:ambient.cave\"))\n              .build()\n      )\n  ),\n  SWAMP(\n      BuiltInBiome.SWAMP,\n      \"minecraft:swamp\",\n      6,\n      new Element(\n          true, -0.2F, 0.8F, 0.1F, 0.9F, \"swamp\",\n          Effects.builder(7907327, 329011, 12638463, 415920)\n              .grassColorModifier(\"swamp\")\n              .foliageColor(6975545)\n              .moodSound(MoodSound.of(6000, 2.0, 8, \"minecraft:ambient.cave\"))\n              .build()\n      )\n  ),\n  SWAMP_HILLS(\n      BuiltInBiome.SWAMP_HILLS,\n      \"minecraft:swamp_hills\",\n      134,\n      new Element(\n          true, -0.1F, 0.8F, 0.3F, 0.9F, \"swamp\",\n          Effects.builder(7907327, 329011, 12638463, 415920)\n              .grassColorModifier(\"swamp\")\n              .foliageColor(6975545)\n              .moodSound(MoodSound.of(6000, 2.0, 8, \"minecraft:ambient.cave\"))\n              .build()\n      )\n  ),\n  NETHER_WASTES(\n      BuiltInBiome.NETHER_WASTES,\n      \"minecraft:nether_wastes\",\n      8,\n      new Element(false, 0.1f, 2.0f, 0.2f, 0.0f, \"nether\",\n          Effects.builder(7254527, 329011, 3344392, 4159204)\n              .moodSound(MoodSound.of(6000, 2.0, 8, \"minecraft:ambient.nether_wastes.mood\"))\n              .build()\n      )\n  ),\n  THE_END(\n      BuiltInBiome.THE_END,\n      \"minecraft:the_end\",\n      9,\n      new Element(false, 0.1f, 0.5f, 0.2f, 0.5f, \"the_end\",\n          Effects.builder(0, 10518688, 12638463, 4159204)\n              .moodSound(MoodSound.of(6000, 2.0, 8, \"minecraft:ambient.cave\"))\n              .build()\n      )\n  );\n\n  private static final EnumMap<BuiltInBiome, Biome> BUILT_IN_BIOME_MAP = new EnumMap<>(BuiltInBiome.class);\n\n  private final BuiltInBiome index;\n  private final String name;\n  private final int id;\n  private final Element element;\n\n  Biome(BuiltInBiome index, String name, int id, Element element) {\n    this.index = index;\n    this.name = name;\n    this.id = id;\n    this.element = element;\n  }\n\n  public CompoundBinaryTag encodeBiome(ProtocolVersion version) {\n    return CompoundBinaryTag.builder()\n        .putString(\"name\", this.name)\n        .putInt(\"id\", this.id)\n        .put(\"element\", this.element.encode(version))\n        .build();\n  }\n\n  @Override\n  public String getName() {\n    return this.name;\n  }\n\n  @Override\n  public int getID() {\n    return this.id;\n  }\n\n  public Element getElement() {\n    return this.element;\n  }\n\n  static {\n    for (Biome biome : Biome.values()) {\n      BUILT_IN_BIOME_MAP.put(biome.index, biome);\n    }\n  }\n\n  public static Biome of(BuiltInBiome index) {\n    return BUILT_IN_BIOME_MAP.get(index);\n  }\n\n  public static CompoundBinaryTag getRegistry(ProtocolVersion version) {\n    return CompoundBinaryTag.builder()\n        .putString(\"type\", \"minecraft:worldgen/biome\")\n        .put(\"value\", ListBinaryTag.from(Arrays.stream(Biome.values()).map(biome -> biome.encodeBiome(version)).collect(Collectors.toList())))\n        .build();\n  }\n\n  public static class Element {\n\n    public final boolean hasPrecipitation;\n    public final float depth;\n    public final float temperature;\n    public final float scale;\n    public final float downfall;\n    public final String category;\n    public final Effects effects;\n\n    public Element(boolean hasPrecipitation, float depth, float temperature, float scale, float downfall, String category, Effects effects) {\n      this.hasPrecipitation = hasPrecipitation;\n      this.depth = depth;\n      this.temperature = temperature;\n      this.scale = scale;\n      this.downfall = downfall;\n      this.category = category;\n      this.effects = effects;\n    }\n\n    public CompoundBinaryTag encode(ProtocolVersion version) {\n      CompoundBinaryTag.Builder tagBuilder = CompoundBinaryTag.builder()\n          .putFloat(\"depth\", this.depth)\n          .putFloat(\"temperature\", this.temperature)\n          .putFloat(\"scale\", this.scale)\n          .putFloat(\"downfall\", this.downfall)\n          .putString(\"category\", this.category)\n          .put(\"effects\", this.effects.encode());\n\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_19_4) < 0) {\n        tagBuilder.putString(\"precipitation\", this.hasPrecipitation ? \"rain\" : \"none\");\n      } else {\n        tagBuilder.putBoolean(\"has_precipitation\", this.hasPrecipitation);\n      }\n\n      return tagBuilder.build();\n    }\n\n    public boolean hasPrecipitation() {\n      return this.hasPrecipitation;\n    }\n\n    public float getDepth() {\n      return this.depth;\n    }\n\n    public float getTemperature() {\n      return this.temperature;\n    }\n\n    public float getScale() {\n      return this.scale;\n    }\n\n    public float getDownfall() {\n      return this.downfall;\n    }\n\n    public String getCategory() {\n      return this.category;\n    }\n\n    public Effects getEffects() {\n      return this.effects;\n    }\n\n    @Override\n    public String toString() {\n      return \"Biome.Element{\"\n          + \"hasPrecipitation=\" + this.hasPrecipitation\n          + \", depth=\" + this.depth\n          + \", temperature=\" + this.temperature\n          + \", scale=\" + this.scale\n          + \", downfall=\" + this.downfall\n          + \", category=\" + this.category\n          + \", effects=\" + this.effects\n          + \"}\";\n    }\n  }\n\n  public static class Effects {\n\n    private final int skyColor;\n    private final int waterFogColor;\n    private final int fogColor;\n    private final int waterColor;\n\n    @Nullable\n    private final Integer foliageColor;\n    @Nullable\n    private final String grassColorModifier;\n    @Nullable\n    private final Music music;\n    @Nullable\n    private final String ambientSound;\n    @Nullable\n    private final AdditionsSound additionsSound;\n    @Nullable\n    private final MoodSound moodSound;\n    @Nullable\n    private final Particle particle;\n\n    public Effects(int skyColor,\n        int waterFogColor, int fogColor, int waterColor,\n        @Nullable Integer foliageColor, @Nullable String grassColorModifier, @Nullable Music music,\n        @Nullable String ambientSound, @Nullable AdditionsSound additionsSound,\n        @Nullable MoodSound moodSound, @Nullable Particle particle) {\n      this.skyColor = skyColor;\n      this.waterFogColor = waterFogColor;\n      this.fogColor = fogColor;\n      this.waterColor = waterColor;\n      this.foliageColor = foliageColor;\n      this.grassColorModifier = grassColorModifier;\n      this.music = music;\n      this.ambientSound = ambientSound;\n      this.additionsSound = additionsSound;\n      this.moodSound = moodSound;\n      this.particle = particle;\n    }\n\n    public CompoundBinaryTag encode() {\n      Builder result = CompoundBinaryTag.builder();\n\n      result.putInt(\"sky_color\", this.skyColor);\n      result.putInt(\"water_fog_color\", this.waterColor);\n      result.putInt(\"fog_color\", this.fogColor);\n      result.putInt(\"water_color\", this.waterColor);\n\n      if (this.foliageColor != null) {\n        result.putInt(\"foliage_color\", this.foliageColor);\n      }\n\n      if (this.grassColorModifier != null) {\n        result.putString(\"grass_color_modifier\", this.grassColorModifier);\n      }\n\n      if (this.music != null) {\n        result.put(\"music\", this.music.encode());\n      }\n\n      if (this.ambientSound != null) {\n        result.putString(\"ambient_sound\", this.ambientSound);\n      }\n\n      if (this.additionsSound != null) {\n        result.put(\"additions_sound\", this.additionsSound.encode());\n      }\n\n      if (this.moodSound != null) {\n        result.put(\"mood_sound\", this.moodSound.encode());\n      }\n\n      if (this.particle != null) {\n        result.put(\"particle\", this.particle.encode());\n      }\n\n      return result.build();\n    }\n\n    public static EffectsBuilder builder(int skyColor, int waterFogColor, int fogColor, int waterColor) {\n      return new EffectsBuilder()\n          .skyColor(skyColor)\n          .waterFogColor(waterFogColor)\n          .fogColor(fogColor)\n          .waterColor(waterColor);\n    }\n\n    public int getSkyColor() {\n      return this.skyColor;\n    }\n\n    public int getWaterFogColor() {\n      return this.waterFogColor;\n    }\n\n    public int getFogColor() {\n      return this.fogColor;\n    }\n\n    public int getWaterColor() {\n      return this.waterColor;\n    }\n\n    @Nullable\n    public Integer getFoliageColor() {\n      return this.foliageColor;\n    }\n\n    @Nullable\n    public String getGrassColorModifier() {\n      return this.grassColorModifier;\n    }\n\n    @Nullable\n    public Music getMusic() {\n      return this.music;\n    }\n\n    @Nullable\n    public String getAmbientSound() {\n      return this.ambientSound;\n    }\n\n    @Nullable\n    public AdditionsSound getAdditionsSound() {\n      return this.additionsSound;\n    }\n\n    @Nullable\n    public MoodSound getMoodSound() {\n      return this.moodSound;\n    }\n\n    @Nullable\n    public Particle getParticle() {\n      return this.particle;\n    }\n\n    @Override\n    public String toString() {\n      return \"Biome.Effects{\"\n          + \"skyColor=\" + this.skyColor\n          + \", waterFogColor=\" + this.waterFogColor\n          + \", fogColor=\" + this.fogColor\n          + \", waterColor=\" + this.waterColor\n          + \", foliageColor=\" + this.foliageColor\n          + \", grassColorModifier=\" + this.grassColorModifier\n          + \", music=\" + this.music\n          + \", ambientSound=\" + this.ambientSound\n          + \", additionsSound=\" + this.additionsSound\n          + \", moodSound=\" + this.moodSound\n          + \", particle=\" + this.particle\n          + \"}\";\n    }\n\n    public static final class MoodSound {\n\n      private final int tickDelay;\n      private final double offset;\n      private final int blockSearchExtent;\n      @NonNull\n      private final String sound;\n\n      private MoodSound(int tickDelay, double offset, int blockSearchExtent, @NonNull String sound) {\n        this.tickDelay = tickDelay;\n        this.offset = offset;\n        this.blockSearchExtent = blockSearchExtent;\n        this.sound = sound;\n      }\n\n      public static MoodSound of(int tickDelay, double offset, int blockSearchExtent, @NonNull String sound) {\n        return new MoodSound(tickDelay, offset, blockSearchExtent, sound);\n      }\n\n      public CompoundBinaryTag encode() {\n        return CompoundBinaryTag.builder()\n            .putInt(\"tick_delay\", this.tickDelay)\n            .putDouble(\"offset\", this.offset)\n            .putInt(\"block_search_extent\", this.blockSearchExtent)\n            .putString(\"sound\", this.sound)\n            .build();\n      }\n\n      public int getTickDelay() {\n        return this.tickDelay;\n      }\n\n      public double getOffset() {\n        return this.offset;\n      }\n\n      public int getBlockSearchExtent() {\n        return this.blockSearchExtent;\n      }\n\n      @NonNull\n      public String getSound() {\n        return this.sound;\n      }\n\n      @Override\n      public String toString() {\n        return \"Biome.Effects.MoodSound{\"\n            + \"tickDelay=\" + this.tickDelay\n            + \", offset=\" + this.offset\n            + \", blockSearchExtent=\" + this.blockSearchExtent\n            + \", sound=\" + this.sound\n            + \"}\";\n      }\n    }\n\n    public static final class Music {\n\n      private final boolean replaceCurrentMusic;\n      @NonNull\n      private final String sound;\n      private final int maxDelay;\n      private final int minDelay;\n\n      private Music(boolean replaceCurrentMusic, @NonNull String sound, int maxDelay, int minDelay) {\n        this.replaceCurrentMusic = replaceCurrentMusic;\n        this.sound = sound;\n        this.maxDelay = maxDelay;\n        this.minDelay = minDelay;\n      }\n\n      public static Music of(boolean replaceCurrentMusic, @NonNull String sound, int maxDelay, int minDelay) {\n        return new Music(replaceCurrentMusic, sound, maxDelay, minDelay);\n      }\n\n      public CompoundBinaryTag encode() {\n        return CompoundBinaryTag.builder()\n            .putBoolean(\"replace_current_music\", this.replaceCurrentMusic)\n            .putString(\"sound\", this.sound)\n            .putInt(\"max_delay\", this.maxDelay)\n            .putInt(\"min_delay\", this.minDelay)\n            .build();\n      }\n\n      public boolean isReplaceCurrentMusic() {\n        return this.replaceCurrentMusic;\n      }\n\n      @NonNull\n      public String getSound() {\n        return this.sound;\n      }\n\n      public int getMaxDelay() {\n        return this.maxDelay;\n      }\n\n      public int getMinDelay() {\n        return this.minDelay;\n      }\n\n      @Override\n      public String toString() {\n        return \"Biome.Effects.Music{\"\n            + \"replaceCurrentMusic=\" + this.replaceCurrentMusic\n            + \", sound=\" + this.sound\n            + \", maxDelay=\" + this.maxDelay\n            + \", minDelay=\" + this.minDelay\n            + \"}\";\n      }\n    }\n\n    public static final class AdditionsSound {\n\n      @NonNull\n      private final String sound;\n      private final double tickChance;\n\n      private AdditionsSound(@NonNull String sound, double tickChance) {\n        this.sound = sound;\n        this.tickChance = tickChance;\n      }\n\n      public static AdditionsSound of(@NonNull String sound, double tickChance) {\n        return new AdditionsSound(sound, tickChance);\n      }\n\n      public CompoundBinaryTag encode() {\n        return CompoundBinaryTag.builder()\n            .putString(\"sound\", this.sound)\n            .putDouble(\"tick_chance\", this.tickChance)\n            .build();\n      }\n\n      @NonNull\n      public String getSound() {\n        return this.sound;\n      }\n\n      public double getTickChance() {\n        return this.tickChance;\n      }\n\n      @Override\n      public String toString() {\n        return \"Biome.Effects.AdditionsSound{\"\n            + \"sound=\" + this.sound\n            + \", tickChance=\" + this.tickChance\n            + \"}\";\n      }\n    }\n\n    public static final class Particle {\n\n      private final float probability;\n      @NonNull\n      private final ParticleOptions options;\n\n      private Particle(float probability, @NonNull ParticleOptions options) {\n        this.probability = probability;\n        this.options = options;\n      }\n\n      public static Particle of(float probability, @NonNull ParticleOptions options) {\n        return new Particle(probability, options);\n      }\n\n      public CompoundBinaryTag encode() {\n        return CompoundBinaryTag.builder()\n            .putFloat(\"probability\", this.probability)\n            .put(\"options\", this.options.encode())\n            .build();\n      }\n\n      public float getProbability() {\n        return this.probability;\n      }\n\n      @NonNull\n      public ParticleOptions getOptions() {\n        return this.options;\n      }\n\n      @Override\n      public String toString() {\n        return \"Biome.Effects.Particle{\"\n            + \"probability=\" + this.probability\n            + \", options=\" + this.options\n            + \"}\";\n      }\n\n      public static class ParticleOptions {\n\n        @NonNull\n        private final String type;\n\n        public ParticleOptions(@NonNull String type) {\n          this.type = type;\n        }\n\n        public CompoundBinaryTag encode() {\n          return CompoundBinaryTag.builder()\n              .putString(\"type\", this.type)\n              .build();\n        }\n\n        @NonNull\n        public String getType() {\n          return this.type;\n        }\n\n        @Override\n        public String toString() {\n          return \"Biome.Effects.Particle.ParticleOptions{\"\n              + \"type=\" + this.type\n              + \"}\";\n        }\n      }\n    }\n\n    public static class EffectsBuilder {\n\n      private int skyColor;\n      private int waterFogColor;\n      private int fogColor;\n      private int waterColor;\n      private Integer foliageColor;\n      private String grassColorModifier;\n      private Music music;\n      private String ambientSound;\n      private AdditionsSound additionsSound;\n      private MoodSound moodSound;\n      private Particle particle;\n\n      public EffectsBuilder skyColor(int skyColor) {\n        this.skyColor = skyColor;\n        return this;\n      }\n\n      public EffectsBuilder waterFogColor(int waterFogColor) {\n        this.waterFogColor = waterFogColor;\n        return this;\n      }\n\n      public EffectsBuilder fogColor(int fogColor) {\n        this.fogColor = fogColor;\n        return this;\n      }\n\n      public EffectsBuilder waterColor(int waterColor) {\n        this.waterColor = waterColor;\n        return this;\n      }\n\n      public EffectsBuilder foliageColor(Integer foliageColor) {\n        this.foliageColor = foliageColor;\n        return this;\n      }\n\n      public EffectsBuilder grassColorModifier(String grassColorModifier) {\n        this.grassColorModifier = grassColorModifier;\n        return this;\n      }\n\n      public EffectsBuilder music(Music music) {\n        this.music = music;\n        return this;\n      }\n\n      public EffectsBuilder ambientSound(String ambientSound) {\n        this.ambientSound = ambientSound;\n        return this;\n      }\n\n      public EffectsBuilder additionsSound(AdditionsSound additionsSound) {\n        this.additionsSound = additionsSound;\n        return this;\n      }\n\n      public EffectsBuilder moodSound(MoodSound moodSound) {\n        this.moodSound = moodSound;\n        return this;\n      }\n\n      public EffectsBuilder particle(Particle particle) {\n        this.particle = particle;\n        return this;\n      }\n\n      public Effects build() {\n        return new Effects(\n            this.skyColor,\n            this.waterFogColor,\n            this.fogColor,\n            this.waterColor,\n            this.foliageColor,\n            this.grassColorModifier,\n            this.music,\n            this.ambientSound,\n            this.additionsSound,\n            this.moodSound,\n            this.particle\n        );\n      }\n\n      @Override\n      public String toString() {\n        return \"Biome.Effects.EffectsBuilder{\"\n            + \"skyColor=\" + this.skyColor\n            + \", waterFogColor=\" + this.waterFogColor\n            + \", fogColor=\" + this.fogColor\n            + \", waterColor=\" + this.waterColor\n            + \", foliageColor=\" + this.foliageColor\n            + \", grassColorModifier=\" + this.grassColorModifier\n            + \", music=\" + this.music\n            + \", ambientSound=\" + this.ambientSound\n            + \", additionsSound=\" + this.additionsSound\n            + \", moodSound=\" + this.moodSound\n            + \", particle=\" + this.particle\n            + \"}\";\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/mcprotocollib/BitStorage116.java",
    "content": "/*\n * This file is part of MCProtocolLib, licensed under the MIT License (MIT).\n *\n * Copyright (C) 2013-2021 Steveice10\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE\n * OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\npackage net.elytrium.limboapi.mcprotocollib;\n\nimport com.google.common.base.Preconditions;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.Arrays;\nimport net.elytrium.limboapi.api.chunk.util.CompactStorage;\n\npublic class BitStorage116 implements CompactStorage {\n\n  private static final int[] MAGIC_VALUES = {\n      -1, -1, 0, Integer.MIN_VALUE, 0, 0, 1431655765, 1431655765, 0, Integer.MIN_VALUE,\n      0, 1, 858993459, 858993459, 0, 715827882, 715827882, 0, 613566756, 613566756,\n      0, Integer.MIN_VALUE, 0, 2, 477218588, 477218588, 0, 429496729, 429496729, 0,\n      390451572, 390451572, 0, 357913941, 357913941, 0, 330382099, 330382099, 0, 306783378,\n      306783378, 0, 286331153, 286331153, 0, Integer.MIN_VALUE, 0, 3, 252645135, 252645135,\n      0, 238609294, 238609294, 0, 226050910, 226050910, 0, 214748364, 214748364, 0,\n      204522252, 204522252, 0, 195225786, 195225786, 0, 186737708, 186737708, 0, 178956970,\n      178956970, 0, 171798691, 171798691, 0, 165191049, 165191049, 0, 159072862, 159072862,\n      0, 153391689, 153391689, 0, 148102320, 148102320, 0, 143165576, 143165576, 0,\n      138547332, 138547332, 0, Integer.MIN_VALUE, 0, 4, 130150524, 130150524, 0, 126322567,\n      126322567, 0, 122713351, 122713351, 0, 119304647, 119304647, 0, 116080197, 116080197,\n      0, 113025455, 113025455, 0, 110127366, 110127366, 0, 107374182, 107374182, 0,\n      104755299, 104755299, 0, 102261126, 102261126, 0, 99882960, 99882960, 0, 97612893,\n      97612893, 0, 95443717, 95443717, 0, 93368854, 93368854, 0, 91382282, 91382282,\n      0, 89478485, 89478485, 0, 87652393, 87652393, 0, 85899345, 85899345, 0,\n      84215045, 84215045, 0, 82595524, 82595524, 0, 81037118, 81037118, 0, 79536431,\n      79536431, 0, 78090314, 78090314, 0, 76695844, 76695844, 0, 75350303, 75350303,\n      0, 74051160, 74051160, 0, 72796055, 72796055, 0, 71582788, 71582788, 0,\n      70409299, 70409299, 0, 69273666, 69273666, 0, 68174084, 68174084, 0, Integer.MIN_VALUE,\n      0, 5\n  };\n\n  private final long[] data;\n  private final int bitsPerEntry;\n  private final int size;\n\n  private final long maxValue;\n  private final int valuesPerLong;\n  private final long divideMultiply;\n  private final long divideAdd;\n  private final int divideShift;\n\n  public BitStorage116(int bitsPerEntry, int size) {\n    this(bitsPerEntry, size, null);\n  }\n\n  public BitStorage116(int bitsPerEntry, int size, long[] data) {\n    if (bitsPerEntry < 1 || bitsPerEntry > 32) {\n      throw new IllegalArgumentException(\"bitsPerEntry must be between 1 and 32, inclusive.\");\n    }\n\n    this.bitsPerEntry = bitsPerEntry;\n    this.size = size;\n\n    this.maxValue = (1L << bitsPerEntry) - 1L;\n    this.valuesPerLong = (char) (64 / bitsPerEntry);\n    int expectedLength = (size + this.valuesPerLong - 1) / this.valuesPerLong;\n    if (data != null) {\n      if (data.length != expectedLength) {\n        throw new IllegalArgumentException(\"Expected \" + expectedLength + \" longs but got \" + data.length + \" longs\");\n      }\n\n      this.data = Arrays.copyOf(data, data.length);\n    } else {\n      this.data = new long[expectedLength];\n    }\n\n    int magicIndex = 3 * (this.valuesPerLong - 1);\n    this.divideMultiply = Integer.toUnsignedLong(MAGIC_VALUES[magicIndex]);\n    this.divideAdd = Integer.toUnsignedLong(MAGIC_VALUES[magicIndex + 1]);\n    this.divideShift = MAGIC_VALUES[magicIndex + 2];\n  }\n\n  @Override\n  public void set(int index, int value) {\n    if (index < 0 || index > this.size - 1) {\n      throw new IndexOutOfBoundsException();\n    } else if (value < 0 || value > this.maxValue) {\n      throw new IllegalArgumentException(\"Value cannot be outside of accepted range.\");\n    } else {\n      int cellIndex = this.cellIndex(index);\n      int bitIndex = this.bitIndex(index, cellIndex);\n      this.data[cellIndex] = this.data[cellIndex] & ~(this.maxValue << bitIndex) | ((long) value & this.maxValue) << bitIndex;\n    }\n  }\n\n  @Override\n  public int get(int index) {\n    if (index < 0 || index > this.size - 1) {\n      throw new IndexOutOfBoundsException();\n    } else {\n      int cellIndex = this.cellIndex(index);\n      int bitIndex = this.bitIndex(index, cellIndex);\n      return (int) (this.data[cellIndex] >> bitIndex & this.maxValue);\n    }\n  }\n\n  @Override\n  public void write(Object byteBufObject, ProtocolVersion version) {\n    Preconditions.checkArgument(byteBufObject instanceof ByteBuf);\n    ByteBuf buf = (ByteBuf) byteBufObject;\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_5) < 0) {\n      ProtocolUtils.writeVarInt(buf, this.data.length);\n    }\n    for (long l : this.data) {\n      buf.writeLong(l);\n    }\n  }\n\n  @Override\n  public int getBitsPerEntry() {\n    return this.bitsPerEntry;\n  }\n\n  @Override\n  public int getDataLength(ProtocolVersion version) {\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_5) >= 0) {\n      return this.data.length * 8;\n    }\n\n    return ProtocolUtils.varIntBytes(this.data.length) + this.data.length * 8;\n  }\n\n  @Override\n  public long[] getData() {\n    return this.data;\n  }\n\n  @Override\n  public CompactStorage copy() {\n    return new BitStorage116(this.bitsPerEntry, this.size, Arrays.copyOf(this.data, this.data.length));\n  }\n\n  private int cellIndex(int index) {\n    return (int) (index * this.divideMultiply + this.divideAdd >> 32 >> this.divideShift);\n  }\n\n  private int bitIndex(int index, int cellIndex) {\n    return (index - cellIndex * this.valuesPerLong) * this.bitsPerEntry;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/mcprotocollib/BitStorage19.java",
    "content": "/*\n * This file is part of MCProtocolLib, licensed under the MIT License (MIT).\n *\n * Copyright (C) 2013-2021 Steveice10\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE\n * OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\npackage net.elytrium.limboapi.mcprotocollib;\n\nimport com.google.common.base.Preconditions;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.Arrays;\nimport net.elytrium.limboapi.api.chunk.util.CompactStorage;\n\npublic class BitStorage19 implements CompactStorage {\n\n  private final long[] data;\n  private final int bitsPerEntry;\n  private final int size;\n  private final long maxEntryValue;\n\n  public BitStorage19(int bitsPerEntry, int size) {\n    this(bitsPerEntry, new long[((size * bitsPerEntry - 1) >> 6) + 1]);\n  }\n\n  public BitStorage19(int bitsPerEntry, long[] data) {\n    if (bitsPerEntry < 4) {\n      bitsPerEntry = 4;\n    }\n\n    this.bitsPerEntry = bitsPerEntry;\n    this.data = data;\n\n    this.size = (this.data.length << 6) / this.bitsPerEntry;\n    this.maxEntryValue = (1L << this.bitsPerEntry) - 1;\n  }\n\n  @Override\n  public void set(int index, int value) {\n    if (index < 0 || index > this.size - 1) {\n      throw new IndexOutOfBoundsException();\n    } else if (value < 0 || value > this.maxEntryValue) {\n      throw new IllegalArgumentException(\"Value cannot be outside of accepted range.\");\n    } else {\n      int bitIndex = index * this.bitsPerEntry;\n      int startIndex = bitIndex >> 6;\n      int endIndex = ((index + 1) * this.bitsPerEntry - 1) >> 6;\n      int startBitSubIndex = bitIndex & 63;\n      this.data[startIndex] = this.data[startIndex] & ~(this.maxEntryValue << startBitSubIndex) | ((long) value & this.maxEntryValue) << startBitSubIndex;\n      if (startIndex != endIndex) {\n        int endBitSubIndex = 64 - startBitSubIndex;\n        this.data[endIndex] = this.data[endIndex] >>> endBitSubIndex << endBitSubIndex | ((long) value & this.maxEntryValue) >> endBitSubIndex;\n      }\n    }\n  }\n\n  @Override\n  public int get(int index) {\n    if (index < 0 || index > this.size - 1) {\n      throw new IndexOutOfBoundsException();\n    } else {\n      int bitIndex = index * this.bitsPerEntry;\n      int startIndex = bitIndex >> 6;\n      int endIndex = ((index + 1) * this.bitsPerEntry - 1) >> 6;\n      int startBitSubIndex = bitIndex & 63;\n      if (startIndex == endIndex) {\n        return (int) (this.data[startIndex] >>> startBitSubIndex & this.maxEntryValue);\n      } else {\n        int endBitSubIndex = 64 - startBitSubIndex;\n        return (int) ((this.data[startIndex] >>> startBitSubIndex | this.data[endIndex] << endBitSubIndex) & this.maxEntryValue);\n      }\n    }\n  }\n\n  @Override\n  public void write(Object byteBufObject, ProtocolVersion version) {\n    Preconditions.checkArgument(byteBufObject instanceof ByteBuf);\n    ByteBuf buf = (ByteBuf) byteBufObject;\n    ProtocolUtils.writeVarInt(buf, this.data.length);\n    for (long l : this.data) {\n      buf.writeLong(l);\n    }\n  }\n\n  @Override\n  public int getBitsPerEntry() {\n    return this.bitsPerEntry;\n  }\n\n  @Override\n  public int getDataLength(ProtocolVersion version) {\n    return ProtocolUtils.varIntBytes(this.data.length) + this.data.length * 8;\n  }\n\n  @Override\n  public long[] getData() {\n    return this.data;\n  }\n\n  @Override\n  public CompactStorage copy() {\n    return new BitStorage19(this.bitsPerEntry, Arrays.copyOf(this.data, this.data.length));\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/LimboProtocol.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport io.netty.util.collection.IntObjectHashMap;\nimport io.netty.util.collection.IntObjectMap;\nimport it.unimi.dsi.fastutil.objects.Object2IntMap;\nimport it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.MethodType;\nimport java.lang.reflect.Field;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.EnumMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.function.Supplier;\nimport java.util.stream.Stream;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.api.protocol.PacketDirection;\nimport net.elytrium.limboapi.api.protocol.packets.PacketMapping;\nimport net.elytrium.limboapi.api.utils.OverlayMap;\nimport net.elytrium.limboapi.protocol.packets.c2s.MoveOnGroundOnlyPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.MovePacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.MovePositionOnlyPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.MoveRotationOnlyPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.PlayerChatSessionPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.TeleportConfirmPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChangeGameStatePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChunkDataPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChunkUnloadPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.DefaultSpawnPositionPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.MapDataPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.PlayerAbilitiesPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.PositionRotationPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.SetExperiencePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.SetSlotPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.TimeUpdatePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.UpdateTagsPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.UpdateViewPositionPacket;\nimport net.elytrium.limboapi.utils.OverlayIntObjectMap;\nimport net.elytrium.limboapi.utils.OverlayObject2IntMap;\nimport sun.misc.Unsafe;\n\n@SuppressWarnings(\"unchecked\")\npublic class LimboProtocol {\n\n  private static final StateRegistry LIMBO_STATE_REGISTRY;\n  private static final MethodHandle REGISTER_METHOD;\n  private static final MethodHandle PACKET_MAPPING_CONSTRUCTOR;\n  private static final Unsafe UNSAFE;\n\n  public static final String READ_TIMEOUT = \"limboapi-read-timeout\";\n\n  public static final MethodHandle VERSIONS_GETTER;\n  public static final Field VERSIONS_FIELD;\n  public static final MethodHandle PACKET_ID_TO_SUPPLIER_GETTER;\n  public static final Field PACKET_ID_TO_SUPPLIER_FIELD;\n  public static final MethodHandle PACKET_CLASS_TO_ID_GETTER;\n  public static final Field PACKET_CLASS_TO_ID_FIELD;\n  public static final StateRegistry.PacketRegistry PLAY_CLIENTBOUND_REGISTRY;\n  public static final StateRegistry.PacketRegistry PLAY_SERVERBOUND_REGISTRY;\n  public static final StateRegistry.PacketRegistry LIMBO_CLIENTBOUND_REGISTRY;\n  public static final StateRegistry.PacketRegistry LIMBO_SERVERBOUND_REGISTRY;\n  public static final MethodHandle SERVERBOUND_REGISTRY_GETTER;\n  public static final MethodHandle CLIENTBOUND_REGISTRY_GETTER;\n\n  static {\n    try {\n      Field unsafeField = Unsafe.class.getDeclaredField(\"theUnsafe\");\n      unsafeField.setAccessible(true);\n      UNSAFE = (Unsafe) unsafeField.get(null);\n\n      LIMBO_STATE_REGISTRY = (StateRegistry) UNSAFE.allocateInstance(StateRegistry.class);\n\n      VERSIONS_GETTER = MethodHandles.privateLookupIn(StateRegistry.PacketRegistry.class, MethodHandles.lookup())\n          .findGetter(StateRegistry.PacketRegistry.class, \"versions\", Map.class);\n      VERSIONS_FIELD = StateRegistry.PacketRegistry.class.getDeclaredField(\"versions\");\n      VERSIONS_FIELD.setAccessible(true);\n\n      PACKET_ID_TO_SUPPLIER_GETTER = MethodHandles.privateLookupIn(StateRegistry.PacketRegistry.ProtocolRegistry.class, MethodHandles.lookup())\n          .findGetter(StateRegistry.PacketRegistry.ProtocolRegistry.class, \"packetIdToSupplier\", IntObjectMap.class);\n      PACKET_ID_TO_SUPPLIER_FIELD = StateRegistry.PacketRegistry.ProtocolRegistry.class.getDeclaredField(\"packetIdToSupplier\");\n      PACKET_ID_TO_SUPPLIER_FIELD.setAccessible(true);\n\n      PACKET_CLASS_TO_ID_GETTER = MethodHandles.privateLookupIn(StateRegistry.PacketRegistry.ProtocolRegistry.class, MethodHandles.lookup())\n          .findGetter(StateRegistry.PacketRegistry.ProtocolRegistry.class, \"packetClassToId\", Object2IntMap.class);\n      PACKET_CLASS_TO_ID_FIELD = StateRegistry.PacketRegistry.ProtocolRegistry.class.getDeclaredField(\"packetClassToId\");\n      PACKET_CLASS_TO_ID_FIELD.setAccessible(true);\n\n      CLIENTBOUND_REGISTRY_GETTER = MethodHandles.privateLookupIn(StateRegistry.class, MethodHandles.lookup())\n          .findGetter(StateRegistry.class, \"clientbound\", StateRegistry.PacketRegistry.class);\n      SERVERBOUND_REGISTRY_GETTER = MethodHandles.privateLookupIn(StateRegistry.class, MethodHandles.lookup())\n          .findGetter(StateRegistry.class, \"serverbound\", StateRegistry.PacketRegistry.class);\n\n      PLAY_CLIENTBOUND_REGISTRY = (StateRegistry.PacketRegistry) CLIENTBOUND_REGISTRY_GETTER.invokeExact(StateRegistry.PLAY);\n      PLAY_SERVERBOUND_REGISTRY = (StateRegistry.PacketRegistry) SERVERBOUND_REGISTRY_GETTER.invokeExact(StateRegistry.PLAY);\n\n      overlayRegistry(LIMBO_STATE_REGISTRY, \"clientbound\", PLAY_CLIENTBOUND_REGISTRY);\n      overlayRegistry(LIMBO_STATE_REGISTRY, \"serverbound\", PLAY_SERVERBOUND_REGISTRY);\n\n      LIMBO_CLIENTBOUND_REGISTRY = (StateRegistry.PacketRegistry) CLIENTBOUND_REGISTRY_GETTER.invokeExact(LIMBO_STATE_REGISTRY);\n      LIMBO_SERVERBOUND_REGISTRY = (StateRegistry.PacketRegistry) SERVERBOUND_REGISTRY_GETTER.invokeExact(LIMBO_STATE_REGISTRY);\n\n      REGISTER_METHOD = MethodHandles.privateLookupIn(StateRegistry.PacketRegistry.class, MethodHandles.lookup())\n          .findVirtual(StateRegistry.PacketRegistry.class, \"register\",\n              MethodType.methodType(void.class, Class.class, Supplier.class, StateRegistry.PacketMapping[].class));\n\n      PACKET_MAPPING_CONSTRUCTOR = MethodHandles.privateLookupIn(StateRegistry.PacketRegistry.class, MethodHandles.lookup())\n          .findConstructor(StateRegistry.PacketMapping.class,\n              MethodType.methodType(void.class, int.class, ProtocolVersion.class, ProtocolVersion.class, boolean.class));\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  private static void overlayRegistry(StateRegistry stateRegistry,\n                                      String registryName, StateRegistry.PacketRegistry playRegistry) throws Throwable {\n    StateRegistry.PacketRegistry registry = (StateRegistry.PacketRegistry) UNSAFE.allocateInstance(StateRegistry.PacketRegistry.class);\n\n    Field directionField = StateRegistry.PacketRegistry.class.getDeclaredField(\"direction\");\n    directionField.setAccessible(true);\n    directionField.set(registry, directionField.get(playRegistry));\n\n    Field versionField = StateRegistry.PacketRegistry.ProtocolRegistry.class.getDeclaredField(\"version\");\n    versionField.setAccessible(true);\n\n    // Overlay packets from PLAY state registry.\n    // P.S. I hate it when someone uses var in code, but there I had no choice.\n    var playProtocolRegistryVersions =\n        (Map<ProtocolVersion, StateRegistry.PacketRegistry.ProtocolRegistry>) VERSIONS_GETTER.invokeExact(playRegistry);\n    Map<ProtocolVersion, StateRegistry.PacketRegistry.ProtocolRegistry> versions = new EnumMap<>(ProtocolVersion.class);\n    for (ProtocolVersion version : ProtocolVersion.values()) {\n      if (!version.isLegacy() && !version.isUnknown()) {\n        StateRegistry.PacketRegistry.ProtocolRegistry playProtoRegistry = playProtocolRegistryVersions.get(version);\n        var protoRegistry = (StateRegistry.PacketRegistry.ProtocolRegistry) UNSAFE.allocateInstance(StateRegistry.PacketRegistry.ProtocolRegistry.class);\n\n        versionField.set(protoRegistry, version);\n\n        var playPacketIDToSupplier = (IntObjectMap<Supplier<? extends MinecraftPacket>>) PACKET_ID_TO_SUPPLIER_GETTER.invokeExact(playProtoRegistry);\n        PACKET_ID_TO_SUPPLIER_FIELD.set(protoRegistry, new OverlayIntObjectMap<>(playPacketIDToSupplier, new IntObjectHashMap<>(16, 0.5F)));\n\n        var playPacketClassToID = (Object2IntMap<Class<? extends MinecraftPacket>>) PACKET_CLASS_TO_ID_GETTER.invokeExact(playProtoRegistry);\n        Object2IntMap<Class<? extends MinecraftPacket>> packetClassToID = new Object2IntOpenHashMap<>(16, 0.5F);\n        packetClassToID.defaultReturnValue(playPacketClassToID.defaultReturnValue());\n        PACKET_CLASS_TO_ID_FIELD.set(protoRegistry, new OverlayObject2IntMap<>(playPacketClassToID, packetClassToID));\n\n        versions.put(version, protoRegistry);\n      }\n    }\n\n    VERSIONS_FIELD.set(registry, Collections.unmodifiableMap(versions));\n\n    Field fallbackField = StateRegistry.PacketRegistry.class.getDeclaredField(\"fallback\");\n    fallbackField.setAccessible(true);\n    fallbackField.set(registry, false);\n\n    Field registryField = StateRegistry.class.getDeclaredField(registryName);\n    registryField.setAccessible(true);\n    registryField.set(stateRegistry, registry);\n  }\n\n  public static void init() throws Throwable {\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        ChangeGameStatePacket.class, ChangeGameStatePacket::new,\n        createMapping(0x2B, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x20, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_16_2, true),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x1B, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x1C, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x20, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x22, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x23, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x22, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x26, ProtocolVersion.MINECRAFT_1_21_9, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        ChunkDataPacket.class, ChunkDataPacket::new,\n        createMapping(0x21, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x20, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x22, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x21, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x22, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x21, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x20, ProtocolVersion.MINECRAFT_1_16_2, true),\n        createMapping(0x22, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x21, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x20, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x24, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x25, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x27, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x28, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x27, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x2C, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x2D, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        ChunkUnloadPacket.class, ChunkUnloadPacket::new,\n        // on <=1.8, there is no ChunkUnload; its role is handled by specially encoded ChunkData, so the id will be the same as for ChunkData\n        createMapping(0x21, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x1C, ProtocolVersion.MINECRAFT_1_16_2, true),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x1A, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x1C, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x1B, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x21, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x22, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x21, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x25, ProtocolVersion.MINECRAFT_1_21_9, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        DefaultSpawnPositionPacket.class, DefaultSpawnPositionPacket::new,\n        createMapping(0x05, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x43, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x45, ProtocolVersion.MINECRAFT_1_12, true),\n        createMapping(0x46, ProtocolVersion.MINECRAFT_1_12_1, true),\n        createMapping(0x49, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x4D, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x4E, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x42, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x4B, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x4A, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x4D, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x4C, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x50, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x52, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x54, ProtocolVersion.MINECRAFT_1_20_3, true),\n        createMapping(0x56, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x5B, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x5A, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x5F, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x61, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        MapDataPacket.class, MapDataPacket::new,\n        createMapping(0x34, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x24, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x26, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x27, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x26, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x25, ProtocolVersion.MINECRAFT_1_16_2, true),\n        createMapping(0x27, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x24, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x26, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x25, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x29, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x2A, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x2C, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x2D, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x2C, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x31, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x33, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        PlayerAbilitiesPacket.class, PlayerAbilitiesPacket::new,\n        createMapping(0x39, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x2B, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x2C, ProtocolVersion.MINECRAFT_1_12_1, true),\n        createMapping(0x2E, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x31, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x32, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x31, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x30, ProtocolVersion.MINECRAFT_1_16_2, true),\n        createMapping(0x32, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x2F, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x31, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x30, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x34, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x36, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x38, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x3A, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x39, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x3E, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x40, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        PositionRotationPacket.class, PositionRotationPacket::new,\n        createMapping(0x08, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x2E, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x2F, ProtocolVersion.MINECRAFT_1_12_1, true),\n        createMapping(0x32, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x35, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x36, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x35, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x34, ProtocolVersion.MINECRAFT_1_16_2, true),\n        createMapping(0x38, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x36, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x39, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x38, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x3C, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x3E, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x40, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x42, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x41, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x46, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x48, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        SetExperiencePacket.class, SetExperiencePacket::new,\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x3D, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x3F, ProtocolVersion.MINECRAFT_1_12, true),\n        createMapping(0x40, ProtocolVersion.MINECRAFT_1_12_1, true),\n        createMapping(0x43, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x47, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x48, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x51, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x54, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x52, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x56, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x58, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x5A, ProtocolVersion.MINECRAFT_1_20_3, true),\n        createMapping(0x5C, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x61, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x60, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x65, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x67, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        SetSlotPacket.class, SetSlotPacket::new,\n        createMapping(0x2F, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x17, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x17, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x15, ProtocolVersion.MINECRAFT_1_16_2, true),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x13, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x12, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x15, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_21_5, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        TimeUpdatePacket.class, TimeUpdatePacket::new,\n        createMapping(0x03, ProtocolVersion.MINECRAFT_1_7_2, true),\n        createMapping(0x44, ProtocolVersion.MINECRAFT_1_9, true),\n        createMapping(0x46, ProtocolVersion.MINECRAFT_1_12, true),\n        createMapping(0x47, ProtocolVersion.MINECRAFT_1_12_1, true),\n        createMapping(0x4A, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x4E, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x4F, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x4E, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x58, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x59, ProtocolVersion.MINECRAFT_1_18, true),\n        createMapping(0x5C, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x5A, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x5E, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x60, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x62, ProtocolVersion.MINECRAFT_1_20_3, true),\n        createMapping(0x64, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x6B, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x6A, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x6F, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x71, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        UpdateViewPositionPacket.class, UpdateViewPositionPacket::new, // ViewCentre, ChunkRenderDistanceCenter\n        createMapping(0x40, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x41, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x40, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x49, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x48, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x4B, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x4A, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x4E, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x50, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x52, ProtocolVersion.MINECRAFT_1_20_3, true),\n        createMapping(0x54, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x58, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x57, ProtocolVersion.MINECRAFT_1_21_5, true),\n        createMapping(0x5C, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x5E, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.CLIENTBOUND,\n        UpdateTagsPacket.class, UpdateTagsPacket::new,\n        createMapping(0x55, ProtocolVersion.MINECRAFT_1_13, true),\n        createMapping(0x5B, ProtocolVersion.MINECRAFT_1_14, true),\n        createMapping(0x5C, ProtocolVersion.MINECRAFT_1_15, true),\n        createMapping(0x5B, ProtocolVersion.MINECRAFT_1_16, true),\n        createMapping(0x66, ProtocolVersion.MINECRAFT_1_17, true),\n        createMapping(0x67, ProtocolVersion.MINECRAFT_1_18, true),\n        createMapping(0x68, ProtocolVersion.MINECRAFT_1_19, true),\n        createMapping(0x6B, ProtocolVersion.MINECRAFT_1_19_1, true),\n        createMapping(0x6A, ProtocolVersion.MINECRAFT_1_19_3, true),\n        createMapping(0x6E, ProtocolVersion.MINECRAFT_1_19_4, true),\n        createMapping(0x70, ProtocolVersion.MINECRAFT_1_20_2, true),\n        createMapping(0x74, ProtocolVersion.MINECRAFT_1_20_3, true),\n        createMapping(0x78, ProtocolVersion.MINECRAFT_1_20_5, true),\n        createMapping(0x7F, ProtocolVersion.MINECRAFT_1_21_2, true),\n        createMapping(0x84, ProtocolVersion.MINECRAFT_1_21_9, true),\n        createMapping(0x86, ProtocolVersion.MINECRAFT_26_1, true)\n    );\n\n    register(LIMBO_STATE_REGISTRY, PacketDirection.SERVERBOUND,\n        MovePacket.class, MovePacket::new,\n        createMapping(0x06, ProtocolVersion.MINECRAFT_1_7_2, false),\n        createMapping(0x0D, ProtocolVersion.MINECRAFT_1_9, false),\n        createMapping(0x0F, ProtocolVersion.MINECRAFT_1_12, false),\n        createMapping(0x0E, ProtocolVersion.MINECRAFT_1_12_1, false),\n        createMapping(0x11, ProtocolVersion.MINECRAFT_1_13, false),\n        createMapping(0x12, ProtocolVersion.MINECRAFT_1_14, false),\n        createMapping(0x13, ProtocolVersion.MINECRAFT_1_16, false),\n        createMapping(0x12, ProtocolVersion.MINECRAFT_1_17, false),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_19, false),\n        createMapping(0x15, ProtocolVersion.MINECRAFT_1_19_1, false),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_19_3, false),\n        createMapping(0x15, ProtocolVersion.MINECRAFT_1_19_4, false),\n        createMapping(0x17, ProtocolVersion.MINECRAFT_1_20_2, false),\n        createMapping(0x18, ProtocolVersion.MINECRAFT_1_20_3, false),\n        createMapping(0x1B, ProtocolVersion.MINECRAFT_1_20_5, false),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_21_2, false),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_21_6, false),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_26_1, false)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.SERVERBOUND,\n        MovePositionOnlyPacket.class, MovePositionOnlyPacket::new,\n        createMapping(0x04, ProtocolVersion.MINECRAFT_1_7_2, false),\n        createMapping(0x0C, ProtocolVersion.MINECRAFT_1_9, false),\n        createMapping(0x0E, ProtocolVersion.MINECRAFT_1_12, false),\n        createMapping(0x0D, ProtocolVersion.MINECRAFT_1_12_1, false),\n        createMapping(0x10, ProtocolVersion.MINECRAFT_1_13, false),\n        createMapping(0x11, ProtocolVersion.MINECRAFT_1_14, false),\n        createMapping(0x12, ProtocolVersion.MINECRAFT_1_16, false),\n        createMapping(0x11, ProtocolVersion.MINECRAFT_1_17, false),\n        createMapping(0x13, ProtocolVersion.MINECRAFT_1_19, false),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_19_1, false),\n        createMapping(0x13, ProtocolVersion.MINECRAFT_1_19_3, false),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_19_4, false),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_20_2, false),\n        createMapping(0x17, ProtocolVersion.MINECRAFT_1_20_3, false),\n        createMapping(0x1A, ProtocolVersion.MINECRAFT_1_20_5, false),\n        createMapping(0x1C, ProtocolVersion.MINECRAFT_1_21_2, false),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_21_6, false),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_26_1, false)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.SERVERBOUND,\n        MoveRotationOnlyPacket.class, MoveRotationOnlyPacket::new,\n        createMapping(0x05, ProtocolVersion.MINECRAFT_1_7_2, false),\n        createMapping(0x0E, ProtocolVersion.MINECRAFT_1_9, false),\n        createMapping(0x10, ProtocolVersion.MINECRAFT_1_12, false),\n        createMapping(0x0F, ProtocolVersion.MINECRAFT_1_12_1, false),\n        createMapping(0x12, ProtocolVersion.MINECRAFT_1_13, false),\n        createMapping(0x13, ProtocolVersion.MINECRAFT_1_14, false),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_16, false),\n        createMapping(0x13, ProtocolVersion.MINECRAFT_1_17, false),\n        createMapping(0x15, ProtocolVersion.MINECRAFT_1_19, false),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_19_1, false),\n        createMapping(0x15, ProtocolVersion.MINECRAFT_1_19_3, false),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_19_4, false),\n        createMapping(0x18, ProtocolVersion.MINECRAFT_1_20_2, false),\n        createMapping(0x19, ProtocolVersion.MINECRAFT_1_20_3, false),\n        createMapping(0x1C, ProtocolVersion.MINECRAFT_1_20_5, false),\n        createMapping(0x1E, ProtocolVersion.MINECRAFT_1_21_2, false),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_21_6, false),\n        createMapping(0x20, ProtocolVersion.MINECRAFT_26_1, false)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.SERVERBOUND,\n        MoveOnGroundOnlyPacket.class, MoveOnGroundOnlyPacket::new,\n        createMapping(0x03, ProtocolVersion.MINECRAFT_1_7_2, false),\n        createMapping(0x0F, ProtocolVersion.MINECRAFT_1_9, false),\n        createMapping(0x0D, ProtocolVersion.MINECRAFT_1_12, false),\n        createMapping(0x0C, ProtocolVersion.MINECRAFT_1_12_1, false),\n        createMapping(0x0F, ProtocolVersion.MINECRAFT_1_13, false),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_14, false),\n        createMapping(0x15, ProtocolVersion.MINECRAFT_1_16, false),\n        createMapping(0x14, ProtocolVersion.MINECRAFT_1_17, false),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_19, false),\n        createMapping(0x17, ProtocolVersion.MINECRAFT_1_19_1, false),\n        createMapping(0x16, ProtocolVersion.MINECRAFT_1_19_3, false),\n        createMapping(0x17, ProtocolVersion.MINECRAFT_1_19_4, false),\n        createMapping(0x19, ProtocolVersion.MINECRAFT_1_20_2, false),\n        createMapping(0x1A, ProtocolVersion.MINECRAFT_1_20_3, false),\n        createMapping(0x1D, ProtocolVersion.MINECRAFT_1_20_5, false),\n        createMapping(0x1F, ProtocolVersion.MINECRAFT_1_21_2, false),\n        createMapping(0x20, ProtocolVersion.MINECRAFT_1_21_6, false),\n        createMapping(0x21, ProtocolVersion.MINECRAFT_26_1, false)\n    );\n    register(LIMBO_STATE_REGISTRY, PacketDirection.SERVERBOUND,\n        TeleportConfirmPacket.class, TeleportConfirmPacket::new,\n        createMapping(0x00, ProtocolVersion.MINECRAFT_1_9, false)\n    );\n\n    register(PLAY_SERVERBOUND_REGISTRY,\n        PlayerChatSessionPacket.class, PlayerChatSessionPacket::new,\n        createMapping(0x20, ProtocolVersion.MINECRAFT_1_19_3, false),\n        createMapping(0x06, ProtocolVersion.MINECRAFT_1_19_4, false),\n        createMapping(0x07, ProtocolVersion.MINECRAFT_1_20_5, false),\n        createMapping(0x08, ProtocolVersion.MINECRAFT_1_21_2, false),\n        createMapping(0x09, ProtocolVersion.MINECRAFT_1_21_6, false),\n        createMapping(0x0A, ProtocolVersion.MINECRAFT_26_1, false)\n    );\n  }\n\n  public static StateRegistry createLocalStateRegistry() {\n    try {\n      StateRegistry stateRegistry = (StateRegistry) UNSAFE.allocateInstance(StateRegistry.class);\n      overlayRegistry(stateRegistry, \"clientbound\", LIMBO_CLIENTBOUND_REGISTRY);\n      overlayRegistry(stateRegistry, \"serverbound\", LIMBO_SERVERBOUND_REGISTRY);\n      return stateRegistry;\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  public static void register(StateRegistry stateRegistry,\n                              PacketDirection direction, Class<?> packetClass, Supplier<?> packetSupplier, PacketMapping[] mappings) {\n    register(stateRegistry, direction, packetClass, packetSupplier, Arrays.stream(mappings).map(mapping -> {\n      try {\n        return createMapping(mapping.getID(), mapping.getProtocolVersion(), mapping.getLastValidProtocolVersion(), mapping.isEncodeOnly());\n      } catch (Throwable e) {\n        throw new ReflectionException(e);\n      }\n    }).toArray(StateRegistry.PacketMapping[]::new));\n  }\n\n  public static void register(StateRegistry stateRegistry,\n                              PacketDirection direction, Class<?> packetClass, Supplier<?> packetSupplier, StateRegistry.PacketMapping... mappings) {\n    MethodHandle registryGetter;\n    switch (direction) {\n      case CLIENTBOUND: {\n        registryGetter = CLIENTBOUND_REGISTRY_GETTER;\n        break;\n      }\n      case SERVERBOUND: {\n        registryGetter = SERVERBOUND_REGISTRY_GETTER;\n        break;\n      }\n      default: {\n        throw new IllegalStateException(\"Unexpected value: \" + direction);\n      }\n    }\n\n    try {\n      register((StateRegistry.PacketRegistry) registryGetter.invokeExact(stateRegistry), packetClass, packetSupplier, mappings);\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  public static void register(StateRegistry.PacketRegistry registry,\n                              Class<?> packetClass, Supplier<?> packetSupplier, StateRegistry.PacketMapping... mappings) {\n    try {\n      var versions = (Map<ProtocolVersion, StateRegistry.PacketRegistry.ProtocolRegistry>) VERSIONS_GETTER.invokeExact(registry);\n      List<OverlayMap<?, ?>> overlayMaps = versions.values().stream().flatMap(protocolRegistry -> {\n        try {\n          var idToSupplier = (IntObjectMap<Supplier<? extends MinecraftPacket>>) PACKET_ID_TO_SUPPLIER_GETTER.invokeExact(protocolRegistry);\n          var classToId = (Object2IntMap<Class<? extends MinecraftPacket>>) PACKET_CLASS_TO_ID_GETTER.invokeExact(protocolRegistry);\n          if (idToSupplier instanceof OverlayMap<?, ?> && classToId instanceof OverlayMap<?, ?>) {\n            return Stream.of(\n                (OverlayMap<?, ?>) idToSupplier,\n                (OverlayMap<?, ?>) classToId\n            );\n          } else {\n            return Stream.empty();\n          }\n        } catch (Throwable e) {\n          throw new ReflectionException(e);\n        }\n      }).toList();\n\n      overlayMaps.forEach(overlayMap -> overlayMap.setOverride(true));\n      REGISTER_METHOD.invokeExact(registry, packetClass, packetSupplier, mappings);\n      overlayMaps.forEach(overlayMap -> overlayMap.setOverride(false));\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  private static StateRegistry.PacketMapping createMapping(int id, ProtocolVersion version, boolean encodeOnly) throws Throwable {\n    return createMapping(id, version, null, encodeOnly);\n  }\n\n  private static StateRegistry.PacketMapping createMapping(int id, ProtocolVersion version, ProtocolVersion lastValidProtocolVersion, boolean encodeOnly)\n      throws Throwable {\n    return (StateRegistry.PacketMapping) PACKET_MAPPING_CONSTRUCTOR.invokeExact(id, version, lastValidProtocolVersion, encodeOnly);\n  }\n\n  public static StateRegistry getLimboStateRegistry() {\n    return LIMBO_STATE_REGISTRY;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/data/BiomeStorage118.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.data;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.util.CompactStorage;\nimport net.elytrium.limboapi.material.Biome;\nimport net.elytrium.limboapi.mcprotocollib.BitStorage116;\nimport net.elytrium.limboapi.server.world.chunk.SimpleChunk;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\npublic class BiomeStorage118 {\n\n  private final ProtocolVersion version;\n\n  private List<VirtualBiome> palette = new ArrayList<>();\n  private Map<Integer, VirtualBiome> rawToBiome = new HashMap<>();\n  private CompactStorage storage;\n\n  public BiomeStorage118(ProtocolVersion version) {\n    this.version = version;\n\n    for (Biome biome : Biome.values()) {\n      this.palette.add(biome);\n      this.rawToBiome.put(biome.getID(), biome);\n    }\n\n    this.storage = new BitStorage116(3, SimpleChunk.MAX_BIOMES_PER_SECTION);\n  }\n\n  private BiomeStorage118(ProtocolVersion version, List<VirtualBiome> palette, Map<Integer, VirtualBiome> rawToBiome, CompactStorage storage) {\n    this.version = version;\n    this.palette = palette;\n    this.rawToBiome = rawToBiome;\n    this.storage = storage;\n  }\n\n  public void set(int posX, int posY, int posZ, @NonNull VirtualBiome biome) {\n    int id = this.getIndex(biome);\n    this.storage.set(index(posX, posY, posZ), id);\n  }\n\n  public void set(int index, @NonNull VirtualBiome biome) {\n    int id = this.getIndex(biome);\n    this.storage.set(index, id);\n  }\n\n  @NonNull\n  public VirtualBiome get(int posX, int posY, int posZ) {\n    return this.get(index(posX, posY, posZ));\n  }\n\n  private VirtualBiome get(int index) {\n    int id = this.storage.get(index);\n    if (this.storage.getBitsPerEntry() > 8) {\n      return this.rawToBiome.get(id);\n    } else {\n      return this.palette.get(id);\n    }\n  }\n\n  public void write(ByteBuf buf, ProtocolVersion version) {\n    buf.writeByte(this.storage.getBitsPerEntry());\n    if (this.storage.getBitsPerEntry() <= 8) {\n      ProtocolUtils.writeVarInt(buf, this.palette.size());\n      for (VirtualBiome biome : this.palette) {\n        ProtocolUtils.writeVarInt(buf, biome.getID());\n      }\n    }\n\n    this.storage.write(buf, version);\n  }\n\n  public int getDataLength(ProtocolVersion version) {\n    int length = 1;\n    if (this.storage.getBitsPerEntry() <= 8) {\n      length += ProtocolUtils.varIntBytes(this.palette.size());\n      for (VirtualBiome biome : this.palette) {\n        length += ProtocolUtils.varIntBytes(biome.getID());\n      }\n    }\n\n    return length + this.storage.getDataLength(version);\n  }\n\n  public BiomeStorage118 copy() {\n    return new BiomeStorage118(this.version, new ArrayList<>(this.palette), new HashMap<>(this.rawToBiome), this.storage.copy());\n  }\n\n  private int getIndex(VirtualBiome biome) {\n    if (this.storage.getBitsPerEntry() > 8) {\n      int raw = biome.getID();\n      this.rawToBiome.put(raw, biome);\n      return raw;\n    } else {\n      int id = this.palette.indexOf(biome);\n      if (id == -1) {\n        if (this.palette.size() >= (1 << this.storage.getBitsPerEntry())) {\n          this.resize(this.storage.getBitsPerEntry() + 1);\n          return this.getIndex(biome);\n        }\n\n        this.palette.add(biome);\n        id = this.palette.size() - 1;\n      }\n\n      return id;\n    }\n  }\n\n  private void resize(int newSize) {\n    newSize = StorageUtils.fixBitsPerEntry(this.version, newSize);\n    CompactStorage newStorage = new BitStorage116(newSize, SimpleChunk.MAX_BIOMES_PER_SECTION);\n    for (int i = 0; i < SimpleChunk.MAX_BIOMES_PER_SECTION; ++i) {\n      newStorage.set(i, newSize > 8 ? this.palette.get(this.storage.get(i)).getID() : this.storage.get(i));\n    }\n\n    this.storage = newStorage;\n  }\n\n  @Override\n  public String toString() {\n    return \"BiomeStorage118{\"\n        + \"version=\" + this.version\n        + \", palette=\" + this.palette\n        + \", rawToBiome=\" + this.rawToBiome\n        + \", storage=\" + this.storage\n        + \"}\";\n  }\n\n  private static int index(int posX, int posY, int posZ) {\n    return posY << 4 | posZ << 2 | posX;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/data/BlockStorage17.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.data;\n\nimport com.google.common.base.Preconditions;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.buffer.ByteBuf;\nimport java.util.Arrays;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.data.BlockStorage;\nimport net.elytrium.limboapi.api.mcprotocollib.NibbleArray3D;\nimport net.elytrium.limboapi.server.world.SimpleBlock;\nimport net.elytrium.limboapi.server.world.chunk.SimpleChunk;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\npublic class BlockStorage17 implements BlockStorage {\n\n  private final VirtualBlock[] blocks;\n\n  public BlockStorage17() {\n    this(new VirtualBlock[SimpleChunk.MAX_BLOCKS_PER_SECTION]);\n  }\n\n  private BlockStorage17(VirtualBlock[] blocks) {\n    this.blocks = blocks;\n  }\n\n  @Override\n  public void write(Object byteBufObject, ProtocolVersion version, int pass) {\n    Preconditions.checkArgument(byteBufObject instanceof ByteBuf);\n    ByteBuf buf = (ByteBuf) byteBufObject;\n    if (pass == 0) {\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n        byte[] raw = new byte[this.blocks.length];\n        for (int i = 0; i < this.blocks.length; ++i) {\n          VirtualBlock block = this.blocks[i];\n          raw[i] = (byte) (block == null ? 0 : block.getBlockStateID(ProtocolVersion.MINECRAFT_1_7_2) >> 4);\n        }\n\n        buf.writeBytes(raw);\n      } else {\n        short[] raw = new short[this.blocks.length];\n        for (int i = 0; i < this.blocks.length; ++i) {\n          VirtualBlock block = this.blocks[i];\n          raw[i] = (short) (block == null ? 0 : block.getBlockStateID(ProtocolVersion.MINECRAFT_1_8));\n        }\n\n        for (short s : raw) {\n          buf.writeShortLE(s);\n        }\n      }\n    } else if (pass == 1 && version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      NibbleArray3D metadata = new NibbleArray3D(SimpleChunk.MAX_BLOCKS_PER_SECTION);\n      for (int i = 0; i < this.blocks.length; ++i) {\n        VirtualBlock block = this.blocks[i];\n        metadata.set(i, block == null ? 0 : block.getBlockStateID(ProtocolVersion.MINECRAFT_1_7_2) & 0xFFFF);\n      }\n\n      buf.writeBytes(metadata.getData());\n    }\n  }\n\n  @Override\n  public void set(int posX, int posY, int posZ, @NonNull VirtualBlock block) {\n    this.blocks[BlockStorage.index(posX, posY, posZ)] = block;\n  }\n\n  @NonNull\n  @Override\n  public VirtualBlock get(int posX, int posY, int posZ) {\n    VirtualBlock block = this.blocks[BlockStorage.index(posX, posY, posZ)];\n    return block == null ? SimpleBlock.AIR : block;\n  }\n\n  @Override\n  public int getDataLength(ProtocolVersion version) {\n    return version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0 ? this.blocks.length + (SimpleChunk.MAX_BLOCKS_PER_SECTION >> 1) : this.blocks.length * 2;\n  }\n\n  @Override\n  public BlockStorage copy() {\n    return new BlockStorage17(Arrays.copyOf(this.blocks, this.blocks.length));\n  }\n\n  @Override\n  public String toString() {\n    return \"BlockStorage17{\"\n        + \"blocks=\" + Arrays.toString(this.blocks)\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/data/BlockStorage19.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.data;\n\nimport com.google.common.base.Preconditions;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.data.BlockStorage;\nimport net.elytrium.limboapi.api.chunk.util.CompactStorage;\nimport net.elytrium.limboapi.mcprotocollib.BitStorage116;\nimport net.elytrium.limboapi.mcprotocollib.BitStorage19;\nimport net.elytrium.limboapi.server.world.SimpleBlock;\nimport net.elytrium.limboapi.server.world.chunk.SimpleChunk;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\npublic class BlockStorage19 implements BlockStorage {\n\n  private final ProtocolVersion version;\n  private final List<VirtualBlock> palette;\n  private final Map<Short, VirtualBlock> rawToBlock;\n\n  private CompactStorage storage;\n\n  public BlockStorage19(ProtocolVersion version) {\n    this.version = version;\n    this.palette = new ArrayList<>();\n    this.rawToBlock = new HashMap<>();\n\n    this.palette.add(SimpleBlock.AIR);\n    this.rawToBlock.put(SimpleBlock.AIR.getBlockStateID(version), SimpleBlock.AIR);\n\n    this.storage = this.createStorage(4);\n  }\n\n  private BlockStorage19(ProtocolVersion version, List<VirtualBlock> palette, Map<Short, VirtualBlock> rawToBlock, CompactStorage storage) {\n    this.version = version;\n    this.palette = palette;\n    this.rawToBlock = rawToBlock;\n    this.storage = storage;\n  }\n\n  @Override\n  public void write(Object byteBufObject, ProtocolVersion version, int pass) {\n    Preconditions.checkArgument(byteBufObject instanceof ByteBuf);\n    ByteBuf buf = (ByteBuf) byteBufObject;\n    buf.writeByte(this.storage.getBitsPerEntry());\n    if (this.storage.getBitsPerEntry() > 8) {\n      if (this.version.compareTo(ProtocolVersion.MINECRAFT_1_13) < 0) {\n        ProtocolUtils.writeVarInt(buf, 0);\n      }\n    } else {\n      ProtocolUtils.writeVarInt(buf, this.palette.size());\n      for (VirtualBlock state : this.palette) {\n        ProtocolUtils.writeVarInt(buf, state.getBlockStateID(this.version));\n      }\n    }\n\n    this.storage.write(buf, version);\n  }\n\n  @Override\n  public void set(int posX, int posY, int posZ, @NonNull VirtualBlock block) {\n    int id = this.getIndex(block);\n    this.storage.set(BlockStorage.index(posX, posY, posZ), id);\n  }\n\n  private int getIndex(VirtualBlock block) {\n    if (this.storage.getBitsPerEntry() > 8) {\n      short raw = block.getBlockStateID(this.version);\n      this.rawToBlock.put(raw, block);\n      return raw;\n    } else {\n      int id = this.palette.indexOf(block);\n      if (id == -1) {\n        if (this.palette.size() >= (1 << this.storage.getBitsPerEntry())) {\n          int bitsPerEntry = StorageUtils.fixBitsPerEntry(this.version, this.storage.getBitsPerEntry() + 1);\n          CompactStorage newStorage = this.createStorage(bitsPerEntry);\n          for (int i = 0; i < SimpleChunk.MAX_BLOCKS_PER_SECTION; ++i) {\n            newStorage.set(i, bitsPerEntry > 8 ? this.palette.get(this.storage.get(i)).getBlockStateID(this.version) : this.storage.get(i));\n          }\n\n          this.storage = newStorage;\n\n          return this.getIndex(block);\n        }\n\n        this.palette.add(block);\n        id = this.palette.size() - 1;\n      }\n\n      return id;\n    }\n  }\n\n  private CompactStorage createStorage(int bitsPerEntry) {\n    return this.version.compareTo(ProtocolVersion.MINECRAFT_1_16) < 0\n        ? new BitStorage19(bitsPerEntry, SimpleChunk.MAX_BLOCKS_PER_SECTION)\n        : new BitStorage116(bitsPerEntry, SimpleChunk.MAX_BLOCKS_PER_SECTION);\n  }\n\n  @NonNull\n  @Override\n  public VirtualBlock get(int posX, int posY, int posZ) {\n    int id = this.storage.get(BlockStorage.index(posX, posY, posZ));\n    if (this.storage.getBitsPerEntry() > 8) {\n      return this.rawToBlock.get((short) id);\n    } else {\n      return this.palette.get(id);\n    }\n  }\n\n  @Override\n  public int getDataLength(ProtocolVersion version) {\n    int length = 1;\n    if (this.storage.getBitsPerEntry() > 8) {\n      if (this.version.compareTo(ProtocolVersion.MINECRAFT_1_13) < 0) {\n        length += 1;\n      }\n    } else {\n      length += ProtocolUtils.varIntBytes(this.palette.size());\n      for (VirtualBlock state : this.palette) {\n        length += ProtocolUtils.varIntBytes(state.getBlockStateID(this.version));\n      }\n    }\n\n    return length + this.storage.getDataLength(version);\n  }\n\n  @Override\n  public BlockStorage copy() {\n    return new BlockStorage19(this.version, new ArrayList<>(this.palette), new HashMap<>(this.rawToBlock), this.storage.copy());\n  }\n\n  @Override\n  public String toString() {\n    return \"BlockStorage19{\"\n        + \"version=\" + this.version\n        + \", palette=\" + this.palette\n        + \", rawToBlock=\" + this.rawToBlock\n        + \", storage=\" + this.storage\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/data/StorageUtils.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.data;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\n\npublic class StorageUtils {\n\n  public static int fixBitsPerEntry(ProtocolVersion version, int bitsPerEntry) {\n    if (bitsPerEntry < 4) {\n      return 4;\n    } else if (bitsPerEntry < 9) {\n      return bitsPerEntry;\n    } else if (version.compareTo(ProtocolVersion.MINECRAFT_1_13) < 0) {\n      return 13;\n    } else if (version.compareTo(ProtocolVersion.MINECRAFT_1_16_4) < 0) {\n      return 14;\n    } else {\n      return 15;\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/PacketFactoryImpl.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.util.List;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.chunk.Dimension;\nimport net.elytrium.limboapi.api.chunk.data.ChunkSnapshot;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.material.WorldVersion;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.elytrium.limboapi.api.protocol.packets.PacketFactory;\nimport net.elytrium.limboapi.api.protocol.packets.data.MapData;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChangeGameStatePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChunkDataPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChunkUnloadPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.DefaultSpawnPositionPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.MapDataPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.PlayerAbilitiesPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.PositionRotationPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.SetExperiencePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.SetSlotPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.TimeUpdatePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.UpdateTagsPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.UpdateViewPositionPacket;\nimport net.elytrium.limboapi.server.world.SimpleTagManager;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic class PacketFactoryImpl implements PacketFactory {\n\n  @Override\n  public Object createChangeGameStatePacket(int reason, float value) {\n    return new ChangeGameStatePacket(reason, value);\n  }\n\n  @Override\n  public Object createChunkDataPacket(ChunkSnapshot chunkSnapshot, boolean legacySkyLight, int maxSections) {\n    return new ChunkDataPacket(chunkSnapshot, legacySkyLight, maxSections);\n  }\n\n  @Override\n  public Object createChunkDataPacket(ChunkSnapshot chunkSnapshot, Dimension dimension) {\n    return new ChunkDataPacket(chunkSnapshot, dimension.hasLegacySkyLight(), dimension.getMaxSections());\n  }\n\n  @Override\n  public Object createChunkUnloadPacket(int posX, int posZ) {\n    return new ChunkUnloadPacket(posX, posZ);\n  }\n\n  @Override\n  public Object createDefaultSpawnPositionPacket(int posX, int posY, int posZ, float angle) {\n    return new DefaultSpawnPositionPacket(Dimension.OVERWORLD.getKey(), posX, posY, posZ, angle, 0);\n  }\n\n  @Override\n  public Object createDefaultSpawnPositionPacket(String dimension, int posX, int posY, int posZ, float yaw, float pitch) {\n    return new DefaultSpawnPositionPacket(dimension, posX, posY, posZ, yaw, pitch);\n  }\n\n  @Override\n  public Object createMapDataPacket(int mapID, byte scale, MapData mapData) {\n    return new MapDataPacket(mapID, scale, mapData);\n  }\n\n  @Override\n  public Object createPlayerAbilitiesPacket(int flags, float flySpeed, float walkSpeed) {\n    return new PlayerAbilitiesPacket((byte) flags, flySpeed, walkSpeed);\n  }\n\n  @Override\n  public Object createPlayerAbilitiesPacket(byte flags, float flySpeed, float walkSpeed) {\n    return new PlayerAbilitiesPacket(flags, flySpeed, walkSpeed);\n  }\n\n  @Override\n  public Object createPositionRotationPacket(double posX, double posY, double posZ, float yaw, float pitch,\n      boolean onGround, int teleportID, boolean dismountVehicle) {\n    return new PositionRotationPacket(posX, posY, posZ, yaw, pitch, onGround, teleportID, dismountVehicle);\n  }\n\n  @Override\n  public Object createSetExperiencePacket(float expBar, int level, int totalExp) {\n    return new SetExperiencePacket(expBar, level, totalExp);\n  }\n\n  @Override\n  public Object createSetSlotPacket(int windowID, int slot, VirtualItem item, int count, int data, @Nullable CompoundBinaryTag nbt) {\n    return new SetSlotPacket(windowID, slot, item, count, data, nbt, null);\n  }\n\n  @Override\n  public Object createSetSlotPacket(int windowID, int slot, VirtualItem item, int count, int data, @Nullable ItemComponentMap map) {\n    return new SetSlotPacket(windowID, slot, item, count, data, null, map);\n  }\n\n  @Override\n  public Object createTimeUpdatePacket(long worldAge, long timeOfDay) {\n    return new TimeUpdatePacket(worldAge, timeOfDay);\n  }\n\n  @Override\n  public Object createUpdateViewPositionPacket(int posX, int posZ) {\n    return new UpdateViewPositionPacket(posX, posZ);\n  }\n\n  @Override\n  public Object createUpdateTagsPacket(WorldVersion version) {\n    return SimpleTagManager.getUpdateTagsPacket(version);\n  }\n\n  @Override\n  public Object createUpdateTagsPacket(ProtocolVersion version) {\n    return SimpleTagManager.getUpdateTagsPacket(version);\n  }\n\n  @Override\n  public Object createUpdateTagsPacket(Map<String, Map<String, List<Integer>>> tags) {\n    return new UpdateTagsPacket(tags);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/c2s/MoveOnGroundOnlyPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.c2s;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.server.LimboSessionHandlerImpl;\n\npublic class MoveOnGroundOnlyPacket implements MinecraftPacket {\n\n  private boolean onGround;\n  private boolean collideHorizontally;\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    if (protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n      this.onGround = buf.readBoolean();\n    } else {\n      int flags = buf.readUnsignedByte();\n      this.onGround = (flags & 1) != 0;\n      this.collideHorizontally = (flags & 2) != 0;\n    }\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof LimboSessionHandlerImpl) {\n      return ((LimboSessionHandlerImpl) handler).handle(this);\n    } else {\n      return true;\n    }\n  }\n\n  @Override\n  public int decodeExpectedMaxLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 1;\n  }\n\n  @Override\n  public int decodeExpectedMinLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 1;\n  }\n\n  @Override\n  public String toString() {\n    return \"Player{\"\n        + \"onGround=\" + this.onGround\n        + \", collideHorizontally=\" + this.collideHorizontally\n        + \"}\";\n  }\n\n  public boolean isOnGround() {\n    return this.onGround;\n  }\n\n  public boolean isCollideHorizontally() {\n    return this.collideHorizontally;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/c2s/MovePacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.c2s;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils.Direction;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.server.LimboSessionHandlerImpl;\n\npublic class MovePacket implements MinecraftPacket {\n\n  private double posX;\n  private double posY;\n  private double posZ;\n  private float yaw;\n  private float pitch;\n  private boolean onGround;\n  private boolean collideHorizontally;\n\n  @Override\n  public void decode(ByteBuf buf, Direction direction, ProtocolVersion protocolVersion) {\n    this.posX = buf.readDouble();\n    if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      buf.skipBytes(8);\n    }\n    this.posY = buf.readDouble();\n    this.posZ = buf.readDouble();\n    this.yaw = buf.readFloat();\n    this.pitch = buf.readFloat();\n\n    if (protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n      this.onGround = buf.readBoolean();\n    } else {\n      int flags = buf.readUnsignedByte();\n      this.onGround = (flags & 1) != 0;\n      this.collideHorizontally = (flags & 2) != 0;\n    }\n  }\n\n  @Override\n  public void encode(ByteBuf buf, Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof LimboSessionHandlerImpl) {\n      return ((LimboSessionHandlerImpl) handler).handle(this);\n    } else {\n      return true;\n    }\n  }\n\n  @Override\n  public int decodeExpectedMaxLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0 ? 41 : 33;\n  }\n\n  @Override\n  public int decodeExpectedMinLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 33;\n  }\n\n  @Override\n  public String toString() {\n    return \"PlayerPositionAndLook{\"\n        + \"posX=\" + this.posX\n        + \", posY=\" + this.posY\n        + \", posZ=\" + this.posZ\n        + \", yaw=\" + this.yaw\n        + \", pitch=\" + this.pitch\n        + \", onGround=\" + this.onGround\n        + \", collideHorizontally=\" + this.collideHorizontally\n        + \"}\";\n  }\n\n  public double getX() {\n    return this.posX;\n  }\n\n  public double getY() {\n    return this.posY;\n  }\n\n  public double getZ() {\n    return this.posZ;\n  }\n\n  public float getYaw() {\n    return this.yaw;\n  }\n\n  public float getPitch() {\n    return this.pitch;\n  }\n\n  public boolean isOnGround() {\n    return this.onGround;\n  }\n\n  public boolean isCollideHorizontally() {\n    return this.collideHorizontally;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/c2s/MovePositionOnlyPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.c2s;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.server.LimboSessionHandlerImpl;\n\npublic class MovePositionOnlyPacket implements MinecraftPacket {\n\n  private double posX;\n  private double posY;\n  private double posZ;\n  private boolean onGround;\n  private boolean collideHorizontally;\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    this.posX = buf.readDouble();\n    if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      buf.skipBytes(8);\n    }\n    this.posY = buf.readDouble();\n    this.posZ = buf.readDouble();\n\n    if (protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n      this.onGround = buf.readBoolean();\n    } else {\n      int flags = buf.readUnsignedByte();\n      this.onGround = (flags & 1) != 0;\n      this.collideHorizontally = (flags & 2) != 0;\n    }\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof LimboSessionHandlerImpl) {\n      return ((LimboSessionHandlerImpl) handler).handle(this);\n    } else {\n      return true;\n    }\n  }\n\n  @Override\n  public int decodeExpectedMaxLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0 ? 33 : 25;\n  }\n\n  @Override\n  public int decodeExpectedMinLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 25;\n  }\n\n  @Override\n  public String toString() {\n    return \"PlayerPosition{\"\n        + \"posX=\" + this.posX\n        + \", posY=\" + this.posY\n        + \", posZ=\" + this.posZ\n        + \", onGround=\" + this.onGround\n        + \", collideHorizontally=\" + this.collideHorizontally\n        + \"}\";\n  }\n\n  public double getX() {\n    return this.posX;\n  }\n\n  public double getY() {\n    return this.posY;\n  }\n\n  public double getZ() {\n    return this.posZ;\n  }\n\n  public boolean isOnGround() {\n    return this.onGround;\n  }\n\n  public boolean isCollideHorizontally() {\n    return this.collideHorizontally;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/c2s/MoveRotationOnlyPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.c2s;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils.Direction;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.server.LimboSessionHandlerImpl;\n\npublic class MoveRotationOnlyPacket implements MinecraftPacket {\n\n  private float yaw;\n  private float pitch;\n  private boolean onGround;\n  private boolean collideHorizontally;\n\n  @Override\n  public void decode(ByteBuf buf, Direction direction, ProtocolVersion protocolVersion) {\n    this.yaw = buf.readFloat();\n    this.pitch = buf.readFloat();\n\n    if (protocolVersion.lessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n      this.onGround = buf.readBoolean();\n    } else {\n      int flags = buf.readUnsignedByte();\n      this.onGround = (flags & 1) != 0;\n      this.collideHorizontally = (flags & 2) != 0;\n    }\n  }\n\n  @Override\n  public void encode(ByteBuf buf, Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof LimboSessionHandlerImpl) {\n      return ((LimboSessionHandlerImpl) handler).handle(this);\n    } else {\n      return true;\n    }\n  }\n\n  @Override\n  public int decodeExpectedMaxLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 9;\n  }\n\n  @Override\n  public int decodeExpectedMinLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 9;\n  }\n\n  @Override\n  public String toString() {\n    return \"PlayerLook{\"\n        + \", yaw=\" + this.yaw\n        + \", pitch=\" + this.pitch\n        + \", onGround=\" + this.onGround\n        + \", collideHorizontally=\" + this.collideHorizontally\n        + \"}\";\n  }\n\n  public float getYaw() {\n    return this.yaw;\n  }\n\n  public float getPitch() {\n    return this.pitch;\n  }\n\n  public boolean isOnGround() {\n    return this.onGround;\n  }\n\n  public boolean isCollideHorizontally() {\n    return this.collideHorizontally;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/c2s/PlayerChatSessionPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.c2s;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.proxy.crypto.IdentifiedKey;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.UUID;\nimport net.elytrium.limboapi.Settings;\n\n@SuppressWarnings(\"unused\")\npublic class PlayerChatSessionPacket implements MinecraftPacket {\n\n  private UUID holderId;\n  private IdentifiedKey playerKey;\n\n  @Override\n  public void decode(ByteBuf byteBuf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    this.holderId = ProtocolUtils.readUuid(byteBuf);\n    this.playerKey = ProtocolUtils.readPlayerKey(protocolVersion, byteBuf);\n  }\n\n  @Override\n  public void encode(ByteBuf byteBuf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    ProtocolUtils.writeUuid(byteBuf, this.holderId);\n    ProtocolUtils.writePlayerKey(byteBuf, this.playerKey);\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler minecraftSessionHandler) {\n    // LimboAPI hook - skip server-side signature verification if enabled\n    if (minecraftSessionHandler instanceof ClientPlaySessionHandler) {\n      return Settings.IMP.MAIN.FORCE_DISABLE_MODERN_CHAT_SIGNING;\n    }\n\n    return false;\n  }\n\n  public UUID getHolderId() {\n    return this.holderId;\n  }\n\n  public void setHolderId(UUID holderId) {\n    this.holderId = holderId;\n  }\n\n  public IdentifiedKey getPlayerKey() {\n    return this.playerKey;\n  }\n\n  public void setPlayerKey(IdentifiedKey playerKey) {\n    this.playerKey = playerKey;\n  }\n\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/c2s/TeleportConfirmPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.c2s;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.server.LimboSessionHandlerImpl;\n\npublic class TeleportConfirmPacket implements MinecraftPacket {\n\n  private int teleportID;\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    this.teleportID = ProtocolUtils.readVarInt(buf);\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    if (handler instanceof LimboSessionHandlerImpl) {\n      return ((LimboSessionHandlerImpl) handler).handle(this);\n    } else {\n      return true;\n    }\n  }\n\n  @Override\n  public int decodeExpectedMaxLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 5;\n  }\n\n  @Override\n  public int decodeExpectedMinLength(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    return 1;\n  }\n\n  @Override\n  public String toString() {\n    return \"TeleportConfirm{\"\n        + \"teleportID=\" + this.teleportID\n        + \"}\";\n  }\n\n  public int getTeleportID() {\n    return this.teleportID;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/ChangeGameStatePacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class ChangeGameStatePacket implements MinecraftPacket {\n\n  private final int reason;\n  private final float value;\n\n  // TODO: Reasons enum or builder.\n  public ChangeGameStatePacket(int reason, float value) {\n    this.reason = reason;\n    this.value = value;\n  }\n\n  public ChangeGameStatePacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    buf.writeByte(this.reason);\n    buf.writeFloat(this.value);\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"ChangeGameState{\"\n        + \"reason=\" + this.reason\n        + \", value=\" + this.value\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/ChunkDataPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.google.common.base.Preconditions;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils.Direction;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.buffer.Unpooled;\nimport java.util.BitSet;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.zip.Deflater;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\nimport net.elytrium.limboapi.api.chunk.data.ChunkSnapshot;\nimport net.elytrium.limboapi.api.chunk.data.LightSection;\nimport net.elytrium.limboapi.api.chunk.util.CompactStorage;\nimport net.elytrium.limboapi.api.material.Block;\nimport net.elytrium.limboapi.api.protocol.packets.data.BiomeData;\nimport net.elytrium.limboapi.material.Biome;\nimport net.elytrium.limboapi.mcprotocollib.BitStorage116;\nimport net.elytrium.limboapi.mcprotocollib.BitStorage19;\nimport net.elytrium.limboapi.protocol.util.NetworkSection;\nimport net.kyori.adventure.nbt.BinaryTag;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport net.kyori.adventure.nbt.LongArrayBinaryTag;\n\npublic class ChunkDataPacket implements MinecraftPacket {\n\n  private final ChunkSnapshot chunk;\n  private final NetworkSection[] sections;\n  private final int mask;\n  private final int maxSections;\n  private final int nonNullSections;\n  private final BiomeData biomeData;\n  private final CompoundBinaryTag heightmap114;\n  private final CompoundBinaryTag heightmap116;\n  private final Map<Integer, long[]> heightmap1215;\n\n  public ChunkDataPacket(ChunkSnapshot chunkSnapshot, boolean hasLegacySkyLight, int maxSections) {\n    this.maxSections = maxSections;\n    this.sections = new NetworkSection[maxSections];\n\n    this.chunk = chunkSnapshot;\n    int mask = 0;\n    int nonNullSections = 0;\n    for (int i = 0; i < this.chunk.getSections().length; ++i) {\n      if (this.chunk.getSections()[i] != null) {\n        ++nonNullSections;\n        mask |= 1 << i;\n        LightSection light = this.chunk.getLight()[i];\n        NetworkSection section = new NetworkSection(\n            i,\n            this.chunk.getSections()[i],\n            light.getBlockLight(),\n            hasLegacySkyLight ? light.getSkyLight() : null,\n            this.chunk.getBiomes()\n        );\n        this.sections[i] = section;\n      }\n    }\n\n    this.nonNullSections = nonNullSections;\n    this.mask = mask;\n    this.heightmap114 = this.createHeightMap(true);\n    this.heightmap116 = this.createHeightMap(false);\n    this.heightmap1215 = new HashMap<>();\n    for (Map.Entry<String, ? extends BinaryTag> entry : this.heightmap116) {\n      this.heightmap1215.put(this.findHeightMapId(entry.getKey()), ((LongArrayBinaryTag) entry.getValue()).value());\n    }\n\n    this.biomeData = new BiomeData(this.chunk);\n  }\n\n  private int findHeightMapId(String key) {\n    return switch (key) {\n      case \"WORLD_SURFACE\" -> 1; /* taken from minecraft decompiled source code */\n      case \"MOTION_BLOCKING\" -> 4; /* taken from minecraft decompiled source code */\n      default -> throw new IllegalArgumentException(\"Unsupported heightmap: \" + key);\n    };\n  }\n\n  public ChunkDataPacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, Direction direction, ProtocolVersion version) {\n    if (!this.chunk.isFullChunk()) {\n      // 1.17 supports only full chunks.\n      Preconditions.checkState(version.compareTo(ProtocolVersion.MINECRAFT_1_17) < 0);\n    }\n\n    buf.writeInt(this.chunk.getPosX());\n    buf.writeInt(this.chunk.getPosZ());\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0) {\n      // 1.17 mask.\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_17_1) <= 0) {\n        long[] mask = this.create117Mask();\n        ProtocolUtils.writeVarInt(buf, mask.length);\n        for (long l : mask) {\n          buf.writeLong(l);\n        }\n      }\n    } else {\n      buf.writeBoolean(this.chunk.isFullChunk());\n\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_16) >= 0 && version.compareTo(ProtocolVersion.MINECRAFT_1_16_2) < 0) {\n        buf.writeBoolean(true); // Ignore old data.\n      }\n\n      // Mask.\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_8) > 0) {\n        ProtocolUtils.writeVarInt(buf, this.mask);\n      } else {\n        // OptiFine devs have over-optimized the chunk loading by breaking loading of void-chunks.\n        // We are changing void-chunks length here, and OptiFine client thinks that the chunk is not void-alike.\n        buf.writeShort(this.mask == 0 ? 1 : this.mask);\n      }\n    }\n\n    // 1.14+ heightMap.\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_14) >= 0) {\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_16) < 0) {\n        ProtocolUtils.writeBinaryTag(buf, version, this.heightmap114);\n      } else if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_5) < 0) {\n        ProtocolUtils.writeBinaryTag(buf, version, this.heightmap116);\n      } else {\n        ProtocolUtils.writeVarInt(buf, this.heightmap1215.size());\n        for (Map.Entry<Integer, long[]> entry : this.heightmap1215.entrySet()) {\n          ProtocolUtils.writeVarInt(buf, entry.getKey());\n          ProtocolUtils.writeVarInt(buf, entry.getValue().length);\n          for (long l : entry.getValue()) {\n            buf.writeLong(l);\n          }\n        }\n      }\n    }\n\n    // 1.15 - 1.17 biomes.\n    if (this.chunk.isFullChunk() && version.compareTo(ProtocolVersion.MINECRAFT_1_15) >= 0 && version.compareTo(ProtocolVersion.MINECRAFT_1_17_1) <= 0) {\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_16_2) >= 0) {\n        ProtocolUtils.writeVarInt(buf, this.biomeData.getPost115Biomes().length);\n        for (int b : this.biomeData.getPost115Biomes()) {\n          ProtocolUtils.writeVarInt(buf, b);\n        }\n      } else {\n        for (int b : this.biomeData.getPost115Biomes()) {\n          buf.writeInt(b);\n        }\n      }\n    }\n\n    ByteBuf data = this.createChunkData(version);\n    try {\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_8) >= 0) {\n        ProtocolUtils.writeVarInt(buf, data.readableBytes());\n        buf.writeBytes(data);\n        if (version.compareTo(ProtocolVersion.MINECRAFT_1_9_4) >= 0) {\n          List<VirtualBlockEntity.Entry> blockEntityEntries = this.chunk.getBlockEntityEntries();\n          ProtocolUtils.writeVarInt(buf, blockEntityEntries.size());\n          for (VirtualBlockEntity.Entry blockEntityEntry : blockEntityEntries) {\n            CompoundBinaryTag blockEntityNbt = blockEntityEntry.getNbt();\n            if (version.compareTo(ProtocolVersion.MINECRAFT_1_18) >= 0) {\n              buf.writeByte(((blockEntityEntry.getPosX() & 15) << 4) | (blockEntityEntry.getPosZ() & 15));\n              buf.writeShort(blockEntityEntry.getPosY());\n              ProtocolUtils.writeVarInt(buf, blockEntityEntry.getID(version));\n            } else {\n              blockEntityNbt.putString(\"id\", blockEntityEntry.getBlockEntity().getModernID());\n              blockEntityNbt.putInt(\"x\", blockEntityEntry.getPosX());\n              blockEntityNbt.putInt(\"y\", blockEntityEntry.getPosY());\n              blockEntityNbt.putInt(\"z\", blockEntityEntry.getPosZ());\n            }\n\n            ProtocolUtils.writeBinaryTag(buf, version, blockEntityNbt);\n          }\n        }\n        if (version.compareTo(ProtocolVersion.MINECRAFT_1_17_1) > 0) {\n          long[] mask = this.create117Mask();\n          if (version.compareTo(ProtocolVersion.MINECRAFT_1_20) < 0) {\n            buf.writeBoolean(true); // Trust edges.\n          }\n          ProtocolUtils.writeVarInt(buf, mask.length); // Skylight mask.\n          for (long m : mask) {\n            buf.writeLong(m);\n          }\n          ProtocolUtils.writeVarInt(buf, mask.length); // BlockLight mask.\n          for (long m : mask) {\n            buf.writeLong(m);\n          }\n          ProtocolUtils.writeVarInt(buf, 0); // EmptySkylight mask.\n          ProtocolUtils.writeVarInt(buf, 0); // EmptyBlockLight mask.\n          ProtocolUtils.writeVarInt(buf, this.chunk.getLight().length);\n          for (LightSection section : this.chunk.getLight()) {\n            ProtocolUtils.writeByteArray(buf, section.getSkyLight().getData());\n          }\n          ProtocolUtils.writeVarInt(buf, this.chunk.getLight().length);\n          for (LightSection section : this.chunk.getLight()) {\n            ProtocolUtils.writeByteArray(buf, section.getBlockLight().getData());\n          }\n        }\n      } else {\n        this.write17(buf, data);\n      }\n    } finally {\n      data.release();\n    }\n  }\n\n  private ByteBuf createChunkData(ProtocolVersion version) {\n    int dataLength = 0;\n    for (NetworkSection networkSection : this.sections) {\n      if (networkSection != null) {\n        dataLength += networkSection.getDataLength(version);\n      }\n    }\n    if (this.chunk.isFullChunk() && version.compareTo(ProtocolVersion.MINECRAFT_1_15) < 0) {\n      dataLength += (version.compareTo(ProtocolVersion.MINECRAFT_1_13) < 0 ? 256 : 256 * 4);\n    }\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_18) >= 0) {\n      int emptySectionSize = version.noLessThan(ProtocolVersion.MINECRAFT_26_1) ? 8\n          : (version.noLessThan(ProtocolVersion.MINECRAFT_1_21_5) ? 6 : 8);\n      dataLength += (this.maxSections - this.nonNullSections) * emptySectionSize;\n    }\n\n    ByteBuf data = Unpooled.buffer(dataLength);\n    for (int pass = 0; pass < 4; ++pass) {\n      for (NetworkSection section : this.sections) {\n        if (section != null) {\n          section.writeData(data, pass, version);\n        } else if (pass == 0 && version.compareTo(ProtocolVersion.MINECRAFT_1_18) >= 0) {\n          data.writeShort(0); // Block count = 0.\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            data.writeShort(0); // Fluid count = 0.\n          }\n          data.writeByte(0); // BlockStorage: 0 bit per entry = Single palette.\n          ProtocolUtils.writeVarInt(data, Block.AIR.getID()); // Only air block in the palette.\n          if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_5) < 0) {\n            ProtocolUtils.writeVarInt(data, 0); // BlockStorage: 0 entries.\n          }\n\n          data.writeByte(0); // BiomeStorage: 0 bit per entry = Single palette.\n          ProtocolUtils.writeVarInt(data, Biome.PLAINS.getID()); // Only Plain biome in the palette.\n          if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_5) < 0) {\n            ProtocolUtils.writeVarInt(data, 0); // BiomeStorage: 0 entries.\n          }\n        }\n      }\n    }\n    if (this.chunk.isFullChunk() && version.compareTo(ProtocolVersion.MINECRAFT_1_15) < 0) {\n      for (byte b : this.biomeData.getPre115Biomes()) {\n        if (version.compareTo(ProtocolVersion.MINECRAFT_1_13) < 0) {\n          data.writeByte(b);\n        } else {\n          data.writeInt(b);\n        }\n      }\n    }\n\n    if (dataLength != data.readableBytes()) {\n      LimboAPI.getLogger().warn(\"Data length mismatch: \" + dataLength + \" != \" + data.readableBytes() + \". Version: \" + version);\n    }\n\n    return data;\n  }\n\n  private CompoundBinaryTag createHeightMap(boolean pre116) {\n    CompactStorage surface = pre116 ? new BitStorage19(9, 256) : new BitStorage116(9, 256);\n    CompactStorage motionBlocking = pre116 ? new BitStorage19(9, 256) : new BitStorage116(9, 256);\n\n    for (int posY = 0; posY < 256; ++posY) {\n      for (int posX = 0; posX < 16; ++posX) {\n        for (int posZ = 0; posZ < 16; ++posZ) {\n          VirtualBlock block = this.chunk.getBlock(posX, posY, posZ);\n          if (!block.isAir()) {\n            surface.set(posX + (posZ << 4), posY + 1);\n          }\n          if (block.isMotionBlocking()) {\n            motionBlocking.set(posX + (posZ << 4), posY + 1);\n          }\n        }\n      }\n    }\n\n    return CompoundBinaryTag.builder()\n        .putLongArray(\"MOTION_BLOCKING\", motionBlocking.getData())\n        .putLongArray(\"WORLD_SURFACE\", surface.getData())\n        .build();\n  }\n\n  private long[] create117Mask() {\n    return BitSet.valueOf(\n        new long[] {\n            this.mask\n        }\n    ).toLongArray();\n  }\n\n  // TODO: Use velocity compressor.\n  private void write17(ByteBuf out, ByteBuf data) {\n    out.writeShort(0); // Extended bitmask.\n    byte[] uncompressed = new byte[data.readableBytes()];\n    data.readBytes(uncompressed);\n    ByteBuf compressed = Unpooled.buffer();\n    Deflater deflater = new Deflater(9);\n    try {\n      deflater.setInput(uncompressed);\n      deflater.finish();\n      byte[] buffer = new byte[1024];\n      while (!deflater.finished()) {\n        int count = deflater.deflate(buffer);\n        compressed.writeBytes(buffer, 0, count);\n      }\n      out.writeInt(compressed.readableBytes()); // Compressed size.\n      out.writeBytes(compressed);\n    } finally {\n      deflater.end();\n      compressed.release();\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/ChunkUnloadPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic record ChunkUnloadPacket(int posX, int posZ) implements MinecraftPacket {\n\n  public ChunkUnloadPacket() {\n    this(0, 0);\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    buf.writeLong(protocolVersion.noGreaterThan(ProtocolVersion.MINECRAFT_1_20)\n        ? (((long) this.posX & 0xFFFFFFFFL) << 32 | (long) this.posZ & 0xFFFFFFFFL)\n        : (((long) this.posZ & 0xFFFFFFFFL) << 32 | (long) this.posX & 0xFFFFFFFFL) // >=1.20.2\n    );\n    if (protocolVersion.noGreaterThan(ProtocolVersion.MINECRAFT_1_8)) {\n      // essentially, it's ChunkData, but written in a way that the chunk gets unloaded\n      buf.writeBoolean(true);\n      buf.writeShort(0);\n      if (protocolVersion == ProtocolVersion.MINECRAFT_1_8) {\n        ProtocolUtils.writeVarInt(buf, 0);\n      } else {\n        buf.writeShort(0);\n        buf.writeInt(0);\n      }\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    throw new IllegalStateException();\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/DefaultSpawnPositionPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class DefaultSpawnPositionPacket implements MinecraftPacket {\n\n  private final String dimension;\n  private final int posX;\n  private final int posY;\n  private final int posZ;\n  private final float yaw;\n  private final float pitch;\n\n  public DefaultSpawnPositionPacket(String dimension, int posX, int posY, int posZ, float yaw, float pitch) {\n    this.dimension = dimension;\n    this.posX = posX;\n    this.posY = posY;\n    this.posZ = posZ;\n    this.yaw = yaw;\n    this.pitch = pitch;\n  }\n\n  public DefaultSpawnPositionPacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    if (protocolVersion.noLessThan(ProtocolVersion.MINECRAFT_1_21_9)) {\n      ProtocolUtils.writeString(buf, this.dimension);\n      buf.writeLong(((this.posX & 0x3FFFFFFL) << 38) | ((this.posZ & 0x3FFFFFFL) << 12) | (this.posY & 0xFFFL));\n      buf.writeFloat(this.yaw);\n      buf.writeFloat(this.pitch);\n    } else if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      buf.writeInt(this.posX);\n      buf.writeInt(this.posY);\n      buf.writeInt(this.posZ);\n    } else {\n      long location;\n      if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_14) < 0) {\n        location = ((this.posX & 0x3FFFFFFL) << 38) | ((this.posY & 0xFFFL) << 26) | (this.posZ & 0x3FFFFFFL);\n      } else {\n        location = ((this.posX & 0x3FFFFFFL) << 38) | ((this.posZ & 0x3FFFFFFL) << 12) | (this.posY & 0xFFFL);\n      }\n\n      buf.writeLong(location);\n\n      if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0) {\n        buf.writeFloat(this.yaw);\n      }\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"DefaultSpawnPositionPacket{\"\n        + \"dimension='\" + this.dimension + '\\''\n        + \", posX=\" + this.posX\n        + \", posY=\" + this.posY\n        + \", posZ=\" + this.posZ\n        + \", yaw=\" + this.yaw\n        + \", pitch=\" + this.pitch\n        + '}';\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/MapDataPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.api.protocol.packets.data.MapData;\n\npublic class MapDataPacket implements MinecraftPacket {\n\n  private final int mapID;\n  private final byte scale;\n  private final MapData mapData;\n\n  public MapDataPacket(int mapID, byte scale, MapData mapData) {\n    this.mapID = mapID;\n    this.scale = scale;\n    this.mapData = mapData;\n  }\n\n  public MapDataPacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    ProtocolUtils.writeVarInt(buf, this.mapID);\n    byte[] data = this.mapData.getData();\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      buf.writeShort(data.length + 3);\n      buf.writeByte(0);\n      buf.writeByte(this.mapData.getX());\n      buf.writeByte(this.mapData.getY());\n\n      buf.writeBytes(data);\n    } else {\n      buf.writeByte(this.scale);\n\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_9) >= 0 && version.compareTo(ProtocolVersion.MINECRAFT_1_17) < 0) {\n        buf.writeBoolean(false);\n      }\n\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_14) >= 0) {\n        buf.writeBoolean(false);\n      }\n\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0) {\n        buf.writeBoolean(false);\n      } else {\n        ProtocolUtils.writeVarInt(buf, 0);\n      }\n\n      buf.writeByte(this.mapData.getColumns());\n      buf.writeByte(this.mapData.getRows());\n      buf.writeByte(this.mapData.getX());\n      buf.writeByte(this.mapData.getY());\n\n      ProtocolUtils.writeByteArray(buf, data);\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"MapDataPacket{\"\n        + \"mapID=\" + this.mapID\n        + \", scale=\" + this.scale\n        + \", mapData=\" + this.mapData\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/PlayerAbilitiesPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class PlayerAbilitiesPacket implements MinecraftPacket {\n\n  private final byte flags;\n  private final float walkSpeed;\n  private final float flySpeed;\n\n  public PlayerAbilitiesPacket(byte flags, float flySpeed, float walkSpeed) {\n    this.flags = flags;\n    this.flySpeed = flySpeed;\n    this.walkSpeed = walkSpeed;\n  }\n\n  public PlayerAbilitiesPacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    buf.writeByte(this.flags);\n    buf.writeFloat(this.flySpeed);\n    buf.writeFloat(this.walkSpeed);\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"PlayerAbilities{\"\n        + \"flags=\" + this.flags\n        + \", flySpeed=\" + this.flySpeed\n        + \", walkSpeed=\" + this.walkSpeed\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/PositionRotationPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class PositionRotationPacket implements MinecraftPacket {\n\n  private final double posX;\n  private final double posY;\n  private final double posZ;\n  private final float yaw;\n  private final float pitch;\n  private final boolean onGround;\n  private final int teleportID;\n  private final boolean dismountVehicle;\n\n  @Deprecated(forRemoval = true)\n  public PositionRotationPacket(double posX, double posY, double posZ, float yaw, float pitch, int teleportID, boolean onGround, boolean dismountVehicle) {\n    this(posX, posY, posZ, yaw, pitch, onGround, teleportID, dismountVehicle);\n  }\n\n  public PositionRotationPacket(double posX, double posY, double posZ, float yaw, float pitch, boolean onGround, int teleportID, boolean dismountVehicle) {\n    this.posX = posX;\n    this.posY = posY;\n    this.posZ = posZ;\n    this.yaw = yaw;\n    this.pitch = pitch;\n    this.onGround = onGround;\n    this.teleportID = teleportID;\n    this.dismountVehicle = dismountVehicle;\n  }\n\n  public PositionRotationPacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    if (protocolVersion.noLessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n      this.encodeModern(buf, protocolVersion);\n    } else {\n      this.encodeLegacy(buf, protocolVersion);\n    }\n  }\n\n  public void encodeModern(ByteBuf buf, ProtocolVersion protocolVersion) {\n    ProtocolUtils.writeVarInt(buf, this.teleportID);\n\n    buf.writeDouble(this.posX);\n    buf.writeDouble(this.posY);\n    buf.writeDouble(this.posZ);\n\n    // velocity\n    buf.writeDouble(0);\n    buf.writeDouble(0);\n    buf.writeDouble(0);\n\n    buf.writeFloat(this.yaw);\n    buf.writeFloat(this.pitch);\n\n    buf.writeInt(0); // not relative\n  }\n\n  public void encodeLegacy(ByteBuf buf, ProtocolVersion protocolVersion) {\n    buf.writeDouble(this.posX);\n    buf.writeDouble(this.posY);\n    buf.writeDouble(this.posZ);\n    buf.writeFloat(this.yaw);\n    buf.writeFloat(this.pitch);\n\n    if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      buf.writeBoolean(this.onGround);\n    } else {\n      buf.writeByte(0x00); // Flags.\n\n      if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_9) >= 0) {\n        ProtocolUtils.writeVarInt(buf, this.teleportID);\n      }\n\n      if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0 && protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_19_3) <= 0) {\n        buf.writeBoolean(this.dismountVehicle);\n      }\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"PlayerPositionAndLook{\"\n        + \"posX=\" + this.posX\n        + \", posY=\" + this.posY\n        + \", posZ=\" + this.posZ\n        + \", yaw=\" + this.yaw\n        + \", pitch=\" + this.pitch\n        + \", teleportID=\" + this.teleportID\n        + \", onGround=\" + this.onGround\n        + \", dismountVehicle=\" + this.dismountVehicle\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/SetExperiencePacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class SetExperiencePacket implements MinecraftPacket {\n\n  private final float expBar;\n  private final int level;\n  private final int totalExp;\n\n  public SetExperiencePacket(float expBar, int level, int totalExp) {\n    this.expBar = expBar;\n    this.level = level;\n    this.totalExp = totalExp;\n  }\n\n  public SetExperiencePacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    buf.writeFloat(this.expBar);\n    if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      buf.writeShort(this.level);\n      buf.writeShort(this.totalExp);\n    } else {\n      ProtocolUtils.writeVarInt(buf, this.level);\n      ProtocolUtils.writeVarInt(buf, this.totalExp);\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"SetExperience{\"\n        + \"expBar=\" + this.expBar\n        + \", level=\" + this.level\n        + \", totalExp=\" + this.totalExp\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/SetSlotPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.elytrium.limboapi.utils.ProtocolTools;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic class SetSlotPacket implements MinecraftPacket {\n\n  private final int windowID;\n  private final int slot;\n  private final VirtualItem item;\n  private final int count;\n  private final int data;\n  @Nullable\n  private final CompoundBinaryTag nbt;\n  @Nullable\n  private final ItemComponentMap map;\n\n  public SetSlotPacket(int windowID, int slot, VirtualItem item, int count, int data,\n      @Nullable CompoundBinaryTag nbt, @Nullable ItemComponentMap map) {\n    this.windowID = windowID;\n    this.slot = slot;\n    this.item = item;\n    this.count = count;\n    this.data = data;\n    this.nbt = nbt;\n    this.map = map;\n  }\n\n  public SetSlotPacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_20_5) >= 0) {\n      this.encodeModern(buf, direction, protocolVersion);\n    } else {\n      this.encodeLegacy(buf, direction, protocolVersion);\n    }\n  }\n\n  public void encodeModern(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    ProtocolTools.writeContainerId(buf, protocolVersion, this.windowID);\n    ProtocolUtils.writeVarInt(buf, 0);\n    buf.writeShort(this.slot);\n\n    int id = this.item.getID(protocolVersion);\n    if (id == 0) {\n      ProtocolUtils.writeVarInt(buf, 0);\n    } else {\n      ProtocolUtils.writeVarInt(buf, this.count);\n      ProtocolUtils.writeVarInt(buf, id);\n\n      if (this.map != null) {\n        this.map.write(protocolVersion, buf);\n      } else {\n        ProtocolUtils.writeVarInt(buf, 0);\n        ProtocolUtils.writeVarInt(buf, 0);\n      }\n    }\n  }\n\n  public void encodeLegacy(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    buf.writeByte(this.windowID);\n\n    if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_17_1) >= 0) {\n      ProtocolUtils.writeVarInt(buf, 0); // State ID.\n    }\n\n    buf.writeShort(this.slot);\n    int id = this.item.getID(protocolVersion);\n    boolean present = id > 0;\n\n    if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_13_2) >= 0) {\n      buf.writeBoolean(present);\n    }\n\n    if (!present && protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_13_2) < 0) {\n      buf.writeShort(-1);\n    }\n\n    if (present) {\n      if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_13_2) < 0) {\n        buf.writeShort(id);\n      } else {\n        ProtocolUtils.writeVarInt(buf, id);\n      }\n      buf.writeByte(this.count);\n      if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_13) < 0) {\n        buf.writeShort(this.data);\n      }\n\n      if (this.nbt == null) {\n        if (protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n          buf.writeShort(-1);\n        } else {\n          buf.writeByte(0);\n        }\n      } else {\n        ProtocolUtils.writeBinaryTag(buf, protocolVersion, this.nbt);\n      }\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"SetSlot{\"\n        + \"windowID=\" + this.windowID\n        + \", slot=\" + this.slot\n        + \", count=\" + this.count\n        + \", data=\" + this.data\n        + \", nbt=\" + this.nbt\n        + \")\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/TimeUpdatePacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class TimeUpdatePacket implements MinecraftPacket {\n\n  private final long worldAge;\n  private final long timeOfDay;\n\n  public TimeUpdatePacket(long worldAge, long timeOfDay) {\n    this.worldAge = worldAge;\n    this.timeOfDay = timeOfDay;\n  }\n\n  public TimeUpdatePacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    buf.writeLong(this.worldAge);\n    if (protocolVersion.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n      ProtocolUtils.writeVarInt(buf, 1); // map size\n      ProtocolUtils.writeVarInt(buf, 0); // overworld\n      buf.writeLong(this.timeOfDay);\n      buf.writeBoolean(false); // no ticking\n    } else {\n      buf.writeLong(this.timeOfDay);\n\n      if (protocolVersion.noLessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n        buf.writeBoolean(false); // no ticking\n      }\n    }\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"TimeUpdatePacket{\"\n        + \"worldAge=\" + this.worldAge\n        + \", timeOfDay=\" + this.timeOfDay\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/UpdateTagsPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\n\npublic class UpdateTagsPacket implements MinecraftPacket {\n\n  private final Map<String, Map<String, List<Integer>>> tags;\n\n  public UpdateTagsPacket() {\n    throw new IllegalStateException();\n  }\n\n  public UpdateTagsPacket(Map<String, Map<String, List<Integer>>> tags) {\n    this.tags = tags;\n  }\n\n  public Map<String, Map<String, int[]>> toVelocityTags() {\n    Map<String, Map<String, int[]>> newTags = new LinkedHashMap<>();\n    for (Entry<String, Map<String, List<Integer>>> entry : this.tags.entrySet()) {\n      Map<String, int[]> tagRegistry = new LinkedHashMap<>();\n\n      for (Entry<String, List<Integer>> tagEntry : entry.getValue().entrySet()) {\n        tagRegistry.put(tagEntry.getKey(),\n            tagEntry.getValue().stream().mapToInt(Integer::intValue).toArray());\n      }\n\n      newTags.put(entry.getKey(), tagRegistry);\n    }\n\n    return newTags;\n  }\n\n  @Override\n  public void decode(ByteBuf byteBuf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0) {\n      ProtocolUtils.writeVarInt(buf, this.tags.size());\n      this.tags.forEach((tagType, tagList) -> {\n        ProtocolUtils.writeString(buf, tagType);\n        writeTagList(buf, tagList);\n      });\n    } else {\n      writeTagList(buf, this.tags.get(\"minecraft:block\"));\n      writeTagList(buf, this.tags.get(\"minecraft:item\"));\n      writeTagList(buf, this.tags.get(\"minecraft:fluid\"));\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_14) >= 0) {\n        writeTagList(buf, this.tags.get(\"minecraft:entity_type\"));\n      }\n    }\n  }\n\n  private static void writeTagList(ByteBuf buf, Map<String, List<Integer>> tagList) {\n    ProtocolUtils.writeVarInt(buf, tagList.size());\n    tagList.forEach((tagId, blockList) -> {\n      ProtocolUtils.writeString(buf, tagId);\n      ProtocolUtils.writeVarInt(buf, blockList.size());\n      blockList.forEach(blockId -> ProtocolUtils.writeVarInt(buf, blockId));\n    });\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/packets/s2c/UpdateViewPositionPacket.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.packets.s2c;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class UpdateViewPositionPacket implements MinecraftPacket {\n\n  private final int posX;\n  private final int posZ;\n\n  public UpdateViewPositionPacket(int posX, int posZ) {\n    this.posX = posX;\n    this.posZ = posZ;\n  }\n\n  public UpdateViewPositionPacket() {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    throw new IllegalStateException();\n  }\n\n  @Override\n  public void encode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion protocolVersion) {\n    ProtocolUtils.writeVarInt(buf, this.posX);\n    ProtocolUtils.writeVarInt(buf, this.posZ);\n  }\n\n  @Override\n  public boolean handle(MinecraftSessionHandler handler) {\n    return true;\n  }\n\n  @Override\n  public String toString() {\n    return \"UpdateViewPosition{\"\n        + \"posX=\" + this.posX\n        + \", posZ=\" + this.posZ\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/protocol/util/NetworkSection.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.protocol.util;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.buffer.ByteBuf;\nimport java.util.EnumMap;\nimport java.util.Map;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.data.BlockSection;\nimport net.elytrium.limboapi.api.chunk.data.BlockStorage;\nimport net.elytrium.limboapi.api.mcprotocollib.NibbleArray3D;\nimport net.elytrium.limboapi.protocol.data.BiomeStorage118;\nimport net.elytrium.limboapi.protocol.data.BlockStorage17;\nimport net.elytrium.limboapi.protocol.data.BlockStorage19;\nimport net.elytrium.limboapi.server.world.chunk.SimpleChunk;\n\npublic class NetworkSection {\n\n  private final Map<ProtocolVersion, BlockStorage> storages = new EnumMap<>(ProtocolVersion.class);\n  private final Map<ProtocolVersion, BiomeStorage118> biomeStorages = new EnumMap<>(ProtocolVersion.class);\n  private final NibbleArray3D blockLight;\n  private final NibbleArray3D skyLight;\n  private final BlockSection section;\n  private final VirtualBiome[] biomes;\n  private final int index;\n\n  private int blockCount = -1;\n  private int fluidCount = -1;\n\n  public NetworkSection(int index, BlockSection section, NibbleArray3D blockLight, NibbleArray3D skyLight, VirtualBiome[] biomes) {\n    this.index = index;\n    this.section = section;\n    this.blockLight = blockLight;\n    this.skyLight = skyLight;\n    this.biomes = biomes;\n  }\n\n  public int getDataLength(ProtocolVersion version) {\n    int dataLength = this.ensureStorageCreated(version).getDataLength(version);\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_14) < 0) {\n      dataLength += this.blockLight.getData().length;\n      if (this.skyLight != null) {\n        dataLength += this.skyLight.getData().length;\n      }\n    }\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_14) >= 0) {\n      dataLength += 2; // Block count short.\n    }\n    if (version.compareTo(ProtocolVersion.MINECRAFT_26_1) >= 0) {\n      dataLength += 2; // Fluid count short.\n    }\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_17_1) > 0) {\n      dataLength += this.ensure118BiomeCreated(version).getDataLength(version);\n    }\n\n    return dataLength;\n  }\n\n  public void writeData(ByteBuf buf, int pass, ProtocolVersion version) {\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_9) < 0) {\n      BlockStorage storage = this.ensureStorageCreated(version);\n      this.write17Data(buf, storage, version, pass);\n    } else if (pass == 0) {\n      BlockStorage storage = this.ensureStorageCreated(version);\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_14) < 0) {\n        this.write19Data(buf, storage, version, pass);\n      } else {\n        this.write114Data(buf, storage, version, pass);\n\n        if (version.compareTo(ProtocolVersion.MINECRAFT_1_17_1) > 0) {\n          this.write118Biomes(buf, version);\n        }\n      }\n    }\n  }\n\n  private BlockStorage ensureStorageCreated(ProtocolVersion version) {\n    BlockStorage storage = this.storages.get(version);\n    if (storage == null) {\n      synchronized (this.storages) {\n        BlockStorage blockStorage = this.createStorage(version);\n        this.fillBlocks(blockStorage);\n        this.storages.put(version, blockStorage);\n        storage = blockStorage;\n      }\n    }\n\n    return storage;\n  }\n\n  private BlockStorage createStorage(ProtocolVersion version) {\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_9) < 0) {\n      return new BlockStorage17();\n    } else {\n      return new BlockStorage19(version);\n    }\n  }\n\n  private void write17Data(ByteBuf buf, BlockStorage storage, ProtocolVersion version, int pass) {\n    if (pass == 0 || pass == 1) {\n      storage.write(buf, version, pass);\n    } else if (pass == 2) {\n      buf.writeBytes(this.blockLight.getData());\n    } else if (pass == 3 && this.skyLight != null) {\n      buf.writeBytes(this.skyLight.getData());\n    }\n  }\n\n  private void write19Data(ByteBuf buf, BlockStorage storage, ProtocolVersion version, int pass) {\n    storage.write(buf, version, pass);\n    buf.writeBytes(this.blockLight.getData());\n    if (this.skyLight != null) {\n      buf.writeBytes(this.skyLight.getData());\n    }\n  }\n\n  private void write114Data(ByteBuf buf, BlockStorage storage, ProtocolVersion version, int pass) {\n    buf.writeShort(this.blockCount);\n    if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n      buf.writeShort(this.fluidCount);\n    }\n    storage.write(buf, version, pass);\n  }\n\n  private void write118Biomes(ByteBuf buf, ProtocolVersion version) {\n    this.ensure118BiomeCreated(version).write(buf, version);\n  }\n\n  private BiomeStorage118 ensure118BiomeCreated(ProtocolVersion version) {\n    BiomeStorage118 storage = this.biomeStorages.get(version);\n    if (storage == null) {\n      synchronized (this.biomeStorages) {\n        storage = new BiomeStorage118(version);\n        int offset = this.index * SimpleChunk.MAX_BIOMES_PER_SECTION;\n        for (int biomeIndex = 0, biomeArrayIndex = offset; biomeIndex < SimpleChunk.MAX_BIOMES_PER_SECTION; ++biomeIndex, ++biomeArrayIndex) {\n          storage.set(biomeIndex, this.biomes[biomeArrayIndex]);\n        }\n\n        this.biomeStorages.put(version, storage);\n      }\n    }\n\n    return storage;\n  }\n\n  private void fillBlocks(BlockStorage storage) {\n    int blockCount = 0;\n    for (int posX = 0; posX < 16; ++posX) {\n      for (int posY = 0; posY < 16; ++posY) {\n        for (int posZ = 0; posZ < 16; ++posZ) {\n          VirtualBlock block = this.section.getBlockAt(posX, posY, posZ);\n          if (!block.isAir()) {\n            ++blockCount;\n            storage.set(posX, posY, posZ, block);\n          }\n        }\n      }\n    }\n\n    if (this.blockCount == -1) {\n      this.blockCount = blockCount;\n\n      // TODO: properly set fluidCount, as of 26.1 it is used only to guess about fluid in chunks.\n      this.fluidCount = blockCount;\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/CachedPackets.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.DisconnectPacket;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.Settings;\nimport net.elytrium.limboapi.api.protocol.PreparedPacket;\n\npublic class CachedPackets {\n\n  private final LimboAPI plugin;\n\n  private PreparedPacket tooBigPacket;\n  private PreparedPacket invalidPing;\n  private PreparedPacket invalidSwitch;\n  private PreparedPacket playTimeOut;\n  private PreparedPacket configTimeOut;\n  private boolean cached;\n\n  public CachedPackets(LimboAPI plugin) {\n    this.plugin = plugin;\n  }\n\n  public void createPackets() {\n    if (this.cached) {\n      this.dispose();\n    }\n\n    this.tooBigPacket = this.plugin.createPreparedPacket()\n        .prepare(version -> this.createDisconnectPacket(Settings.IMP.MAIN.MESSAGES.TOO_BIG_PACKET, version)).build();\n    this.invalidPing = this.plugin.createPreparedPacket()\n        .prepare(version -> this.createDisconnectPacket(Settings.IMP.MAIN.MESSAGES.INVALID_PING, version)).build();\n    this.invalidSwitch = this.plugin.createConfigPreparedPacket()\n        .prepare(version -> this.createDisconnectPacket(Settings.IMP.MAIN.MESSAGES.INVALID_SWITCH, version), ProtocolVersion.MINECRAFT_1_20_2).build();\n    this.playTimeOut = this.plugin.createPreparedPacket()\n        .prepare(version -> this.createDisconnectPacket(Settings.IMP.MAIN.MESSAGES.TIME_OUT, version)).build();\n    this.configTimeOut = this.plugin.createConfigPreparedPacket()\n        .prepare(version -> this.createDisconnectPacket(Settings.IMP.MAIN.MESSAGES.TIME_OUT, version), ProtocolVersion.MINECRAFT_1_20_2).build();\n\n    this.cached = true;\n  }\n\n  private DisconnectPacket createDisconnectPacket(String message, ProtocolVersion version) {\n    return DisconnectPacket.create(LimboAPI.getSerializer().deserialize(message), version, StateRegistry.PLAY);\n  }\n\n  public PreparedPacket getTooBigPacket() {\n    return this.tooBigPacket;\n  }\n\n  public PreparedPacket getInvalidPing() {\n    return this.invalidPing;\n  }\n\n  public PreparedPacket getInvalidSwitch() {\n    return this.invalidSwitch;\n  }\n\n  public PreparedPacket getTimeOut(StateRegistry stateRegistry) {\n    if (stateRegistry == StateRegistry.CONFIG) {\n      return this.configTimeOut;\n    }\n\n    return this.playTimeOut;\n  }\n\n  public void dispose() {\n    this.tooBigPacket.release();\n    this.invalidPing.release();\n    this.invalidSwitch.release();\n    this.playTimeOut.release();\n    this.configTimeOut.release();\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/LimboImpl.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server;\n\nimport com.google.common.collect.ImmutableList;\nimport com.google.common.collect.ImmutableSet;\nimport com.mojang.brigadier.tree.RootCommandNode;\nimport com.velocitypowered.api.command.Command;\nimport com.velocitypowered.api.command.CommandMeta;\nimport com.velocitypowered.api.command.CommandSource;\nimport com.velocitypowered.api.command.SimpleCommand;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.proxy.Player;\nimport com.velocitypowered.api.proxy.server.RegisteredServer;\nimport com.velocitypowered.proxy.command.registrar.BrigadierCommandRegistrar;\nimport com.velocitypowered.proxy.command.registrar.CommandRegistrar;\nimport com.velocitypowered.proxy.command.registrar.RawCommandRegistrar;\nimport com.velocitypowered.proxy.command.registrar.SimpleCommandRegistrar;\nimport com.velocitypowered.proxy.connection.ConnectionTypes;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.backend.VelocityServerConnection;\nimport com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.connection.registry.DimensionInfo;\nimport com.velocitypowered.proxy.network.Connections;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.VelocityConnectionEvent;\nimport com.velocitypowered.proxy.protocol.packet.AvailableCommandsPacket;\nimport com.velocitypowered.proxy.protocol.packet.BossBarPacket;\nimport com.velocitypowered.proxy.protocol.packet.JoinGamePacket;\nimport com.velocitypowered.proxy.protocol.packet.LegacyPlayerListItemPacket;\nimport com.velocitypowered.proxy.protocol.packet.PluginMessagePacket;\nimport com.velocitypowered.proxy.protocol.packet.RespawnPacket;\nimport com.velocitypowered.proxy.protocol.packet.UpsertPlayerInfoPacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.ComponentHolder;\nimport com.velocitypowered.proxy.protocol.packet.config.FinishedUpdatePacket;\nimport com.velocitypowered.proxy.protocol.packet.config.RegistrySyncPacket;\nimport com.velocitypowered.proxy.protocol.packet.config.StartUpdatePacket;\nimport com.velocitypowered.proxy.protocol.packet.config.TagsUpdatePacket;\nimport com.velocitypowered.proxy.protocol.packet.title.GenericTitlePacket;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.buffer.Unpooled;\nimport io.netty.channel.ChannelHandler;\nimport io.netty.channel.ChannelOutboundHandlerAdapter;\nimport io.netty.channel.ChannelPipeline;\nimport io.netty.handler.timeout.ReadTimeoutHandler;\nimport it.unimi.dsi.fastutil.Pair;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.nio.charset.StandardCharsets;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.EnumSet;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.Objects;\nimport java.util.UUID;\nimport java.util.concurrent.ScheduledFuture;\nimport java.util.concurrent.ThreadLocalRandom;\nimport java.util.concurrent.TimeUnit;\nimport java.util.concurrent.atomic.AtomicReference;\nimport java.util.concurrent.atomic.LongAdder;\nimport java.util.concurrent.locks.ReadWriteLock;\nimport java.util.concurrent.locks.ReentrantReadWriteLock;\nimport java.util.function.Function;\nimport java.util.function.Supplier;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.fastprepare.PreparedPacketFactory;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.Settings;\nimport net.elytrium.limboapi.api.Limbo;\nimport net.elytrium.limboapi.api.LimboSessionHandler;\nimport net.elytrium.limboapi.api.chunk.Dimension;\nimport net.elytrium.limboapi.api.chunk.VirtualChunk;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport net.elytrium.limboapi.api.command.LimboCommandMeta;\nimport net.elytrium.limboapi.api.player.GameMode;\nimport net.elytrium.limboapi.api.protocol.PacketDirection;\nimport net.elytrium.limboapi.api.protocol.PreparedPacket;\nimport net.elytrium.limboapi.api.protocol.packets.PacketMapping;\nimport net.elytrium.limboapi.injection.login.confirmation.LoginConfirmHandler;\nimport net.elytrium.limboapi.injection.packet.MinecraftLimitedCompressDecoder;\nimport net.elytrium.limboapi.material.Biome;\nimport net.elytrium.limboapi.protocol.LimboProtocol;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChangeGameStatePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChunkDataPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.DefaultSpawnPositionPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.PositionRotationPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.TimeUpdatePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.UpdateViewPositionPacket;\nimport net.elytrium.limboapi.server.world.SimpleTagManager;\nimport net.kyori.adventure.nbt.BinaryTag;\nimport net.kyori.adventure.nbt.BinaryTagIO;\nimport net.kyori.adventure.nbt.BinaryTagTypes;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport net.kyori.adventure.nbt.ListBinaryTag;\nimport net.kyori.adventure.nbt.StringBinaryTag;\nimport net.kyori.adventure.text.Component;\n\npublic class LimboImpl implements Limbo {\n\n  private static final ImmutableSet<String> LEVELS = ImmutableSet.of(\n      Dimension.OVERWORLD.getKey(),\n      Dimension.NETHER.getKey(),\n      Dimension.THE_END.getKey()\n  );\n\n  private static final MethodHandle PARTIAL_HASHED_SEED_FIELD;\n  private static final MethodHandle CURRENT_DIMENSION_DATA_FIELD;\n  private static final MethodHandle ROOT_NODE_FIELD;\n  private static final MethodHandle GRACEFUL_DISCONNECT_FIELD;\n  private static final MethodHandle REGISTRY_FIELD;\n  private static final MethodHandle LEVEL_NAMES_FIELDS;\n\n  private static final CompoundBinaryTag CHAT_TYPE_119;\n  private static final CompoundBinaryTag CHAT_TYPE_1191;\n  private static final CompoundBinaryTag DAMAGE_TYPE_1194;\n  private static final CompoundBinaryTag DAMAGE_TYPE_120;\n\n  private final Map<Class<? extends LimboSessionHandler>, PreparedPacket> brandMessages = new HashMap<>(2);\n  private final LimboAPI plugin;\n  private final VirtualWorld world;\n\n  private final LongAdder currentOnline = new LongAdder();\n  private final RootCommandNode<CommandSource> commandNode = new RootCommandNode<>();\n  private final ReadWriteLock lock = new ReentrantReadWriteLock();\n  private final List<PreparedPacket> queuedToRelease = new ArrayList<>();\n  private final List<CommandRegistrar<?>> registrars = ImmutableList.of(\n      new BrigadierCommandRegistrar(this.commandNode, this.lock.writeLock()),\n      new SimpleCommandRegistrar(this.commandNode, this.lock.writeLock()),\n      new RawCommandRegistrar(this.commandNode, this.lock.writeLock())\n  );\n\n  private String limboName;\n  private Integer readTimeout;\n  private Long worldTicks;\n  private short gameMode = GameMode.ADVENTURE.getID();\n  private Integer maxSuppressPacketLength;\n\n  private PreparedPacket joinPackets;\n  private PreparedPacket fastRejoinPackets;\n  private PreparedPacket safeRejoinPackets;\n  private PreparedPacket postJoinPackets;\n  private PreparedPacket firstChunks;\n  private List<PreparedPacket> delayedChunks;\n  private PreparedPacket respawnPackets;\n  protected PreparedPacket configTransitionPackets;\n  protected PreparedPacket configPackets;\n  protected StateRegistry localStateRegistry;\n  private boolean shouldRespawn = true;\n  private boolean shouldRejoin = true;\n  private boolean shouldUpdateTags = true;\n  private boolean reducedDebugInfo = Settings.IMP.MAIN.REDUCED_DEBUG_INFO;\n  private int viewDistance = Settings.IMP.MAIN.VIEW_DISTANCE;\n  private int simulationDistance = Settings.IMP.MAIN.SIMULATION_DISTANCE;\n  private volatile boolean built = true;\n  private boolean disposeScheduled = false;\n\n  public LimboImpl(LimboAPI plugin, VirtualWorld world) {\n    this.plugin = plugin;\n    this.world = world;\n    this.localStateRegistry = LimboProtocol.getLimboStateRegistry();\n\n    this.refresh();\n  }\n\n  protected void refresh() {\n    JoinGamePacket legacyJoinGame = this.createLegacyJoinGamePacket();\n    JoinGamePacket joinGame = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_16);\n    JoinGamePacket joinGame1162 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_16_2);\n    JoinGamePacket joinGame1182 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_18_2);\n    JoinGamePacket joinGame119 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_19);\n    JoinGamePacket joinGame1191 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_19_1);\n    JoinGamePacket joinGame1194 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_19_4);\n    JoinGamePacket joinGame120 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_20);\n    JoinGamePacket joinGame121 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_21);\n    JoinGamePacket joinGame1212 = this.createJoinGamePacket(ProtocolVersion.MINECRAFT_1_21_2);\n\n    final PreparedPacket joinPackets = this.plugin.createPreparedPacket()\n        .prepare(legacyJoinGame, ProtocolVersion.MINIMUM_VERSION, ProtocolVersion.MINECRAFT_1_15_2)\n        .prepare(joinGame, ProtocolVersion.MINECRAFT_1_16, ProtocolVersion.MINECRAFT_1_16_1)\n        .prepare(joinGame1162, ProtocolVersion.MINECRAFT_1_16_2, ProtocolVersion.MINECRAFT_1_18)\n        .prepare(joinGame1182, ProtocolVersion.MINECRAFT_1_18_2, ProtocolVersion.MINECRAFT_1_18_2)\n        .prepare(joinGame119, ProtocolVersion.MINECRAFT_1_19, ProtocolVersion.MINECRAFT_1_19)\n        .prepare(joinGame1191, ProtocolVersion.MINECRAFT_1_19_1, ProtocolVersion.MINECRAFT_1_19_3)\n        .prepare(joinGame1194, ProtocolVersion.MINECRAFT_1_19_4, ProtocolVersion.MINECRAFT_1_19_4)\n        .prepare(joinGame120, ProtocolVersion.MINECRAFT_1_20, ProtocolVersion.MINECRAFT_1_20_5)\n        .prepare(joinGame121, ProtocolVersion.MINECRAFT_1_21, ProtocolVersion.MINECRAFT_1_21)\n        .prepare(joinGame1212, ProtocolVersion.MINECRAFT_1_21_2);\n\n    PreparedPacket fastRejoinPackets = this.plugin.createPreparedPacket();\n    this.createFastClientServerSwitch(legacyJoinGame, ProtocolVersion.MINECRAFT_1_7_2)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINIMUM_VERSION, ProtocolVersion.MINECRAFT_1_15_2));\n    this.createFastClientServerSwitch(joinGame, ProtocolVersion.MINECRAFT_1_16)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_16, ProtocolVersion.MINECRAFT_1_16_1));\n    this.createFastClientServerSwitch(joinGame1162, ProtocolVersion.MINECRAFT_1_16_2)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_16_2, ProtocolVersion.MINECRAFT_1_18));\n    this.createFastClientServerSwitch(joinGame1182, ProtocolVersion.MINECRAFT_1_18_2)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_18_2, ProtocolVersion.MINECRAFT_1_18_2));\n    this.createFastClientServerSwitch(joinGame119, ProtocolVersion.MINECRAFT_1_19)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_19, ProtocolVersion.MINECRAFT_1_19));\n    this.createFastClientServerSwitch(joinGame1191, ProtocolVersion.MINECRAFT_1_19_1)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_19_1, ProtocolVersion.MINECRAFT_1_19_3));\n    this.createFastClientServerSwitch(joinGame1194, ProtocolVersion.MINECRAFT_1_19_4)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_19_4, ProtocolVersion.MINECRAFT_1_19_4));\n    this.createFastClientServerSwitch(joinGame120, ProtocolVersion.MINECRAFT_1_20)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_20, ProtocolVersion.MINECRAFT_1_20_5));\n    this.createFastClientServerSwitch(joinGame121, ProtocolVersion.MINECRAFT_1_21)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_21, ProtocolVersion.MINECRAFT_1_21));\n    this.createFastClientServerSwitch(joinGame1212, ProtocolVersion.MINECRAFT_1_21_2)\n        .forEach(minecraftPacket -> fastRejoinPackets.prepare(minecraftPacket, ProtocolVersion.MINECRAFT_1_21_2));\n\n    this.joinPackets = this.addPostJoin(joinPackets);\n    this.fastRejoinPackets = this.addPostJoin(fastRejoinPackets);\n    this.safeRejoinPackets = this.addPostJoin(this.plugin.createPreparedPacket().prepare(this.createSafeClientServerSwitch(legacyJoinGame)));\n    this.postJoinPackets = this.addPostJoin(this.plugin.createPreparedPacket());\n\n    this.configTransitionPackets = this.plugin.createPreparedPacket()\n        .prepare(StartUpdatePacket.INSTANCE, ProtocolVersion.MINECRAFT_1_20_2)\n        .build();\n\n    PreparedPacket configPackets = this.plugin.createConfigPreparedPacket();\n    configPackets.prepare(this::createRegistrySyncLegacy, ProtocolVersion.MINECRAFT_1_20_2, ProtocolVersion.MINECRAFT_1_20_3);\n    this.createRegistrySyncModern(configPackets, ProtocolVersion.MINECRAFT_1_20_5, ProtocolVersion.MINECRAFT_1_20_5);\n    this.createRegistrySyncModern(configPackets, ProtocolVersion.MINECRAFT_1_21, ProtocolVersion.MINECRAFT_1_21);\n    this.createRegistrySyncModern(configPackets, ProtocolVersion.MINECRAFT_1_21_2, ProtocolVersion.MINECRAFT_1_21_4);\n    this.createRegistrySyncModern(configPackets, ProtocolVersion.MINECRAFT_1_21_5, ProtocolVersion.MINECRAFT_1_21_9);\n    this.createRegistrySyncModern(configPackets, ProtocolVersion.MINECRAFT_1_21_11, ProtocolVersion.MINECRAFT_1_21_11);\n    this.createRegistrySyncModern(configPackets, ProtocolVersion.MINECRAFT_26_1, ProtocolVersion.MAXIMUM_VERSION);\n    if (this.shouldUpdateTags) {\n      configPackets.prepare(this::createTagsUpdate, ProtocolVersion.MINECRAFT_1_20_2);\n    } else {\n      // 26.1 requires tags to persist.\n      configPackets.prepare(this::createTagsUpdate, ProtocolVersion.MINECRAFT_26_1);\n    }\n    configPackets.prepare(FinishedUpdatePacket.INSTANCE, ProtocolVersion.MINECRAFT_1_20_2);\n    this.configPackets = configPackets.build();\n\n    this.firstChunks = this.createFirstChunks();\n    this.delayedChunks = this.createDelayedChunksPackets();\n    PreparedPacket respawnPackets = this.plugin.createPreparedPacket()\n        .prepare(\n            this.createPlayerPosAndLook(\n                this.world.getSpawnX(), this.world.getSpawnY(), this.world.getSpawnZ(), this.world.getYaw(), this.world.getPitch()\n            )\n        ).prepare(\n            this.createUpdateViewPosition((int) this.world.getSpawnX(), (int) this.world.getSpawnZ()),\n            ProtocolVersion.MINECRAFT_1_14\n        );\n\n    if (this.shouldUpdateTags) {\n      respawnPackets.prepare(SimpleTagManager::getUpdateTagsPacket,\n          ProtocolVersion.MINECRAFT_1_13, ProtocolVersion.MINECRAFT_1_20);\n    }\n\n    this.respawnPackets = respawnPackets.build();\n    this.built = true;\n  }\n\n  private ChangeGameStatePacket createLevelChunksLoadStartGameState() {\n    return new ChangeGameStatePacket(13, 0);\n  }\n\n  private RegistrySyncPacket createRegistrySyncLegacy(ProtocolVersion version) {\n    JoinGamePacket join = this.createJoinGamePacket(version);\n\n    ByteBuf encodedRegistry = this.plugin.getPreparedPacketFactory().getPreparedPacketAllocator().ioBuffer();\n    ProtocolUtils.writeBinaryTag(encodedRegistry, version, join.getRegistry());\n\n    RegistrySyncPacket sync = new RegistrySyncPacket();\n    sync.replace(encodedRegistry);\n    return sync;\n  }\n\n  private void createRegistrySyncModern(PreparedPacket packet, ProtocolVersion from, ProtocolVersion to) {\n    JoinGamePacket join = this.createJoinGamePacket(from);\n\n    CompoundBinaryTag registryTag = join.getRegistry();\n    for (String key : registryTag.keySet()) {\n      CompoundBinaryTag entry = registryTag.getCompound(key);\n\n      String type = entry.getString(\"type\");\n      ListBinaryTag values = entry.getList(\"value\", BinaryTagTypes.COMPOUND);\n\n      Pair<String, BinaryTag> emptyTag = null;\n      Pair<String, BinaryTag>[] tags = new Pair[0];\n\n      for (BinaryTag elementTag : values) {\n        CompoundBinaryTag element = (CompoundBinaryTag) elementTag;\n        int id = element.getInt(\"id\");\n        if (id >= tags.length) {\n          tags = Arrays.copyOf(tags, id + 1);\n        }\n\n        tags[id] = Pair.of(element.getString(\"name\"), element.getCompound(\"element\"));\n        if (emptyTag == null) {\n          emptyTag = tags[id];\n        }\n      }\n\n      for (int i = 0; i < tags.length; i++) {\n        if (tags[i] == null) {\n          tags[i] = Pair.of(\"limboapi_padding_\" + i, emptyTag.value());\n        }\n      }\n\n      Pair<String, BinaryTag>[] patchedTags = tags;\n      packet.prepare(version -> {\n        ByteBuf registry = this.plugin.getPreparedPacketFactory().getPreparedPacketAllocator().ioBuffer();\n\n        ProtocolUtils.writeString(registry, type);\n        ProtocolUtils.writeVarInt(registry, patchedTags.length);\n        for (Pair<String, BinaryTag> tag : patchedTags) {\n          ProtocolUtils.writeString(registry, tag.left());\n\n          registry.writeBoolean(tag.right() != null);\n          if (tag.right() != null) {\n            ProtocolUtils.writeBinaryTag(registry, version, tag.right());\n          }\n        }\n\n        RegistrySyncPacket sync = new RegistrySyncPacket();\n        sync.replace(registry);\n        return sync;\n      }, from, to);\n    }\n  }\n\n  private TagsUpdatePacket createTagsUpdate(ProtocolVersion version) {\n    return new TagsUpdatePacket(SimpleTagManager.getUpdateTagsPacket(version).toVelocityTags());\n  }\n\n  private PreparedPacket addPostJoin(PreparedPacket packet) {\n    return packet.prepare(this.createAvailableCommandsPacket(), ProtocolVersion.MINECRAFT_1_13)\n        .prepare(this.createDefaultSpawnPositionPacket())\n        .prepare(this.createLevelChunksLoadStartGameState(), ProtocolVersion.MINECRAFT_1_20_3)\n        .prepare(this.createWorldTicksPacket())\n        .prepare(this::createBrandMessage)\n        .build();\n  }\n\n  @Override\n  public void spawnPlayer(Player apiPlayer, LimboSessionHandler handler) {\n    if (!this.built) {\n      synchronized (this) {\n        if (!this.built) {\n          List<PreparedPacket> packets = this.takeSnapshot();\n          try {\n            this.refresh();\n          } finally {\n            List<PreparedPacket> changed = this.takeSnapshot();\n            for (PreparedPacket packet : packets) {\n              if (!changed.contains(packet)) {\n                this.queuedToRelease.add(packet);\n              }\n            }\n          }\n        }\n      }\n    }\n\n    ConnectedPlayer player = (ConnectedPlayer) apiPlayer;\n    MinecraftConnection connection = player.getConnection();\n\n    boolean shouldSpawnPlayerImmediately = true;\n\n    // Discard information from previous server\n    if (player.getConnection().getActiveSessionHandler() instanceof ClientPlaySessionHandler sessionHandler) {\n      connection.eventLoop().execute(() -> {\n        player.getTabList().clearAll();\n        for (UUID serverBossBar : sessionHandler.getServerBossBars()) {\n          player.getConnection().delayedWrite(BossBarPacket.createRemovePacket(serverBossBar, null));\n        }\n        sessionHandler.getServerBossBars().clear();\n\n        if (player.getProtocolVersion().noLessThan(ProtocolVersion.MINECRAFT_1_8)) {\n          player.getConnection().delayedWrite(GenericTitlePacket.constructTitlePacket(\n              GenericTitlePacket.ActionType.RESET, player.getProtocolVersion()));\n          player.clearPlayerListHeaderAndFooter();\n        }\n\n        player.getConnection().flush();\n      });\n    }\n\n    if (connection.getState() != this.localStateRegistry) {\n      VelocityServerConnection server = player.getConnectedServer();\n      if (server != null) {\n        RegisteredServer previousServer = server.getServer();\n        MinecraftConnection serverConnection = server.getConnection();\n        if (serverConnection != null) {\n          try {\n            GRACEFUL_DISCONNECT_FIELD.invokeExact(server, true);\n          } catch (Throwable e) {\n            throw new ReflectionException(e);\n          }\n\n          connection.eventLoop().execute(() ->\n              serverConnection.getChannel().close().addListener(f -> this.spawnPlayerLocal(player, handler, previousServer)));\n          shouldSpawnPlayerImmediately = false;\n        }\n\n        player.setConnectedServer(null);\n        this.plugin.setLimboJoined(player);\n      }\n    }\n\n    if (shouldSpawnPlayerImmediately) {\n      this.spawnPlayerLocal(player, handler, null);\n    }\n  }\n\n  protected void spawnPlayerLocal(Class<? extends LimboSessionHandler> handlerClass,\n      LimboSessionHandlerImpl sessionHandler, ConnectedPlayer player, MinecraftConnection connection) {\n    if (!connection.eventLoop().inEventLoop()) {\n      connection.eventLoop().execute(() -> this.spawnPlayerLocal(handlerClass, sessionHandler, player, connection));\n      return;\n    }\n\n    connection.setActiveSessionHandler(connection.getState(), sessionHandler);\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n      if (connection.getState() != StateRegistry.CONFIG) {\n        if (this.shouldRejoin) {\n          // Switch to CONFIG state\n          connection.write(this.configTransitionPackets);\n          return; // Continue transition on the handler side\n        }\n      } else {\n        // Switch to PLAY state\n        connection.delayedWrite(this.configPackets);\n        this.plugin.setEncoderState(connection, this.localStateRegistry);\n      }\n    }\n\n    sessionHandler.onConfig(new LimboPlayerImpl(this.plugin, this, player));\n\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) < 0\n        || (connection.getState() != StateRegistry.CONFIG && !this.shouldRejoin)) {\n      this.onSpawn(handlerClass, connection, player, sessionHandler);\n    }\n\n    connection.flush();\n  }\n\n  private void spawnPlayerLocal(ConnectedPlayer player, LimboSessionHandler handler, RegisteredServer previousServer) {\n    MinecraftConnection connection = player.getConnection();\n    connection.eventLoop().execute(() -> {\n      connection.flush();\n\n      ChannelPipeline pipeline = connection.getChannel().pipeline();\n      Class<? extends LimboSessionHandler> handlerClass = handler.getClass();\n      if (this.limboName == null) {\n        this.limboName = handlerClass.getSimpleName();\n      }\n\n      if (Settings.IMP.MAIN.LOGGING_ENABLED) {\n        LimboAPI.getLogger().info(player.getUsername() + \" (\" + player.getRemoteAddress() + \") has connected to the \" + this.limboName + \" Limbo\");\n      }\n\n      // With an abnormally large number of connections from the same nickname,\n      // requests don't have time to be processed, and an error occurs that \"minecraft-encoder\" doesn't exist.\n      if (pipeline.get(Connections.MINECRAFT_ENCODER) != null) {\n        if (this.readTimeout != null) {\n          pipeline.replace(Connections.READ_TIMEOUT, LimboProtocol.READ_TIMEOUT, new ReadTimeoutHandler(this.readTimeout, TimeUnit.MILLISECONDS));\n        }\n\n        boolean compressionEnabled = false;\n\n        if (pipeline.get(PreparedPacketFactory.PREPARED_ENCODER) == null) {\n          if (this.plugin.isCompressionEnabled() && connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_8) >= 0) {\n            if (pipeline.get(Connections.FRAME_ENCODER) != null) {\n              if (!Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n                pipeline.remove(Connections.FRAME_ENCODER);\n              }\n            } else if (Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n              if (pipeline.context(Connections.COMPRESSION_DECODER) != null) {\n                this.plugin.fixDecompressor(pipeline, this.plugin.getServer().getConfiguration().getCompressionThreshold(), false);\n              }\n            } else {\n              ChannelHandler minecraftCompressDecoder = pipeline.remove(Connections.COMPRESSION_DECODER);\n              if (minecraftCompressDecoder != null) {\n                this.plugin.fixDecompressor(pipeline, this.plugin.getServer().getConfiguration().getCompressionThreshold(), false);\n                pipeline.replace(Connections.COMPRESSION_ENCODER, Connections.COMPRESSION_ENCODER, new ChannelOutboundHandlerAdapter());\n                compressionEnabled = true;\n              }\n            }\n          } else if (!Settings.IMP.MAIN.COMPATIBILITY_MODE) {\n            pipeline.remove(Connections.FRAME_ENCODER);\n          }\n\n          this.plugin.inject3rdParty(player, connection, pipeline);\n          if (compressionEnabled) {\n            pipeline.fireUserEventTriggered(VelocityConnectionEvent.COMPRESSION_ENABLED);\n          } else {\n            pipeline.fireUserEventTriggered(VelocityConnectionEvent.COMPRESSION_DISABLED);\n          }\n        }\n      } else {\n        connection.close();\n        return;\n      }\n\n      if (this.maxSuppressPacketLength != null) {\n        MinecraftLimitedCompressDecoder decoder = pipeline.get(MinecraftLimitedCompressDecoder.class);\n        if (decoder != null) {\n          decoder.setUncompressedCap(this.maxSuppressPacketLength);\n        }\n      }\n\n      LimboSessionHandlerImpl sessionHandler = new LimboSessionHandlerImpl(\n          this.plugin,\n          this,\n          player,\n          handler,\n          connection.getState(),\n          connection.getActiveSessionHandler(),\n          previousServer,\n          () -> this.limboName\n      );\n\n      if (connection.getActiveSessionHandler() instanceof LoginConfirmHandler confirm) {\n        confirm.waitForConfirmation(() -> {\n          this.currentOnline.increment();\n          this.spawnPlayerLocal(handlerClass, sessionHandler, player, connection);\n        });\n      } else {\n        this.currentOnline.increment();\n        this.spawnPlayerLocal(handlerClass, sessionHandler, player, connection);\n      }\n    });\n  }\n\n  protected void onSpawn(Class<? extends LimboSessionHandler> handlerClass,\n      MinecraftConnection connection, ConnectedPlayer player, LimboSessionHandlerImpl sessionHandler) {\n    this.plugin.setState(connection, this.localStateRegistry);\n    if (this.plugin.isLimboJoined(player)) {\n      if (this.shouldRejoin) {\n        sessionHandler.setJoinGameTriggered(true);\n        if (connection.getType() == ConnectionTypes.LEGACY_FORGE) {\n          connection.delayedWrite(this.safeRejoinPackets);\n        } else {\n          connection.delayedWrite(this.fastRejoinPackets);\n        }\n      } else {\n        connection.delayedWrite(this.postJoinPackets);\n      }\n    } else {\n      sessionHandler.setJoinGameTriggered(true);\n      connection.delayedWrite(this.joinPackets);\n    }\n\n    MinecraftPacket playerInfoPacket;\n\n    UUID uuid = this.plugin.getInitialID(player);\n    if (connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_19_1) <= 0) {\n      playerInfoPacket = new LegacyPlayerListItemPacket(\n          LegacyPlayerListItemPacket.ADD_PLAYER,\n          List.of(\n              new LegacyPlayerListItemPacket.Item(uuid)\n                  .setName(player.getUsername())\n                  .setGameMode(this.gameMode)\n                  .setProperties(player.getGameProfileProperties())\n          )\n      );\n    } else {\n      UpsertPlayerInfoPacket.Entry playerInfoEntry = new UpsertPlayerInfoPacket.Entry(uuid);\n      playerInfoEntry.setDisplayName(new ComponentHolder(player.getProtocolVersion(), Component.text(player.getUsername())));\n      playerInfoEntry.setGameMode(this.gameMode);\n      playerInfoEntry.setProfile(player.getGameProfile());\n\n      playerInfoPacket = new UpsertPlayerInfoPacket(\n          EnumSet.of(\n              UpsertPlayerInfoPacket.Action.UPDATE_DISPLAY_NAME,\n              UpsertPlayerInfoPacket.Action.UPDATE_GAME_MODE,\n              UpsertPlayerInfoPacket.Action.ADD_PLAYER),\n          List.of(playerInfoEntry));\n    }\n\n    connection.delayedWrite(playerInfoPacket);\n\n    connection.delayedWrite(this.getBrandMessage(handlerClass));\n\n    this.plugin.setLimboJoined(player);\n\n    if (this.shouldRespawn) {\n      this.respawnPlayer(player);\n    }\n\n    sessionHandler.onSpawn();\n  }\n\n  @Override\n  public void respawnPlayer(Player player) {\n    MinecraftConnection connection = ((ConnectedPlayer) player).getConnection();\n\n    connection.delayedWrite(this.respawnPackets);\n    if (this.firstChunks != null) {\n      connection.write(this.firstChunks);\n    }\n\n    if (!this.delayedChunks.isEmpty()) {\n      AtomicReference<ScheduledFuture<?>> task = new AtomicReference<>();\n      task.set(connection.eventLoop().scheduleAtFixedRate(new Runnable() {\n\n        private final List<PreparedPacket> chunksSnapshot = LimboImpl.this.delayedChunks;\n        private int index;\n\n        @Override\n        public void run() {\n          if (connection.isClosed()) {\n            task.get().cancel(false);\n            return;\n          }\n\n          connection.write(this.chunksSnapshot.get(this.index));\n          if (++this.index >= this.chunksSnapshot.size()) {\n            task.get().cancel(false);\n          }\n        }\n      }, 50, 50, TimeUnit.MILLISECONDS));\n\n      if (connection.getActiveSessionHandler() instanceof LimboSessionHandlerImpl sessionHandler) {\n        sessionHandler.setRespawnTask(task.get());\n      }\n    }\n  }\n\n  @Override\n  public long getCurrentOnline() {\n    return this.currentOnline.sum();\n  }\n\n  public void onDisconnect() {\n    this.currentOnline.decrement();\n\n    if (!this.queuedToRelease.isEmpty() && this.currentOnline.sum() == 0) {\n      synchronized (this) {\n        PreparedPacket[] packets = this.queuedToRelease.toArray(new PreparedPacket[0]);\n        this.queuedToRelease.clear();\n\n        // Wait some time to ensure that queued packets is really unused\n        this.plugin.getServer().getScheduler().buildTask(this.plugin, () -> {\n          for (PreparedPacket packet : packets) {\n            packet.release();\n          }\n        }).delay(10, TimeUnit.SECONDS).schedule();\n      }\n    }\n\n    if (this.disposeScheduled && this.currentOnline.sum() == 0) {\n      this.localDispose();\n    }\n  }\n\n  @Override\n  public Limbo setName(String name) {\n    this.limboName = name;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setReadTimeout(int millis) {\n    this.readTimeout = millis;\n    return this;\n  }\n\n  @Override\n  public Limbo setWorldTime(long ticks) {\n    this.worldTicks = ticks;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setGameMode(GameMode gameMode) {\n    this.gameMode = gameMode.getID();\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setShouldRejoin(boolean shouldRejoin) {\n    this.shouldRejoin = shouldRejoin;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setShouldRespawn(boolean shouldRespawn) {\n    this.shouldRespawn = shouldRespawn;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setShouldUpdateTags(boolean shouldUpdateTags) {\n    this.shouldUpdateTags = shouldUpdateTags;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setReducedDebugInfo(boolean reducedDebugInfo) {\n    this.reducedDebugInfo = reducedDebugInfo;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setViewDistance(int viewDistance) {\n    this.viewDistance = viewDistance;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setSimulationDistance(int simulationDistance) {\n    this.simulationDistance = simulationDistance;\n\n    this.built = false;\n    return this;\n  }\n\n  @Override\n  public Limbo setMaxSuppressPacketLength(int maxSuppressPacketLength) {\n    this.maxSuppressPacketLength = maxSuppressPacketLength;\n\n    return this;\n  }\n\n  @Override\n  public Limbo registerCommand(LimboCommandMeta commandMeta) {\n    return this.registerCommand(commandMeta, (SimpleCommand) invocation -> {\n      // Do nothing.\n    });\n  }\n\n  @Override\n  public Limbo registerCommand(CommandMeta commandMeta, Command command) {\n    for (CommandRegistrar<?> registrar : this.registrars) {\n      if (this.tryRegister(registrar, commandMeta, command)) {\n        this.built = false;\n        return this;\n      }\n    }\n\n    throw new IllegalArgumentException(command + \" does not implement a registrable Command sub-interface.\");\n  }\n\n  public Limbo registerPacket(PacketDirection direction, Class<?> packetClass, Supplier<?> packetSupplier, PacketMapping[] packetMappings) {\n    if (this.localStateRegistry == LimboProtocol.getLimboStateRegistry()) {\n      this.localStateRegistry = LimboProtocol.createLocalStateRegistry();\n      this.plugin.getPreparedPacketFactory().addStateRegistry(this.localStateRegistry);\n    }\n\n    LimboProtocol.register(this.localStateRegistry, direction, packetClass, packetSupplier, packetMappings);\n\n    return this;\n  }\n\n  @Override\n  public void dispose() {\n    if (this.getCurrentOnline() == 0) {\n      this.localDispose();\n    } else {\n      this.disposeScheduled = true;\n    }\n  }\n\n  private List<PreparedPacket> takeSnapshot() {\n    List<PreparedPacket> packets = new ArrayList<>();\n\n    if (this.joinPackets != null) {\n      packets.add(this.joinPackets);\n    }\n    if (this.fastRejoinPackets != null) {\n      packets.add(this.fastRejoinPackets);\n    }\n    if (this.safeRejoinPackets != null) {\n      packets.add(this.safeRejoinPackets);\n    }\n    if (this.postJoinPackets != null) {\n      packets.add(this.postJoinPackets);\n    }\n    if (this.respawnPackets != null) {\n      packets.add(this.respawnPackets);\n    }\n    if (this.firstChunks != null) {\n      packets.add(this.firstChunks);\n    }\n    if (this.delayedChunks != null) {\n      packets.addAll(this.delayedChunks);\n    }\n    if (this.configTransitionPackets != null) {\n      packets.add(this.configTransitionPackets);\n    }\n    if (this.configPackets != null) {\n      packets.add(this.configPackets);\n    }\n\n    return packets;\n  }\n\n  private void localDispose() {\n    this.takeSnapshot().forEach(PreparedPacket::release);\n    this.built = false;\n    this.brandMessages.values().forEach(PreparedPacket::release);\n    this.brandMessages.clear();\n  }\n\n  // From Velocity.\n  private <T extends Command> boolean tryRegister(CommandRegistrar<T> registrar, CommandMeta commandMeta, Command command) {\n    Class<T> superInterface = registrar.registrableSuperInterface();\n    if (superInterface.isInstance(command)) {\n      registrar.register(commandMeta, superInterface.cast(command));\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  private CompoundBinaryTag createRegistry(String registryName, Map<String, CompoundBinaryTag> tags) {\n    int id = 0;\n\n    ListBinaryTag.Builder<CompoundBinaryTag> builder = ListBinaryTag.builder(BinaryTagTypes.COMPOUND);\n    for (Entry<String, CompoundBinaryTag> tag : tags.entrySet()) {\n      builder.add(CompoundBinaryTag.builder()\n          .putString(\"name\", tag.getKey())\n          .putInt(\"id\", id++)\n          .put(\"element\", tag.getValue())\n          .build());\n    }\n\n    return this.createRegistry(registryName, builder.build());\n  }\n\n  private CompoundBinaryTag createRegistry(String registryName, ListBinaryTag tags) {\n    return CompoundBinaryTag.builder()\n        .putString(\"type\", registryName)\n        .put(\"value\", tags).build();\n  }\n\n  private CompoundBinaryTag createDimensionData(Dimension dimension, ProtocolVersion version) {\n    CompoundBinaryTag.Builder details = CompoundBinaryTag.builder()\n        .putBoolean(\"natural\", false)\n        .putFloat(\"ambient_light\", 0.0F)\n        .putBoolean(\"shrunk\", false)\n        .putBoolean(\"ultrawarm\", false)\n        .putBoolean(\"has_ceiling\", false)\n        .putBoolean(\"has_skylight\", true)\n        .putBoolean(\"piglin_safe\", false)\n        .putBoolean(\"bed_works\", false)\n        .putBoolean(\"respawn_anchor_works\", false)\n        .putBoolean(\"has_raids\", false)\n        .putInt(\"logical_height\", 256)\n        .putString(\"infiniburn\", version.compareTo(ProtocolVersion.MINECRAFT_1_18_2) >= 0 ? \"#minecraft:infiniburn_nether\" : \"minecraft:infiniburn_nether\")\n        .putDouble(\"coordinate_scale\", 1.0)\n        .putString(\"effects\", dimension.getKey())\n        .putInt(\"min_y\", 0)\n        .putInt(\"height\", 256)\n        .putInt(\"monster_spawn_block_light_limit\", 0)\n        .putInt(\"monster_spawn_light_level\", 0);\n\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_11) >= 0) {\n      CompoundBinaryTag.Builder attributes = CompoundBinaryTag.builder();\n      switch (dimension) {\n        case OVERWORLD -> {\n          attributes.putString(\"minecraft:visual/cloud_color\", \"#ccffffff\")\n              .putFloat(\"minecraft:visual/cloud_height\", 192.33f)\n              .putString(\"minecraft:visual/fog_color\", \"#c0d8ff\")\n              .putString(\"minecraft:visual/sky_color\", \"#78a7ff\");\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            attributes.putString(\"minecraft:visual/ambient_light_color\", \"#0a0a0a\");\n          }\n        }\n        case NETHER -> {\n          details.putString(\"cardinal_light\", \"nether\");\n          details.putString(\"skybox\", \"none\");\n          attributes.putFloat(\"minecraft:gameplay/sky_light_level\", 4.0f)\n              .putFloat(\"minecraft:visual/fog_end_distance\", 96.0f)\n              .putFloat(\"minecraft:visual/fog_start_distance\", 10.0f)\n              .putString(\"minecraft:visual/sky_light_color\", \"#7a7aff\");\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            attributes.putString(\"minecraft:visual/ambient_light_color\", \"#302821\");\n          }\n        }\n        case THE_END -> {\n          details.putString(\"skybox\", \"end\");\n          attributes.putString(\"minecraft:visual/fog_color\", \"#181318\")\n              .putString(\"minecraft:visual/sky_color\", \"#000000\")\n              .putString(\"minecraft:visual/sky_light_color\", \"#e580ff\");\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            attributes.putString(\"minecraft:visual/ambient_light_color\", \"#3f473f\");\n          }\n        }\n        default -> throw new IllegalStateException(\"Unknown dimension: \" + dimension); // Checkstyle madness\n      }\n\n      details.put(\"attributes\", attributes.build());\n    }\n\n    if (version.compareTo(ProtocolVersion.MINECRAFT_26_1) >= 0) {\n      switch (dimension) {\n        case OVERWORLD -> {\n          details.putString(\"timelines\", \"minecraft:day\");\n          details.putString(\"default_clock\", \"minecraft:overworld\");\n          details.putBoolean(\"has_ender_dragon_fight\", false);\n        }\n        case NETHER -> {\n          details.putBoolean(\"has_ender_dragon_fight\", false);\n        }\n        case THE_END -> {\n          details.putString(\"default_clock\", \"minecraft:overworld\");\n          details.putBoolean(\"has_ender_dragon_fight\", true);\n        }\n        default -> throw new IllegalStateException(\"Unknown dimension: \" + dimension); // Checkstyle madness\n      }\n    }\n\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_16_2) >= 0) {\n      return CompoundBinaryTag.builder()\n          .putString(\"name\", dimension.getKey())\n          .putInt(\"id\", dimension.getModernID())\n          .put(\"element\", details.build())\n          .build();\n    } else {\n      return details.build().putString(\"name\", dimension.getKey());\n    }\n  }\n\n  private JoinGamePacket createJoinGamePacket(ProtocolVersion version) {\n    Dimension dimension = this.world.getDimension();\n    JoinGamePacket joinGame = new JoinGamePacket();\n    joinGame.setEntityId(1);\n    joinGame.setIsHardcore(true);\n    joinGame.setGamemode(this.gameMode);\n    joinGame.setPreviousGamemode((short) -1);\n    joinGame.setDimension(dimension.getModernID());\n    joinGame.setDifficulty((short) 0);\n    try {\n      PARTIAL_HASHED_SEED_FIELD.invokeExact(joinGame, ThreadLocalRandom.current().nextLong());\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n    joinGame.setMaxPlayers(1);\n\n    joinGame.setLevelType(\"flat\");\n\n    joinGame.setViewDistance(this.viewDistance);\n    joinGame.setSimulationDistance(this.simulationDistance);\n\n    joinGame.setReducedDebugInfo(this.reducedDebugInfo);\n\n    String key = dimension.getKey();\n    joinGame.setDimensionInfo(new DimensionInfo(key, key, false, false, version));\n    joinGame.setEnforcesSecureChat(Settings.IMP.MAIN.SEND_ENFORCE_SECURE_CHAT);\n\n    CompoundBinaryTag.Builder registryContainer = CompoundBinaryTag.builder();\n    ListBinaryTag encodedDimensionRegistry = ListBinaryTag.builder(BinaryTagTypes.COMPOUND)\n        .add(this.createDimensionData(Dimension.OVERWORLD, version))\n        .add(this.createDimensionData(Dimension.NETHER, version))\n        .add(this.createDimensionData(Dimension.THE_END, version))\n        .build();\n\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_16_2) >= 0) {\n      CompoundBinaryTag.Builder dimensionRegistryEntry = CompoundBinaryTag.builder();\n      dimensionRegistryEntry.putString(\"type\", \"minecraft:dimension_type\");\n      dimensionRegistryEntry.put(\"value\", encodedDimensionRegistry);\n      registryContainer.put(\"minecraft:dimension_type\", dimensionRegistryEntry.build());\n      registryContainer.put(\"minecraft:worldgen/biome\", Biome.getRegistry(version));\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_19) == 0) {\n        registryContainer.put(\"minecraft:chat_type\", CHAT_TYPE_119);\n      } else if (version.compareTo(ProtocolVersion.MINECRAFT_1_19_1) >= 0) {\n        registryContainer.put(\"minecraft:chat_type\", CHAT_TYPE_1191);\n      }\n\n      // TODO: Generate mappings for damage_type registry\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_19_4) == 0) {\n        registryContainer.put(\"minecraft:damage_type\", DAMAGE_TYPE_1194);\n      } else if (version.compareTo(ProtocolVersion.MINECRAFT_1_21) >= 0) {\n        ListBinaryTag values = DAMAGE_TYPE_120.getList(\"value\");\n\n        ListBinaryTag.Builder<CompoundBinaryTag> tags = ListBinaryTag.builder(BinaryTagTypes.COMPOUND);\n        for (BinaryTag tag : values) {\n          tags.add((CompoundBinaryTag) tag);\n        }\n\n        List<String> types = new ArrayList<>();\n        types.add(\"minecraft:campfire\");\n        if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_2) >= 0) {\n          types.add(\"minecraft:ender_pearl\");\n          types.add(\"minecraft:mace_smash\");\n        }\n        if (version.compareTo(ProtocolVersion.MINECRAFT_26_1) >= 0) {\n          types.add(\"minecraft:spear\");\n        }\n\n        int id = values.size();\n        for (String name : types) {\n          CompoundBinaryTag.Builder type = CompoundBinaryTag.builder()\n              .putString(\"name\", name)\n              .putInt(\"id\", id++)\n              .put(\"element\", values.getCompound(0).getCompound(\"element\"));\n\n          tags.add(type.build());\n        }\n\n        registryContainer.put(\"minecraft:damage_type\", this.createRegistry(\"minecraft:damage_type\", tags.build()));\n      } else if (version.compareTo(ProtocolVersion.MINECRAFT_1_20) >= 0) {\n        registryContainer.put(\"minecraft:damage_type\", DAMAGE_TYPE_120);\n      }\n\n      // TODO: Auto-generate mappings and implement some APIs\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_21) >= 0) {\n        CompoundBinaryTag.Builder paintingVariant = CompoundBinaryTag.builder()\n            .putInt(\"width\", 1)\n            .putInt(\"height\", 1)\n            .putString(\"asset_id\", \"minecraft:alban\");\n\n        registryContainer.put(\"minecraft:painting_variant\", this.createRegistry(\"minecraft:painting_variant\",\n            Map.of(\"minecraft:alban\", paintingVariant.build())));\n\n        if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_5) >= 0) {\n          // Cat\n          CompoundBinaryTag.Builder catVariant = CompoundBinaryTag.builder()\n              .putString(\"asset_id\", \"minecraft:entity/cat/all_black\")\n              .put(\"spawn_conditions\", ListBinaryTag.empty());\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            catVariant.putString(\"baby_asset_id\", \"minecraft:entity/cat/all_black\");\n          }\n\n          registryContainer.put(\"minecraft:cat_variant\", this.createRegistry(\"minecraft:cat_variant\",\n              Map.of(\"minecraft:all_black\", catVariant.build())));\n\n          // Chicken\n          CompoundBinaryTag.Builder chickenVariant = CompoundBinaryTag.builder()\n              .putString(\"asset_id\", \"minecraft:entity/chicken/cold_chicken\")\n              .putString(\"model\", \"cold\")\n              .put(\"spawn_conditions\", ListBinaryTag.empty());\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            chickenVariant.putString(\"baby_asset_id\", \"minecraft:entity/chicken/cold_chicken\");\n          }\n\n          registryContainer.put(\"minecraft:chicken_variant\", this.createRegistry(\"minecraft:chicken_variant\",\n              Map.of(\"minecraft:cold\", chickenVariant.build(),\n                  \"minecraft:temperate\", chickenVariant.build(),\n                  \"minecraft:warm\", chickenVariant.build())));\n\n          // Cow\n          CompoundBinaryTag.Builder cowVariant = CompoundBinaryTag.builder()\n              .putString(\"asset_id\", \"minecraft:entity/cow/cold_cow\")\n              .putString(\"model\", \"cold\")\n              .put(\"spawn_conditions\", ListBinaryTag.empty());\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            cowVariant.putString(\"baby_asset_id\", \"minecraft:entity/cow/cold_cow\");\n          }\n\n          registryContainer.put(\"minecraft:cow_variant\", this.createRegistry(\"minecraft:cow_variant\",\n              Map.of(\"minecraft:cold\", cowVariant.build())));\n\n          // Frog\n          CompoundBinaryTag.Builder frogVariant = CompoundBinaryTag.builder()\n              .putString(\"asset_id\", \"minecraft:entity/frog/cold_frog\")\n              .put(\"spawn_conditions\", ListBinaryTag.empty());\n\n          registryContainer.put(\"minecraft:frog_variant\", this.createRegistry(\"minecraft:frog_variant\",\n              Map.of(\"minecraft:cold\", frogVariant.build())));\n\n          // Pig\n          CompoundBinaryTag.Builder pigVariant = CompoundBinaryTag.builder()\n              .putString(\"asset_id\", \"minecraft:entity/pig/cold_pig\")\n              .putString(\"model\", \"cold\")\n              .put(\"spawn_conditions\", ListBinaryTag.empty());\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            pigVariant.putString(\"baby_asset_id\", \"minecraft:entity/pig/cold_pig\");\n          }\n\n          registryContainer.put(\"minecraft:pig_variant\", this.createRegistry(\"minecraft:pig_variant\",\n              Map.of(\"minecraft:cold\", pigVariant.build())));\n\n          // Wolf Sound Variant\n          CompoundBinaryTag wolfSoundVariant = CompoundBinaryTag.builder()\n              .putString(\"ambient_sound\", \"minecraft:entity.wolf_angry.ambient\")\n              .putString(\"death_sound\", \"minecraft:entity.wolf_angry.death\")\n              .putString(\"growl_sound\", \"minecraft:entity.wolf_angry.growl\")\n              .putString(\"hurt_sound\", \"minecraft:entity.wolf_angry.hurt\")\n              .putString(\"pant_sound\", \"minecraft:entity.wolf_angry.pant\")\n              .putString(\"whine_sound\", \"minecraft:entity.wolf_angry.whine\").build();\n          if (version.noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            wolfSoundVariant = this.soundVariant(\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.wolf_angry.ambient\")\n                    .putString(\"death_sound\", \"minecraft:entity.wolf_angry.death\")\n                    .putString(\"growl_sound\", \"minecraft:entity.wolf_angry.growl\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.wolf_angry.hurt\")\n                    .putString(\"pant_sound\", \"minecraft:entity.wolf_angry.pant\")\n                    .putString(\"step_sound\", \"minecraft:entity.wolf.step\")\n                    .putString(\"whine_sound\", \"minecraft:entity.wolf_angry.whine\"),\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.baby_wolf.ambient\")\n                    .putString(\"death_sound\", \"minecraft:entity.baby_wolf.death\")\n                    .putString(\"growl_sound\", \"minecraft:entity.baby_wolf.growl\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.baby_wolf.hurt\")\n                    .putString(\"pant_sound\", \"minecraft:entity.baby_wolf.pant\")\n                    .putString(\"step_sound\", \"minecraft:entity.baby_wolf.step\")\n                    .putString(\"whine_sound\", \"minecraft:entity.baby_wolf.whine\")\n            );\n          }\n\n          registryContainer.put(\"minecraft:wolf_sound_variant\", this.createRegistry(\"minecraft:wolf_sound_variant\",\n              Map.of(\"minecraft:angry\", wolfSoundVariant)));\n\n          // Wolf\n          CompoundBinaryTag.Builder wolfVariant = CompoundBinaryTag.builder()\n              .put(\"assets\", CompoundBinaryTag.builder()\n                  .putString(\"wild\", \"minecraft:entity/wolf/wolf_ashen\")\n                  .putString(\"tame\", \"minecraft:entity/wolf/wolf_ashen_tame\")\n                  .putString(\"angry\", \"minecraft:entity/wolf/wolf_ashen_angry\")\n                  .build())\n              .put(\"baby_assets\", CompoundBinaryTag.builder()\n                  .putString(\"wild\", \"minecraft:entity/wolf/wolf_ashen\")\n                  .putString(\"tame\", \"minecraft:entity/wolf/wolf_ashen_tame\")\n                  .putString(\"angry\", \"minecraft:entity/wolf/wolf_ashen_angry\")\n                  .build())\n              .put(\"spawn_conditions\", ListBinaryTag.empty());\n\n          registryContainer.put(\"minecraft:wolf_variant\", this.createRegistry(\"minecraft:wolf_variant\",\n              Map.of(\"minecraft:ashen\", wolfVariant.build())));\n\n          if (version.compareTo(ProtocolVersion.MINECRAFT_1_21_11) >= 0) {\n            // Zombie nautilus variant\n            CompoundBinaryTag zombieVariant = CompoundBinaryTag.builder()\n                .putString(\"asset_id\", \"minecraft:entity/nautilus/zombie_nautilus\")\n                .put(\"spawn_conditions\", ListBinaryTag.empty()).build();\n\n            registryContainer.put(\"minecraft:zombie_nautilus_variant\", this.createRegistry(\"minecraft:zombie_nautilus_variant\",\n                Map.of(\"minecraft:temperate\", zombieVariant)));\n          }\n\n          if (version.compareTo(ProtocolVersion.MINECRAFT_26_1) >= 0) {\n            // World clock\n            registryContainer.put(\"minecraft:world_clock\", this.createRegistry(\"minecraft:world_clock\",\n                Map.of(\"minecraft:overworld\", CompoundBinaryTag.builder().build())));\n\n            // Sound variants\n            CompoundBinaryTag soundVariant = this.soundVariant(\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.pig.ambient\")\n                    .putString(\"death_sound\", \"minecraft:entity.pig.death\")\n                    .putString(\"eat_sound\", \"minecraft:entity.pig.eat\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.pig.hurt\")\n                    .putString(\"step_sound\", \"minecraft:entity.pig.step\"),\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.baby_pig.ambient\")\n                    .putString(\"death_sound\", \"minecraft:entity.baby_pig.death\")\n                    .putString(\"eat_sound\", \"minecraft:entity.baby_pig.eat\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.baby_pig.hurt\")\n                    .putString(\"step_sound\", \"minecraft:entity.baby_pig.step\")\n            );\n\n            registryContainer.put(\"minecraft:pig_sound_variant\", this.createRegistry(\"minecraft:pig_sound_variant\",\n                Map.of(\"minecraft:classic\", soundVariant)));\n\n            soundVariant = this.soundVariant(\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.cat.ambient\")\n                    .putString(\"beg_for_food_sound\", \"minecraft:entity.cat.beg_for_food\")\n                    .putString(\"death_sound\", \"minecraft:entity.cat.death\")\n                    .putString(\"eat_sound\", \"minecraft:entity.cat.eat\")\n                    .putString(\"hiss_sound\", \"minecraft:entity.cat.hiss\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.cat.hurt\")\n                    .putString(\"purr_sound\", \"minecraft:entity.cat.purr\")\n                    .putString(\"purreow_sound\", \"minecraft:entity.cat.purreow\")\n                    .putString(\"stray_ambient_sound\", \"minecraft:entity.cat.stray_ambient\"),\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.baby_cat.ambient\")\n                    .putString(\"beg_for_food_sound\", \"minecraft:entity.baby_cat.beg_for_food\")\n                    .putString(\"death_sound\", \"minecraft:entity.baby_cat.death\")\n                    .putString(\"eat_sound\", \"minecraft:entity.baby_cat.eat\")\n                    .putString(\"hiss_sound\", \"minecraft:entity.baby_cat.hiss\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.baby_cat.hurt\")\n                    .putString(\"purr_sound\", \"minecraft:entity.baby_cat.purr\")\n                    .putString(\"purreow_sound\", \"minecraft:entity.baby_cat.purreow\")\n                    .putString(\"stray_ambient_sound\", \"minecraft:entity.baby_cat.stray_ambient\")\n            );\n\n            registryContainer.put(\"minecraft:cat_sound_variant\", this.createRegistry(\"minecraft:cat_sound_variant\",\n                Map.of(\"minecraft:classic\", soundVariant)));\n\n            CompoundBinaryTag.Builder cowSoundVariant = CompoundBinaryTag.builder()\n                .putString(\"ambient_sound\", \"minecraft:entity.cow.ambient\")\n                .putString(\"death_sound\", \"minecraft:entity.cow.death\")\n                .putString(\"hurt_sound\", \"minecraft:entity.cow.hurt\")\n                .putString(\"step_sound\", \"minecraft:entity.cow.step\");\n\n            registryContainer.put(\"minecraft:cow_sound_variant\", this.createRegistry(\"minecraft:cow_sound_variant\",\n                Map.of(\"minecraft:classic\", cowSoundVariant.build())));\n\n            soundVariant = this.soundVariant(\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.chicken.ambient\")\n                    .putString(\"death_sound\", \"minecraft:entity.chicken.death\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.chicken.hurt\")\n                    .putString(\"step_sound\", \"minecraft:entity.chicken.step\"),\n                builder -> builder.putString(\"ambient_sound\", \"minecraft:entity.baby_chicken.ambient\")\n                    .putString(\"death_sound\", \"minecraft:entity.baby_chicken.death\")\n                    .putString(\"hurt_sound\", \"minecraft:entity.baby_chicken.hurt\")\n                    .putString(\"step_sound\", \"minecraft:entity.baby_chicken.step\")\n            );\n\n            registryContainer.put(\"minecraft:chicken_sound_variant\", this.createRegistry(\"minecraft:chicken_sound_variant\",\n                Map.of(\"minecraft:classic\", soundVariant)));\n\n            // Trim material\n            CompoundBinaryTag trim = CompoundBinaryTag.builder()\n                .putString(\"asset_name\", \"redstone\")\n                .put(\"description\", CompoundBinaryTag.builder()\n                    .putString(\"color\", \"#971607\")\n                    .putString(\"translate\", \"trim_material.minecraft.redstone\")\n                    .build())\n                .build();\n\n            Map<String, CompoundBinaryTag> trims = new HashMap<>();\n            for (String trimName : List.of(\"amethyst\", \"copper\", \"diamond\",\n                \"emerald\", \"gold\", \"iron\", \"lapis\", \"netherite\", \"quartz\",\n                \"redstone\", \"resin\")) {\n              trims.put(trimName, trim);\n            }\n            registryContainer.put(\"minecraft:trim_material\", this.createRegistry(\"minecraft:trim_material\", trims));\n\n            // Jukebox song\n            CompoundBinaryTag song = CompoundBinaryTag.builder()\n                .putString(\"sound_event\", \"minecraft:music_disc.5\")\n                .put(\"description\", CompoundBinaryTag.builder()\n                    .putString(\"translate\", \"jukebox_song.minecraft.5\")\n                    .build())\n                .putFloat(\"length_in_seconds\", 178f)\n                .putInt(\"comparator_output\", 15)\n                .build();\n\n            Map<String, CompoundBinaryTag> songs = new HashMap<>();\n            for (String songName : List.of(\"11\", \"13\", \"5\", \"blocks\", \"cat\", \"chirp\", \"creator\",\n                \"creator_music_box\", \"far\", \"lava_chicken\", \"mall\", \"mellohi\", \"otherside\",\n                \"pigstep\", \"precipice\", \"relic\", \"stal\", \"strad\", \"tears\", \"wait\", \"ward\")) {\n              songs.put(songName, song);\n            }\n            registryContainer.put(\"minecraft:jukebox_song\", this.createRegistry(\"minecraft:jukebox_song\", songs));\n\n            // Instrument\n            Map<String, CompoundBinaryTag> instruments = new HashMap<>();\n            for (String instrumentName : List.of(\"admire_goat_horn\", \"call_goat_horn\", \"dream_goat_horn\", \"feel_goat_horn\",\n                \"ponder_goat_horn\", \"seek_goat_horn\", \"sing_goat_horn\", \"yearn_goat_horn\")) {\n              instruments.put(instrumentName, CompoundBinaryTag.builder()\n                  .putString(\"sound_event\", \"minecraft:item.goat_horn.sound.0\")\n                  .putFloat(\"range\", 256)\n                  .putFloat(\"use_duration\", 256)\n                  .put(\"description\", CompoundBinaryTag.builder()\n                      .putString(\"translate\", \"instrument.minecraft.ponder_goat_horn\")\n                      .build())\n                  .build());\n            }\n            registryContainer.put(\"minecraft:instrument\", this.createRegistry(\"minecraft:instrument\", instruments));\n\n            // Timeline\n            Map<String, CompoundBinaryTag> timelines = new HashMap<>();\n            for (String timelineName : List.of(\"day\")) {\n              timelines.put(timelineName, CompoundBinaryTag.builder()\n                  .putString(\"clock\", \"minecraft:overworld\")\n                  .putFloat(\"period_ticks\", 24000)\n                  .build());\n            }\n            registryContainer.put(\"minecraft:timeline\", this.createRegistry(\"minecraft:timeline\", timelines));\n          }\n        } else {\n          CompoundBinaryTag.Builder wolfVariant = CompoundBinaryTag.builder()\n              .putString(\"wild_texture\", \"minecraft:entity/wolf/wolf_ashen\")\n              .putString(\"tame_texture\", \"minecraft:entity/wolf/wolf_ashen_tame\")\n              .putString(\"angry_texture\", \"minecraft:entity/wolf/wolf_ashen_angry\")\n              .put(\"biomes\", ListBinaryTag.builder()\n                  .add(StringBinaryTag.stringBinaryTag(\"minecraft:plains\")).build()\n              );\n\n          registryContainer.put(\"minecraft:wolf_variant\", this.createRegistry(\"minecraft:wolf_variant\",\n              Map.of(\"minecraft:ashen\", wolfVariant.build())));\n        }\n      }\n    } else {\n      registryContainer.put(\"dimension\", encodedDimensionRegistry);\n    }\n\n    try {\n      CompoundBinaryTag currentDimensionData = encodedDimensionRegistry.getCompound(dimension.getModernID());\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_16_2) >= 0) {\n        currentDimensionData = currentDimensionData.getCompound(\"element\");\n      }\n\n      CURRENT_DIMENSION_DATA_FIELD.invokeExact(joinGame, currentDimensionData);\n      LEVEL_NAMES_FIELDS.invokeExact(joinGame, LEVELS);\n      REGISTRY_FIELD.invokeExact(joinGame, registryContainer.build());\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n\n    return joinGame;\n  }\n\n  private CompoundBinaryTag soundVariant(Function<CompoundBinaryTag.Builder, CompoundBinaryTag.Builder> adult,\n      Function<CompoundBinaryTag.Builder, CompoundBinaryTag.Builder> baby) {\n    return CompoundBinaryTag.builder()\n        .put(\"adult_sounds\", adult.apply(CompoundBinaryTag.builder()).build())\n        .put(\"baby_sounds\", baby.apply(CompoundBinaryTag.builder()).build()).build();\n  }\n\n  private JoinGamePacket createLegacyJoinGamePacket() {\n    JoinGamePacket joinGame = this.createJoinGamePacket(ProtocolVersion.MINIMUM_VERSION);\n    joinGame.setDimension(this.world.getDimension().getLegacyID());\n    return joinGame;\n  }\n\n  private DefaultSpawnPositionPacket createDefaultSpawnPositionPacket() {\n    return new DefaultSpawnPositionPacket(this.world.getDimension().getKey(),\n        (int) this.world.getSpawnX(), (int) this.world.getSpawnY(), (int) this.world.getSpawnZ(), 0.0F, 0.0f);\n  }\n\n  private TimeUpdatePacket createWorldTicksPacket() {\n    return this.worldTicks == null ? null : new TimeUpdatePacket(this.worldTicks, this.worldTicks);\n  }\n\n  private AvailableCommandsPacket createAvailableCommandsPacket() {\n    try {\n      AvailableCommandsPacket packet = new AvailableCommandsPacket();\n      ROOT_NODE_FIELD.invokeExact(packet, this.commandNode);\n      return packet;\n    } catch (Throwable e) {\n      throw new ReflectionException(e);\n    }\n  }\n\n  private PreparedPacket createFirstChunks() {\n    PreparedPacket packet = this.plugin.createPreparedPacket();\n    List<List<VirtualChunk>> orderedChunks = this.world.getOrderedChunks();\n\n    int chunkCounter = 0;\n    for (List<VirtualChunk> chunksWithSameDistance : orderedChunks) {\n      if (++chunkCounter > Settings.IMP.MAIN.CHUNK_RADIUS_SEND_ON_SPAWN) {\n        break;\n      }\n\n      for (VirtualChunk chunk : chunksWithSameDistance) {\n        packet.prepare(this.createChunkData(chunk, this.world.getDimension()));\n      }\n    }\n\n    return packet.build();\n  }\n\n  private List<PreparedPacket> createDelayedChunksPackets() {\n    List<List<VirtualChunk>> orderedChunks = this.world.getOrderedChunks();\n    if (orderedChunks.size() <= Settings.IMP.MAIN.CHUNK_RADIUS_SEND_ON_SPAWN) {\n      return List.of();\n    }\n\n    List<PreparedPacket> packets = new LinkedList<>();\n    PreparedPacket packet = this.plugin.createPreparedPacket();\n    int chunkCounter = 0;\n\n    Iterator<List<VirtualChunk>> distanceIterator = orderedChunks.listIterator();\n    for (int i = 0; i < Settings.IMP.MAIN.CHUNK_RADIUS_SEND_ON_SPAWN; i++) {\n      distanceIterator.next();\n    }\n\n    while (distanceIterator.hasNext()) {\n      for (VirtualChunk chunk : distanceIterator.next()) {\n        if (++chunkCounter > Settings.IMP.MAIN.CHUNKS_PER_TICK) {\n          packets.add(packet.build());\n          packet = this.plugin.createPreparedPacket();\n          chunkCounter = 0;\n        }\n\n        packet.prepare(this.createChunkData(chunk, this.world.getDimension()));\n      }\n    }\n\n    packets.add(packet.build());\n\n    return packets;\n  }\n\n  // From Velocity.\n  private List<MinecraftPacket> createFastClientServerSwitch(JoinGamePacket joinGame, ProtocolVersion version) {\n    // In order to handle switching to another server, you will need to send two packets:\n    //\n    // - The join game packet from the backend server, with a different dimension.\n    // - A respawn with the correct dimension.\n    //\n    // Most notably, by having the client accept the join game packet, we can work around the need\n    // to perform entity ID rewrites, eliminating potential issues from rewriting packets and\n    // improving compatibility with mods.\n    List<MinecraftPacket> packets = new ArrayList<>();\n\n    RespawnPacket respawn = RespawnPacket.fromJoinGame(joinGame);\n\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_16) < 0) {\n      // Before Minecraft 1.16, we could not switch to the same dimension without sending an\n      // additional respawn. On older versions of Minecraft this forces the client to perform\n      // garbage collection which adds additional latency.\n      joinGame.setDimension(joinGame.getDimension() == 0 ? -1 : 0);\n    }\n\n    packets.add(joinGame);\n    packets.add(respawn);\n\n    return packets;\n  }\n\n  private List<MinecraftPacket> createSafeClientServerSwitch(JoinGamePacket joinGame) {\n    // Some clients do not behave well with the \"fast\" respawn sequence. In this case we will use\n    // a \"safe\" respawn sequence that involves sending three packets to the client. They have the\n    // same effect but tend to work better with buggier clients (Forge 1.8 in particular).\n    List<MinecraftPacket> packets = new ArrayList<>();\n\n    // Send the JoinGame packet itself, unmodified.\n    packets.add(joinGame);\n\n    // Send a respawn packet in a different dimension.\n    RespawnPacket fakeSwitchPacket = RespawnPacket.fromJoinGame(joinGame);\n    fakeSwitchPacket.setDimension(joinGame.getDimension() == 0 ? -1 : 0);\n    packets.add(fakeSwitchPacket);\n\n    // Now send a respawn packet in the correct dimension.\n    RespawnPacket correctSwitchPacket = RespawnPacket.fromJoinGame(joinGame);\n    packets.add(correctSwitchPacket);\n\n    return packets;\n  }\n\n  private PreparedPacket getBrandMessage(Class<? extends LimboSessionHandler> clazz) {\n    PreparedPacket preparedPacket = this.brandMessages.get(clazz);\n    if (preparedPacket == null) {\n      this.brandMessages.put(clazz, preparedPacket = this.plugin.createPreparedPacket().prepare(this::createBrandMessage).build());\n    }\n\n    return preparedPacket;\n  }\n\n  private PluginMessagePacket createBrandMessage(ProtocolVersion version) {\n    String brand = \"LimboAPI (\" + Settings.IMP.VERSION + \") -> \" + this.limboName;\n    ByteBuf bufWithBrandString = Unpooled.buffer();\n    if (version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      bufWithBrandString.writeCharSequence(brand, StandardCharsets.UTF_8);\n    } else {\n      ProtocolUtils.writeString(bufWithBrandString, brand);\n    }\n\n    return new PluginMessagePacket(\"MC|Brand\", bufWithBrandString);\n  }\n\n  private PositionRotationPacket createPlayerPosAndLook(double posX, double posY, double posZ, float yaw, float pitch) {\n    return new PositionRotationPacket(posX, posY, posZ, yaw, pitch, false, 44, true);\n  }\n\n  private UpdateViewPositionPacket createUpdateViewPosition(int posX, int posZ) {\n    return new UpdateViewPositionPacket(posX >> 4, posZ >> 4);\n  }\n\n  private ChunkDataPacket createChunkData(VirtualChunk chunk, Dimension dimension) {\n    return new ChunkDataPacket(chunk.getFullChunkSnapshot(), dimension.hasLegacySkyLight(), dimension.getMaxSections());\n  }\n\n  public Integer getReadTimeout() {\n    return this.readTimeout;\n  }\n\n  static {\n    try {\n      PARTIAL_HASHED_SEED_FIELD = MethodHandles.privateLookupIn(JoinGamePacket.class, MethodHandles.lookup())\n          .findSetter(JoinGamePacket.class, \"partialHashedSeed\", long.class);\n      CURRENT_DIMENSION_DATA_FIELD = MethodHandles.privateLookupIn(JoinGamePacket.class, MethodHandles.lookup())\n          .findSetter(JoinGamePacket.class, \"currentDimensionData\", CompoundBinaryTag.class);\n      ROOT_NODE_FIELD = MethodHandles.privateLookupIn(AvailableCommandsPacket.class, MethodHandles.lookup())\n          .findSetter(AvailableCommandsPacket.class, \"rootNode\", RootCommandNode.class);\n      GRACEFUL_DISCONNECT_FIELD = MethodHandles.privateLookupIn(VelocityServerConnection.class, MethodHandles.lookup())\n          .findSetter(VelocityServerConnection.class, \"gracefulDisconnect\", boolean.class);\n      REGISTRY_FIELD = MethodHandles.privateLookupIn(JoinGamePacket.class, MethodHandles.lookup())\n          .findSetter(JoinGamePacket.class, \"registry\", CompoundBinaryTag.class);\n      LEVEL_NAMES_FIELDS = MethodHandles.privateLookupIn(JoinGamePacket.class, MethodHandles.lookup())\n          .findSetter(JoinGamePacket.class, \"levelNames\", ImmutableSet.class);\n      try (InputStream stream = LimboAPI.class.getResourceAsStream(\"/mapping/chat_type_1_19.nbt\")) {\n        CHAT_TYPE_119 = BinaryTagIO.unlimitedReader().read(Objects.requireNonNull(stream), BinaryTagIO.Compression.GZIP);\n      }\n      try (InputStream stream = LimboAPI.class.getResourceAsStream(\"/mapping/chat_type_1_19_1.nbt\")) {\n        CHAT_TYPE_1191 = BinaryTagIO.unlimitedReader().read(Objects.requireNonNull(stream), BinaryTagIO.Compression.GZIP);\n      }\n      try (InputStream stream = LimboAPI.class.getResourceAsStream(\"/mapping/damage_type_1_19_4.nbt\")) {\n        DAMAGE_TYPE_1194 = BinaryTagIO.unlimitedReader().read(Objects.requireNonNull(stream), BinaryTagIO.Compression.GZIP);\n      }\n      try (InputStream stream = LimboAPI.class.getResourceAsStream(\"/mapping/damage_type_1_20.nbt\")) {\n        DAMAGE_TYPE_120 = BinaryTagIO.unlimitedReader().read(Objects.requireNonNull(stream), BinaryTagIO.Compression.GZIP);\n      }\n    } catch (NoSuchFieldException | IllegalAccessException e) {\n      throw new ReflectionException(e);\n    } catch (IOException e) {\n      throw new IllegalStateException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/LimboPlayerImpl.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.proxy.Player;\nimport com.velocitypowered.api.proxy.server.RegisteredServer;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.client.ClientConfigSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.LegacyPlayerListItemPacket;\nimport com.velocitypowered.proxy.protocol.packet.UpsertPlayerInfoPacket;\nimport java.awt.Graphics2D;\nimport java.awt.Image;\nimport java.awt.image.BufferedImage;\nimport java.util.EnumSet;\nimport java.util.List;\nimport java.util.UUID;\nimport java.util.concurrent.ScheduledExecutorService;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.api.Limbo;\nimport net.elytrium.limboapi.api.material.Item;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.player.GameMode;\nimport net.elytrium.limboapi.api.player.LimboPlayer;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.elytrium.limboapi.api.protocol.packets.data.AbilityFlags;\nimport net.elytrium.limboapi.api.protocol.packets.data.MapData;\nimport net.elytrium.limboapi.api.protocol.packets.data.MapPalette;\nimport net.elytrium.limboapi.injection.login.LoginTasksQueue;\nimport net.elytrium.limboapi.protocol.packets.s2c.ChangeGameStatePacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.MapDataPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.PlayerAbilitiesPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.PositionRotationPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.SetSlotPacket;\nimport net.elytrium.limboapi.protocol.packets.s2c.TimeUpdatePacket;\nimport net.elytrium.limboapi.server.world.SimpleItem;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport net.kyori.adventure.nbt.IntBinaryTag;\n\npublic class LimboPlayerImpl implements LimboPlayer {\n\n  private final LimboAPI plugin;\n  private final LimboImpl server;\n  private final ConnectedPlayer player;\n  private final MinecraftConnection connection;\n  private final LimboSessionHandlerImpl sessionHandler;\n  private final ProtocolVersion version;\n\n  private GameMode gameMode = GameMode.ADVENTURE;\n\n  public LimboPlayerImpl(LimboAPI plugin, LimboImpl server, ConnectedPlayer player) {\n    this.plugin = plugin;\n    this.server = server;\n    this.player = player;\n\n    this.connection = this.player.getConnection();\n    this.sessionHandler = (LimboSessionHandlerImpl) this.connection.getActiveSessionHandler();\n    this.version = this.player.getProtocolVersion();\n  }\n\n  @Override\n  public void writePacket(Object packetObj) {\n    this.connection.delayedWrite(packetObj);\n  }\n\n  @Override\n  public void writePacketAndFlush(Object packetObj) {\n    this.connection.write(packetObj);\n  }\n\n  @Override\n  public void flushPackets() {\n    this.connection.flush();\n  }\n\n  @Override\n  public void closeWith(Object packetObj) {\n    this.connection.closeWith(packetObj);\n  }\n\n  @Override\n  public ScheduledExecutorService getScheduledExecutor() {\n    return this.connection.eventLoop();\n  }\n\n  @Override\n  public void sendImage(BufferedImage image) {\n    this.sendImage(0, image, true, true);\n  }\n\n  @Override\n  public void sendImage(BufferedImage image, boolean sendItem) {\n    this.sendImage(0, image, sendItem, true);\n  }\n\n  @Override\n  public void sendImage(int mapID, BufferedImage image) {\n    this.sendImage(mapID, image, true, true);\n  }\n\n  @Override\n  public void sendImage(int mapID, BufferedImage image, boolean sendItem) {\n    this.sendImage(mapID, image, sendItem, true);\n  }\n\n  @Override\n  public void sendImage(int mapID, BufferedImage image, boolean sendItem, boolean resize) {\n    if (sendItem) {\n      if (this.version.noLessThan(ProtocolVersion.MINECRAFT_1_20_5)) {\n        this.setInventory(36, SimpleItem.fromItem(Item.FILLED_MAP), 1, mapID,\n            this.plugin.createItemComponentMap().add(ProtocolVersion.MINECRAFT_1_20_5, \"minecraft:map_id\", mapID));\n      } else if (this.version.noLessThan(ProtocolVersion.MINECRAFT_1_17)) {\n        this.setInventory(36, SimpleItem.fromItem(Item.FILLED_MAP), 1, mapID,\n            CompoundBinaryTag.builder().put(\"map\", IntBinaryTag.intBinaryTag(mapID)).build());\n      } else {\n        this.setInventory(36, SimpleItem.fromItem(Item.FILLED_MAP), 1, mapID, (CompoundBinaryTag) null);\n      }\n    }\n\n    if (image.getWidth() != MapData.MAP_DIM_SIZE || image.getHeight() != MapData.MAP_DIM_SIZE) {\n      if (resize) {\n        BufferedImage resizedImage = new BufferedImage(MapData.MAP_DIM_SIZE, MapData.MAP_DIM_SIZE, image.getType());\n\n        Graphics2D graphics = resizedImage.createGraphics();\n        graphics.drawImage(image.getScaledInstance(MapData.MAP_DIM_SIZE, MapData.MAP_DIM_SIZE, Image.SCALE_SMOOTH), 0, 0, null);\n        graphics.dispose();\n\n        image = resizedImage;\n      } else {\n        throw new IllegalStateException(\n            \"You either need to provide an image of \" + MapData.MAP_DIM_SIZE + \"x\" + MapData.MAP_DIM_SIZE\n                + \" pixels or set the resize parameter to true so that API will automatically resize your image.\"\n        );\n      }\n    }\n\n    int[] toWrite = MapPalette.imageToBytes(image, this.version);\n    if (this.version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0) {\n      byte[][] canvas = new byte[MapData.MAP_DIM_SIZE][MapData.MAP_DIM_SIZE];\n      for (int i = 0; i < MapData.MAP_SIZE; ++i) {\n        canvas[i & 127][i >> 7] = (byte) toWrite[i];\n      }\n\n      for (int i = 0; i < MapData.MAP_DIM_SIZE; ++i) {\n        this.writePacket(new MapDataPacket(mapID, (byte) 0, new MapData(i, canvas[i])));\n      }\n\n      this.flushPackets();\n    } else {\n      byte[] canvas = new byte[MapData.MAP_SIZE];\n      for (int i = 0; i < MapData.MAP_SIZE; ++i) {\n        canvas[i] = (byte) toWrite[i];\n      }\n\n      this.writePacketAndFlush(new MapDataPacket(mapID, (byte) 0, new MapData(canvas)));\n    }\n  }\n\n  @Override\n  public void setInventory(VirtualItem item, int count) {\n    this.writePacketAndFlush(new SetSlotPacket(0, 36, item, count, 0, null, null));\n  }\n\n  @Override\n  public void setInventory(VirtualItem item, int slot, int count) {\n    this.writePacketAndFlush(new SetSlotPacket(0, slot, item, count, 0, null, null));\n  }\n\n  @Override\n  public void setInventory(int slot, VirtualItem item, int count, int data, CompoundBinaryTag nbt) {\n    this.writePacketAndFlush(new SetSlotPacket(0, slot, item, count, data, nbt, null));\n  }\n\n  @Override\n  public void setInventory(int slot, VirtualItem item, int count, int data, ItemComponentMap map) {\n    this.writePacketAndFlush(new SetSlotPacket(0, slot, item, count, data, null, map));\n  }\n\n  @Override\n  public void setGameMode(GameMode gameMode) {\n    boolean is17 = this.version.compareTo(ProtocolVersion.MINECRAFT_1_8) < 0;\n    if (gameMode != GameMode.SPECTATOR || !is17) { // Spectator game mode was added in 1.8.\n      this.gameMode = gameMode;\n\n      int id = this.gameMode.getID();\n      this.sendAbilities();\n      if (!is17) {\n        UUID uuid = this.plugin.getInitialID(this.player);\n        if (this.connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_19_1) <= 0) {\n          this.writePacket(\n              new LegacyPlayerListItemPacket(LegacyPlayerListItemPacket.UPDATE_GAMEMODE,\n                  List.of(\n                      new LegacyPlayerListItemPacket.Item(uuid).setGameMode(id)\n                  )\n              )\n          );\n        } else {\n          UpsertPlayerInfoPacket.Entry playerInfoEntry = new UpsertPlayerInfoPacket.Entry(uuid);\n          playerInfoEntry.setGameMode(id);\n\n          this.writePacket(new UpsertPlayerInfoPacket(EnumSet.of(UpsertPlayerInfoPacket.Action.UPDATE_GAME_MODE), List.of(playerInfoEntry)));\n        }\n      }\n      this.writePacket(new ChangeGameStatePacket(3, id));\n\n      this.flushPackets();\n    }\n  }\n\n  @Override\n  public void teleport(double posX, double posY, double posZ, float yaw, float pitch) {\n    this.writePacketAndFlush(new PositionRotationPacket(posX, posY, posZ, yaw, pitch, false, 44, true));\n  }\n\n  @Override\n  public void disableFalling() {\n    this.writePacketAndFlush(new PlayerAbilitiesPacket((byte) (this.getAbilities() | AbilityFlags.FLYING | AbilityFlags.ALLOW_FLYING), 0F, 0F));\n  }\n\n  @Override\n  public void enableFalling() {\n    this.writePacketAndFlush(new PlayerAbilitiesPacket((byte) (this.getAbilities() & (~AbilityFlags.FLYING)), 0.05F, 0.1F));\n  }\n\n  @Override\n  public void disconnect() {\n    this.connection.eventLoop().execute(() -> {\n      if (this.connection.getActiveSessionHandler() == this.sessionHandler) {\n        this.sessionHandler.disconnect(() -> {\n          if (this.plugin.hasLoginQueue(this.player)) {\n            if (this.connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n              this.sessionHandler.disconnectToConfig(() -> this.plugin.getLoginQueue(this.player).next());\n            } else {\n              this.sessionHandler.disconnected();\n              this.plugin.getLoginQueue(this.player).next();\n            }\n          } else {\n            RegisteredServer server = this.sessionHandler.getPreviousServer();\n            if (server != null) {\n              this.sendToRegisteredServer(server);\n            } else {\n              this.sessionHandler.disconnected();\n            }\n          }\n        });\n      }\n    });\n  }\n\n  @Override\n  public void disconnect(RegisteredServer server) {\n    this.connection.eventLoop().execute(() -> {\n      if (this.connection.getActiveSessionHandler() == this.sessionHandler) {\n        this.sessionHandler.disconnect(() -> {\n          if (this.plugin.hasLoginQueue(this.player)) {\n            if (this.connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n              this.sessionHandler.disconnectToConfig(() -> {\n                this.plugin.setNextServer(this.player, server);\n                this.plugin.getLoginQueue(this.player).next();\n              });\n            } else {\n              this.sessionHandler.disconnected();\n              this.plugin.setNextServer(this.player, server);\n              this.plugin.getLoginQueue(this.player).next();\n            }\n          } else {\n            this.sendToRegisteredServer(server);\n          }\n        });\n      }\n    });\n  }\n\n  private void deject() {\n    this.plugin.deject3rdParty(this.connection.getChannel().pipeline());\n    this.plugin.fixCompressor(this.connection.getChannel().pipeline(), this.version);\n  }\n\n  private void sendToRegisteredServer(RegisteredServer server) {\n    this.deject();\n    this.connection.setState(StateRegistry.PLAY);\n\n    if (this.connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0) {\n      this.sessionHandler.disconnectToConfig(() -> {\n        // Rollback original CONFIG handler\n        ClientConfigSessionHandler handler = new ClientConfigSessionHandler(this.plugin.getServer(), this.player);\n        LoginTasksQueue.BRAND_CHANNEL_SETTER.accept(handler, \"minecraft:brand\");\n        this.connection.setActiveSessionHandler(StateRegistry.CONFIG, handler);\n        this.player.createConnectionRequest(server).fireAndForget();\n      });\n    } else {\n      if (this.connection.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_19_1) <= 0) {\n        this.connection.delayedWrite(new LegacyPlayerListItemPacket(\n            LegacyPlayerListItemPacket.REMOVE_PLAYER,\n            List.of(new LegacyPlayerListItemPacket.Item(this.plugin.getInitialID(this.player)))\n        ));\n      }\n\n      this.sessionHandler.disconnected();\n      this.player.createConnectionRequest(server).fireAndForget();\n    }\n  }\n\n  @Override\n  public void sendAbilities() {\n    this.writePacketAndFlush(new PlayerAbilitiesPacket(this.getAbilities(), 0.05F, 0.1F));\n  }\n\n  @Override\n  public void sendAbilities(int abilities, float flySpeed, float walkSpeed) {\n    this.writePacketAndFlush(new PlayerAbilitiesPacket((byte) abilities, flySpeed, walkSpeed));\n  }\n\n  @Override\n  public void sendAbilities(byte abilities, float flySpeed, float walkSpeed) {\n    this.writePacketAndFlush(new PlayerAbilitiesPacket(abilities, flySpeed, walkSpeed));\n  }\n\n  @Override\n  public byte getAbilities() {\n    return switch (this.gameMode) {\n      case CREATIVE -> AbilityFlags.ALLOW_FLYING | AbilityFlags.CREATIVE_MODE | AbilityFlags.INVULNERABLE;\n      case SPECTATOR -> AbilityFlags.ALLOW_FLYING | AbilityFlags.INVULNERABLE | AbilityFlags.FLYING;\n      default -> 0;\n    };\n  }\n\n  @Override\n  public GameMode getGameMode() {\n    return this.gameMode;\n  }\n\n  @Override\n  public Limbo getServer() {\n    return this.server;\n  }\n\n  @Override\n  public Player getProxyPlayer() {\n    return this.player;\n  }\n\n  @Override\n  public int getPing() {\n    LimboSessionHandlerImpl handler = (LimboSessionHandlerImpl) this.connection.getActiveSessionHandler();\n    if (handler != null) {\n      return handler.getPing();\n    } else {\n      return -1;\n    }\n  }\n\n  @Override\n  public void setWorldTime(long ticks) {\n    this.writePacketAndFlush(new TimeUpdatePacket(ticks, ticks));\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/LimboSessionHandlerImpl.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.proxy.server.RegisteredServer;\nimport com.velocitypowered.proxy.connection.MinecraftConnection;\nimport com.velocitypowered.proxy.connection.MinecraftSessionHandler;\nimport com.velocitypowered.proxy.connection.client.AuthSessionHandler;\nimport com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler;\nimport com.velocitypowered.proxy.connection.client.ConnectedPlayer;\nimport com.velocitypowered.proxy.network.Connections;\nimport com.velocitypowered.proxy.protocol.MinecraftPacket;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.StateRegistry;\nimport com.velocitypowered.proxy.protocol.packet.ClientSettingsPacket;\nimport com.velocitypowered.proxy.protocol.packet.KeepAlivePacket;\nimport com.velocitypowered.proxy.protocol.packet.PluginMessagePacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.keyed.KeyedPlayerChatPacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.keyed.KeyedPlayerCommandPacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.legacy.LegacyChatPacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.session.SessionPlayerChatPacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.session.SessionPlayerCommandPacket;\nimport com.velocitypowered.proxy.protocol.packet.chat.session.UnsignedPlayerCommandPacket;\nimport com.velocitypowered.proxy.protocol.packet.config.FinishedUpdatePacket;\nimport com.velocitypowered.proxy.protocol.packet.config.StartUpdatePacket;\nimport com.velocitypowered.proxy.protocol.util.PluginMessageUtil;\nimport com.velocitypowered.proxy.util.except.QuietDecoderException;\nimport io.netty.buffer.ByteBuf;\nimport io.netty.channel.ChannelPipeline;\nimport io.netty.handler.timeout.ReadTimeoutHandler;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.MethodType;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.concurrent.ScheduledFuture;\nimport java.util.concurrent.ThreadLocalRandom;\nimport java.util.concurrent.TimeUnit;\nimport java.util.function.Supplier;\nimport net.elytrium.commons.utils.reflection.ReflectionException;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.Settings;\nimport net.elytrium.limboapi.api.LimboSessionHandler;\nimport net.elytrium.limboapi.api.player.LimboPlayer;\nimport net.elytrium.limboapi.injection.login.confirmation.LoginConfirmHandler;\nimport net.elytrium.limboapi.protocol.LimboProtocol;\nimport net.elytrium.limboapi.protocol.packets.c2s.MoveOnGroundOnlyPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.MovePacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.MovePositionOnlyPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.MoveRotationOnlyPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.PlayerChatSessionPacket;\nimport net.elytrium.limboapi.protocol.packets.c2s.TeleportConfirmPacket;\n\npublic class LimboSessionHandlerImpl implements MinecraftSessionHandler {\n\n  private static final boolean BACKPRESSURE_LOG =\n      Boolean.getBoolean(\"velocity.log-server-backpressure\");\n\n  private static final MethodHandle TEARDOWN_METHOD;\n\n  private final LimboAPI plugin;\n  private final LimboImpl limbo;\n  private final ConnectedPlayer player;\n  private final LimboSessionHandler callback;\n  private final StateRegistry originalState;\n  private final MinecraftSessionHandler originalHandler;\n  private final RegisteredServer previousServer;\n  private final Supplier<String> limboName;\n  private final CompletableFuture<Object> playTransition = new CompletableFuture<>();\n  private final CompletableFuture<Object> configTransition = new CompletableFuture<>();\n  private final CompletableFuture<Object> chatSession = new CompletableFuture<>();\n\n  private LimboPlayer limboPlayer;\n  private ClientSettingsPacket settings;\n  private String brand;\n  private ScheduledFuture<?> keepAliveTask;\n  private ScheduledFuture<?> chatSessionTimeoutTask;\n  private ScheduledFuture<?> respawnTask;\n  private long keepAliveKey;\n  private boolean keepAlivePending;\n  private int keepAlivesSkipped;\n  private long keepAliveSentTime;\n  private int ping = -1;\n  private int genericBytes;\n  private boolean loaded;\n  private boolean switching;\n  private boolean disconnecting;\n  private boolean joinGameTriggered;\n\n  public LimboSessionHandlerImpl(LimboAPI plugin, LimboImpl limbo, ConnectedPlayer player,\n      LimboSessionHandler callback, StateRegistry originalState, MinecraftSessionHandler originalHandler,\n      RegisteredServer previousServer, Supplier<String> limboName) {\n    this.plugin = plugin;\n    this.limbo = limbo;\n    this.player = player;\n    this.callback = callback;\n    this.originalState = originalState;\n    this.originalHandler = originalHandler;\n    this.previousServer = previousServer;\n    this.limboName = limboName;\n    this.loaded = player.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_18_2) < 0;\n\n    if (originalHandler instanceof LimboSessionHandlerImpl sessionHandler) {\n      this.settings = sessionHandler.getSettings();\n      this.brand = sessionHandler.getBrand();\n    }\n  }\n\n  public void onConfig(LimboPlayer player) {\n    this.loaded = true;\n    this.limboPlayer = player;\n    this.callback.onConfig(this.limbo, player);\n\n    Integer serverReadTimeout = this.limbo.getReadTimeout();\n    if (serverReadTimeout == null) {\n      serverReadTimeout = this.plugin.getServer().getConfiguration().getReadTimeout();\n    }\n\n    // We should always send multiple keepalives inside a single timeout to not trigger Netty read timeout.\n    serverReadTimeout /= 2;\n\n    this.keepAliveTask = player.getScheduledExecutor().scheduleAtFixedRate(() -> {\n      MinecraftConnection connection = this.player.getConnection();\n      if (connection.isClosed()) {\n        this.keepAliveTask.cancel(true);\n        return;\n      }\n\n      if (this.keepAlivePending) {\n        if (++this.keepAlivesSkipped == 2) {\n          connection.closeWith(this.plugin.getPackets().getTimeOut(this.player.getConnection().getState()));\n          if (Settings.IMP.MAIN.LOGGING_ENABLED) {\n            LimboAPI.getLogger().warn(\"{} was kicked due to keepalive timeout.\", this.player);\n          }\n        }\n      } else if (this.keepAliveSentTime == 0 && this.originalHandler instanceof LimboSessionHandlerImpl sessionHandler) {\n        this.keepAliveKey = sessionHandler.keepAliveKey;\n        this.keepAlivePending = sessionHandler.keepAlivePending;\n        this.keepAlivesSkipped = sessionHandler.keepAlivesSkipped;\n        this.keepAliveSentTime = sessionHandler.keepAliveSentTime;\n        this.ping = sessionHandler.ping;\n      } else {\n        this.keepAliveKey = ThreadLocalRandom.current().nextInt();\n        KeepAlivePacket keepAlive = new KeepAlivePacket();\n        keepAlive.setRandomId(this.keepAliveKey);\n        connection.write(keepAlive);\n        this.keepAlivePending = true;\n        this.keepAlivesSkipped = 0;\n        this.keepAliveSentTime = System.currentTimeMillis();\n      }\n    }, 250, serverReadTimeout, TimeUnit.MILLISECONDS);\n  }\n\n  public void onSpawn() {\n    this.callback.onSpawn(this.limbo, this.limboPlayer);\n\n    // Player is spawned, so can trust that transition to the PLAY state is complete\n    this.playTransition.complete(this);\n  }\n\n  public void disconnectToConfig(Runnable runnable) {\n    if (this.configTransition.isDone()) {\n      runnable.run();\n      return;\n    }\n\n    this.release();\n\n    this.switching = true;\n    this.loaded = false;\n\n    if (this.player.isOnlineMode() && this.player.getProtocolVersion().lessThan(ProtocolVersion.MINECRAFT_1_21_2) && this.joinGameTriggered) {\n      // There is a race condition in the client then it reconnects too quickly (https://bugs.mojang.com/browse/MC-272506)\n      if (!this.chatSession.isDone() && this.chatSessionTimeoutTask == null) {\n        this.chatSessionTimeoutTask = this.player.getConnection().eventLoop()\n            .schedule(() -> this.chatSession.complete(this), Settings.IMP.MAIN.CHAT_SESSION_PACKET_TIMEOUT, TimeUnit.MILLISECONDS);\n      }\n      this.chatSession.thenRunAsync(() -> {\n        this.player.getConnection().write(StartUpdatePacket.INSTANCE);\n        this.configTransition.thenRun(this::disconnected).thenRun(runnable);\n      }, this.player.getConnection().eventLoop());\n    } else {\n      this.player.getConnection().write(StartUpdatePacket.INSTANCE);\n      this.configTransition.thenRun(this::disconnected).thenRun(runnable);\n    }\n  }\n\n  @Override\n  public boolean handle(FinishedUpdatePacket packet) {\n    // Switching to CONFIG state\n    if (this.player.getConnection().getState() != StateRegistry.CONFIG) {\n      this.plugin.setActiveSessionHandler(this.player.getConnection(), StateRegistry.CONFIG, this);\n\n      if (!this.loaded && !this.disconnecting) {\n        this.limbo.spawnPlayerLocal(this.callback.getClass(), this, this.player, this.player.getConnection());\n      } else if (this.switching) {\n        this.switching = false;\n        this.configTransition.complete(this);\n      } else {\n        this.player.getConnection().closeWith(this.plugin.getPackets().getInvalidSwitch());\n\n        if (Settings.IMP.MAIN.LOGGING_ENABLED) {\n          LimboAPI.getLogger().warn(\"{} sent an unexpected state switch confirmation.\", this.player);\n        }\n      }\n\n      return true;\n    }\n\n    this.limbo.onSpawn(this.callback.getClass(), this.player.getConnection(), this.player, this);\n    this.player.getConnection().flush();\n    return true;\n  }\n\n  public boolean handle(MovePacket packet) {\n    if (this.loaded) {\n      this.callback.onGround(packet.isOnGround());\n      this.callback.onMove(packet.getX(), packet.getY(), packet.getZ());\n      this.callback.onMove(packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getPitch());\n      this.callback.onRotate(packet.getYaw(), packet.getPitch());\n    }\n\n    return true;\n  }\n\n  public boolean handle(MovePositionOnlyPacket packet) {\n    if (this.loaded) {\n      this.callback.onGround(packet.isOnGround());\n      this.callback.onMove(packet.getX(), packet.getY(), packet.getZ());\n    }\n\n    return true;\n  }\n\n  public boolean handle(MoveRotationOnlyPacket packet) {\n    if (this.loaded) {\n      this.callback.onGround(packet.isOnGround());\n      this.callback.onRotate(packet.getYaw(), packet.getPitch());\n    }\n\n    return true;\n  }\n\n  public boolean handle(MoveOnGroundOnlyPacket packet) {\n    if (this.loaded) {\n      this.callback.onGround(packet.isOnGround());\n    }\n\n    return true;\n  }\n\n  public boolean handle(TeleportConfirmPacket packet) {\n    if (this.loaded) {\n      this.callback.onTeleport(packet.getTeleportID());\n    }\n\n    return true;\n  }\n\n  @Override\n  public boolean handle(KeepAlivePacket packet) {\n    MinecraftConnection connection = this.player.getConnection();\n    if (this.keepAlivePending) {\n      if (packet.getRandomId() != this.keepAliveKey) {\n        connection.closeWith(this.plugin.getPackets().getInvalidPing());\n        if (Settings.IMP.MAIN.LOGGING_ENABLED) {\n          LimboAPI.getLogger().warn(\"{} sent an invalid keepalive.\", this.player);\n        }\n        return false;\n      } else {\n        this.keepAlivePending = false;\n        this.keepAlivesSkipped = 0;\n        int currentPing = (int) (System.currentTimeMillis() - this.keepAliveSentTime);\n        this.ping = this.ping == -1 ? currentPing : (this.ping * 3 + currentPing) / 4;\n        return true;\n      }\n    } else {\n      connection.closeWith(this.plugin.getPackets().getInvalidPing());\n\n      if (Settings.IMP.MAIN.LOGGING_ENABLED) {\n        LimboAPI.getLogger().warn(\"{} sent an unexpected keepalive.\", this.player);\n      }\n      return false;\n    }\n  }\n\n  @Override\n  public boolean handle(LegacyChatPacket packet) {\n    return this.handleChat(packet.getMessage());\n  }\n\n  @Override\n  public boolean handle(KeyedPlayerChatPacket packet) {\n    return this.handleChat(packet.getMessage());\n  }\n\n  @Override\n  public boolean handle(KeyedPlayerCommandPacket packet) {\n    return this.handleChat(\"/\" + packet.getCommand());\n  }\n\n  @Override\n  public boolean handle(SessionPlayerChatPacket packet) {\n    return this.handleChat(packet.getMessage());\n  }\n\n  @Override\n  public boolean handle(SessionPlayerCommandPacket packet) {\n    return this.handleChat(\"/\" + packet.getCommand());\n  }\n\n  private boolean handleChat(String message) {\n    int messageLength = message.length();\n    if (messageLength > Settings.IMP.MAIN.MAX_CHAT_MESSAGE_LENGTH) {\n      this.kickTooBigPacket(\"chat\", messageLength);\n    } else {\n      this.callback.onChat(message);\n    }\n\n    return true;\n  }\n\n  @Override\n  public void handleUnknown(ByteBuf packet) {\n    int readableBytes = packet.readableBytes();\n    this.genericBytes += readableBytes;\n    if (readableBytes > Settings.IMP.MAIN.MAX_UNKNOWN_PACKET_LENGTH) {\n      this.kickTooBigPacket(\"unknown\", readableBytes);\n    } else if (this.genericBytes > Settings.IMP.MAIN.MAX_MULTI_GENERIC_PACKET_LENGTH) {\n      this.kickTooBigPacket(\"unknown, multi\", this.genericBytes);\n    }\n  }\n\n  @Override\n  public void handleGeneric(MinecraftPacket packet) {\n    if (packet instanceof ClientSettingsPacket clientSettings) {\n      this.settings = clientSettings;\n    } else if (packet instanceof PlayerChatSessionPacket) {\n      if (this.chatSessionTimeoutTask != null) {\n        this.chatSessionTimeoutTask.cancel(true);\n      }\n      this.chatSession.complete(this);\n    } else if (packet instanceof PluginMessagePacket pluginMessage) {\n      int singleLength = pluginMessage.content().readableBytes() + pluginMessage.getChannel().length() * 4;\n      this.genericBytes += singleLength;\n      if (singleLength > Settings.IMP.MAIN.MAX_SINGLE_GENERIC_PACKET_LENGTH) {\n        this.kickTooBigPacket(\"generic (PluginMessage packet (custom payload)), single\", singleLength);\n        return;\n      } else if (this.genericBytes > Settings.IMP.MAIN.MAX_MULTI_GENERIC_PACKET_LENGTH) {\n        this.kickTooBigPacket(\"generic (PluginMessage packet (custom payload)), multi\", this.genericBytes);\n        return;\n      }\n\n      if (this.player.getConnection().getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) >= 0\n          && PluginMessageUtil.isMcBrand(pluginMessage)) {\n        try {\n          this.brand = ProtocolUtils.readString(pluginMessage.content().slice(), Settings.IMP.MAIN.MAX_BRAND_NAME_LENGTH);\n        } catch (QuietDecoderException ignored) {\n          this.kickTooBigPacket(\"brand name\", pluginMessage.content().readableBytes());\n          return;\n        }\n      }\n    } else if (packet instanceof UnsignedPlayerCommandPacket commandPacket) {\n      this.handleChat(\"/\" + commandPacket.getCommand());\n      return;\n    }\n\n    this.callback.onGeneric(packet);\n  }\n\n  @Override\n  public void writabilityChanged() {\n    if (BACKPRESSURE_LOG) {\n      if (this.player.getConnection().getChannel().isWritable()) {\n        LimboAPI.getLogger().info(\"{} is writable, will auto-read\", this.player);\n      } else {\n        LimboAPI.getLogger().info(\"{} is not writable, not auto-reading\", this.player);\n      }\n    }\n  }\n\n  private void kickTooBigPacket(String type, int length) {\n    this.player.getConnection().closeWith(this.plugin.getPackets().getTooBigPacket());\n\n    if (Settings.IMP.MAIN.LOGGING_ENABLED) {\n      LimboAPI.getLogger().warn(\"{} sent too big packet. (type: {}, length: {})\", this.player, type, length);\n    }\n  }\n\n  public void release() {\n    if (this.keepAliveTask != null) {\n      this.keepAliveTask.cancel(true);\n    }\n\n    if (this.respawnTask != null) {\n      this.respawnTask.cancel(true);\n    }\n\n    if (this.loaded) {\n      this.limbo.onDisconnect();\n      this.callback.onDisconnect();\n    }\n  }\n\n  @Override\n  public void disconnected() {\n    //this.disconnected = true;\n    this.release();\n\n    if (Settings.IMP.MAIN.LOGGING_ENABLED) {\n      LimboAPI.getLogger().info(\n          \"{} ({}) has disconnected from the {} Limbo\", this.player.getUsername(), this.player.getRemoteAddress(), this.limboName.get()\n      );\n    }\n\n    MinecraftConnection connection = this.player.getConnection();\n    if (connection.isClosed()) {\n      try {\n        TEARDOWN_METHOD.invokeExact(this.player);\n      } catch (Throwable e) {\n        throw new ReflectionException(e);\n      }\n\n      return;\n    }\n\n    if (!(this.originalHandler instanceof AuthSessionHandler)\n        && !(this.originalHandler instanceof LimboSessionHandlerImpl)\n        && !(this.originalHandler instanceof ClientPlaySessionHandler) // cause issues with server switching\n        && !(this.originalHandler instanceof LoginConfirmHandler)) {\n      connection.eventLoop().execute(() -> {\n        // Ensure that originalHandler is returned to the proper state\n        if (connection.getState() != this.originalState) {\n          connection.addSessionHandler(this.originalState, this.originalHandler);\n        } else {\n          this.plugin.setActiveSessionHandler(connection, connection.getState(), this.originalHandler);\n        }\n      });\n    }\n\n    ChannelPipeline pipeline = connection.getChannel().pipeline();\n\n    if (pipeline.get(LimboProtocol.READ_TIMEOUT) != null) {\n      pipeline.replace(LimboProtocol.READ_TIMEOUT, Connections.READ_TIMEOUT,\n          new ReadTimeoutHandler(this.plugin.getServer().getConfiguration().getReadTimeout(), TimeUnit.MILLISECONDS)\n      );\n    }\n  }\n\n  public void disconnect(Runnable runnable) {\n    if (!this.disconnecting) {\n      this.disconnecting = true;\n      if (this.player.getConnection().getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_20_2) < 0) {\n        runnable.run();\n      } else {\n        this.playTransition.thenRun(runnable);\n      }\n    }\n  }\n\n  public RegisteredServer getPreviousServer() {\n    return this.previousServer;\n  }\n\n  public int getPing() {\n    return this.ping;\n  }\n\n  public void setJoinGameTriggered(boolean joinGameTriggered) {\n    this.joinGameTriggered = joinGameTriggered;\n  }\n\n  public void setRespawnTask(ScheduledFuture<?> respawnTask) {\n    if (this.respawnTask != null) {\n      this.respawnTask.cancel(true);\n    }\n\n    this.respawnTask = respawnTask;\n  }\n\n  public ClientSettingsPacket getSettings() {\n    return this.settings;\n  }\n\n  public String getBrand() {\n    return this.brand;\n  }\n\n  static {\n    try {\n      TEARDOWN_METHOD = MethodHandles.privateLookupIn(ConnectedPlayer.class, MethodHandles.lookup())\n          .findVirtual(ConnectedPlayer.class, \"teardown\", MethodType.methodType(void.class));\n    } catch (NoSuchMethodException | IllegalAccessException e) {\n      throw new ReflectionException(e);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/SimpleItemComponentManager.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item;\n\nimport com.google.gson.Gson;\nimport com.google.gson.internal.LinkedTreeMap;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport it.unimi.dsi.fastutil.Function;\nimport it.unimi.dsi.fastutil.objects.Object2IntMap;\nimport it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;\nimport java.io.InputStreamReader;\nimport java.nio.charset.StandardCharsets;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Objects;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.server.item.type.BooleanItemComponent;\nimport net.elytrium.limboapi.server.item.type.ComponentItemComponent;\nimport net.elytrium.limboapi.server.item.type.ComponentsItemComponent;\nimport net.elytrium.limboapi.server.item.type.DyedColorItemComponent;\nimport net.elytrium.limboapi.server.item.type.EmptyItemComponent;\nimport net.elytrium.limboapi.server.item.type.EnchantmentsItemComponent;\nimport net.elytrium.limboapi.server.item.type.GameProfileItemComponent;\nimport net.elytrium.limboapi.server.item.type.IntItemComponent;\nimport net.elytrium.limboapi.server.item.type.StringItemComponent;\nimport net.elytrium.limboapi.server.item.type.StringsItemComponent;\nimport net.elytrium.limboapi.server.item.type.TagItemComponent;\nimport net.elytrium.limboapi.server.item.type.VarIntItemComponent;\nimport net.elytrium.limboapi.server.item.type.WriteableItemComponent;\n\npublic class SimpleItemComponentManager {\n\n  private static final Gson GSON = new Gson();\n\n  private static final Map<ProtocolVersion, Object2IntMap<String>> ID = new HashMap<>();\n\n  static {\n    LinkedTreeMap<String, LinkedTreeMap<String, String>> mapping = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/data_component_types_mapping.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    LinkedTreeMap<String, String> components = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/data_component_types.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    Map<String, ProtocolVersion> cache = new HashMap<>();\n    for (ProtocolVersion version : ProtocolVersion.values()) {\n      if (version.compareTo(ProtocolVersion.MINECRAFT_1_20_5) < 0) {\n        continue;\n      }\n\n      cache.put(version.name().substring(\"MINECRAFT_\".length()).replace('_', '.'), version);\n    }\n\n    components.forEach((name, id) -> {\n      mapping.get(id).forEach((version, protocolId) -> {\n        ID.computeIfAbsent(cache.get(version), key -> new Object2IntOpenHashMap<>()).put(name, Integer.parseInt(protocolId));\n      });\n    });\n  }\n\n  private final Map<String, Function<ProtocolVersion, WriteableItemComponent>> factory = new HashMap<>();\n\n  public SimpleItemComponentManager() {\n    // TODO: implement missing components:\n    //  trim, intangible_projectile, food, suspicious_stew_effects, lock, tool,\n    //  can_break, writable_book_content, potion_contents, bees, banner_patterns,\n    //  pot_decorations, map_decorations, debug_stick_state, can_place_on, lodestone_tracker,\n    //  written_book_content, container_loot, container, block_state, attribute_modifiers,\n    //  bundle_contents, firework_explosion, charged_projectiles, fireworks\n    this.register(\"minecraft:lore\", version -> new ComponentsItemComponent(\"minecraft:lore\"));\n    this.register(\"minecraft:dyed_color\", version -> new DyedColorItemComponent(\"minecraft:dyed_color\"));\n    this.register(\"minecraft:profile\", version -> new GameProfileItemComponent(\"minecraft:profile\"));\n\n    for (String type : new String[] { \"minecraft:max_stack_size\", \"minecraft:max_damage\",\n                                      \"minecraft:damage\", \"minecraft:rarity\", \"minecraft:custom_model_data\",\n                                      \"minecraft:repair_cost\", \"minecraft:map_id\", \"minecraft:map_post_processing\",\n                                      \"minecraft:ominous_bottle_amplifier\", \"minecraft:base_color\" }) {\n      this.register(type, version -> new VarIntItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:unbreakable\", \"minecraft:enchantment_glint_override\" }) {\n      this.register(type, version -> new BooleanItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:custom_name\", \"minecraft:item_name\" }) {\n      this.register(type, version -> new ComponentItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:hide_additional_tooltip\", \"minecraft:hide_tooltip\",\n                                      \"minecraft:creative_slot_lock\", \"minecraft:fire_resistant\" }) {\n      this.register(type, version -> new EmptyItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:enchantments\", \"minecraft:stored_enchantments\" }) {\n      this.register(type, version -> new EnchantmentsItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:map_color\" }) {\n      this.register(type, version -> new IntItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:custom_data\", \"minecraft:entity_data\",\n                                      \"minecraft:bucket_entity_data\", \"minecraft:block_entity_data\" }) {\n      this.register(type, version -> new TagItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:instrument\", \"minecraft:note_block_sound\" }) {\n      this.register(type, version -> new StringItemComponent(type));\n    }\n\n    for (String type : new String[] { \"minecraft:recipes\" }) {\n      this.register(type, version -> new StringsItemComponent(type));\n    }\n  }\n\n  public <T> void register(String name, Function<ProtocolVersion, WriteableItemComponent> factory) {\n    this.factory.put(name, factory);\n  }\n\n  public <T> WriteableItemComponent<T> createComponent(ProtocolVersion version, String name) {\n    return (WriteableItemComponent<T>) this.factory.get(name).apply(version);\n  }\n\n  public int getId(String name, ProtocolVersion version) {\n    Object2IntMap<String> ids = ID.get(version);\n    if (ids == null) {\n      throw new IllegalArgumentException(\"unsupported version: \" + version);\n    }\n\n    if (!ids.containsKey(name)) {\n      throw new IllegalStateException(\"component not found: \" + name);\n    }\n\n    return ids.getInt(name);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/SimpleItemComponentMap.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.ArrayList;\nimport java.util.List;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponent;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponentMap;\nimport net.elytrium.limboapi.server.item.type.WriteableItemComponent;\n\npublic class SimpleItemComponentMap implements ItemComponentMap {\n\n  private final List<WriteableItemComponent<?>> addedComponents = new ArrayList<>();\n  private final List<WriteableItemComponent<?>> removedComponents = new ArrayList<>();\n  private final SimpleItemComponentManager manager;\n\n  public SimpleItemComponentMap(SimpleItemComponentManager manager) {\n    this.manager = manager;\n  }\n\n  @Override\n  public <T> ItemComponentMap add(ProtocolVersion version, String name, T value) {\n    this.addedComponents.add((WriteableItemComponent<?>) this.manager.createComponent(version, name).setValue(value));\n    return this;\n  }\n\n  @Override\n  public ItemComponentMap remove(ProtocolVersion version, String name) {\n    this.removedComponents.add(this.manager.createComponent(version, name));\n    return null;\n  }\n\n  @Override\n  public List<ItemComponent> getAdded() {\n    return (List<ItemComponent>) (Object) this.addedComponents;\n  }\n\n  @Override\n  public List<ItemComponent> getRemoved() {\n    return (List<ItemComponent>) (Object) this.removedComponents;\n  }\n\n  @Override\n  public void read(ProtocolVersion version, Object buffer) {\n    // TODO: implement\n    throw new UnsupportedOperationException(\"read\");\n  }\n\n  @Override\n  public void write(ProtocolVersion version, Object buffer) {\n    ByteBuf buf = (ByteBuf) buffer;\n\n    ProtocolUtils.writeVarInt(buf, this.getAdded().size());\n    ProtocolUtils.writeVarInt(buf, this.getRemoved().size());\n\n    for (WriteableItemComponent<?> component : this.addedComponents) {\n      ProtocolUtils.writeVarInt(buf, this.manager.getId(component.getName(), version));\n      component.write(version, buf);\n    }\n\n    for (WriteableItemComponent<?> component : this.removedComponents) {\n      ProtocolUtils.writeVarInt(buf, this.manager.getId(component.getName(), version));\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/BooleanItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.buffer.ByteBuf;\n\npublic class BooleanItemComponent extends WriteableItemComponent<Boolean> {\n\n  public BooleanItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    buffer.writeBoolean(this.getValue());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/ComponentItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.packet.chat.ComponentHolder;\nimport io.netty.buffer.ByteBuf;\nimport net.kyori.adventure.text.Component;\n\npublic class ComponentItemComponent extends WriteableItemComponent<Component> {\n\n  public ComponentItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    new ComponentHolder(version, this.getValue()).write(buffer);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/ComponentsItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport com.velocitypowered.proxy.protocol.packet.chat.ComponentHolder;\nimport io.netty.buffer.ByteBuf;\nimport java.util.List;\nimport net.kyori.adventure.text.Component;\n\npublic class ComponentsItemComponent extends WriteableItemComponent<List<Component>> {\n\n  public ComponentsItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    ProtocolUtils.writeVarInt(buffer, this.getValue().size());\n    for (Component component : this.getValue()) {\n      new ComponentHolder(version, component).write(buffer);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/DyedColorItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.buffer.ByteBuf;\nimport it.unimi.dsi.fastutil.Pair;\n\npublic class DyedColorItemComponent extends WriteableItemComponent<Pair<Integer, Boolean>> {\n\n  public DyedColorItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    buffer.writeInt(this.getValue().left());\n    buffer.writeBoolean(this.getValue().right());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/EmptyItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.buffer.ByteBuf;\nimport net.kyori.adventure.nbt.BinaryTag;\n\npublic class EmptyItemComponent extends WriteableItemComponent<BinaryTag> {\n\n  public EmptyItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/EnchantmentsItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport it.unimi.dsi.fastutil.Pair;\nimport java.util.List;\n\npublic class EnchantmentsItemComponent extends WriteableItemComponent<Pair<List<Pair<Integer, Integer>>, Boolean>> {\n\n  public EnchantmentsItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    ProtocolUtils.writeVarInt(buffer, this.getValue().left().size());\n    for (Pair<Integer, Integer> enchantment : this.getValue().left()) {\n      ProtocolUtils.writeVarInt(buffer, enchantment.left());\n      ProtocolUtils.writeVarInt(buffer, enchantment.right());\n    }\n    buffer.writeBoolean(this.getValue().right());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/GameProfileItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.api.util.GameProfile;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.UUID;\n\npublic class GameProfileItemComponent extends WriteableItemComponent<GameProfile> {\n\n  private static final UUID ZERO = new UUID(0, 0);\n\n  public GameProfileItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    buffer.writeBoolean(!this.getValue().getName().isEmpty());\n    if (!this.getValue().getName().isEmpty()) {\n      ProtocolUtils.writeString(buffer, this.getValue().getName());\n    }\n\n    buffer.writeBoolean(!this.getValue().getId().equals(ZERO));\n    if (!this.getValue().getId().equals(ZERO)) {\n      ProtocolUtils.writeUuid(buffer, this.getValue().getId());\n    }\n\n    ProtocolUtils.writeProperties(buffer, this.getValue().getProperties());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/IntItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.buffer.ByteBuf;\n\npublic class IntItemComponent extends WriteableItemComponent<Integer> {\n\n  public IntItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    buffer.writeInt(this.getValue());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/StringItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class StringItemComponent extends WriteableItemComponent<String> {\n\n  public StringItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    ProtocolUtils.writeString(buffer, this.getValue());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/StringsItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport java.util.List;\n\npublic class StringsItemComponent extends WriteableItemComponent<List<String>> {\n\n  public StringsItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    ProtocolUtils.writeVarInt(buffer, this.getValue().size());\n    for (String string : this.getValue()) {\n      ProtocolUtils.writeString(buffer, string);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/TagItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\nimport net.kyori.adventure.nbt.BinaryTag;\n\npublic class TagItemComponent extends WriteableItemComponent<BinaryTag> {\n\n  public TagItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    ProtocolUtils.writeBinaryTag(buffer, version, this.getValue());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/VarIntItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class VarIntItemComponent extends WriteableItemComponent<Integer> {\n\n  public VarIntItemComponent(String name) {\n    super(name);\n  }\n\n  @Override\n  public void write(ProtocolVersion version, ByteBuf buffer) {\n    ProtocolUtils.writeVarInt(buffer, this.getValue());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/item/type/WriteableItemComponent.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.item.type;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.buffer.ByteBuf;\nimport net.elytrium.limboapi.api.protocol.item.ItemComponent;\n\npublic abstract class WriteableItemComponent<T> implements ItemComponent<T> {\n\n  private final String name;\n  private T value;\n\n  public WriteableItemComponent(String name) {\n    this.name = name;\n  }\n\n  public abstract void write(ProtocolVersion version, ByteBuf buffer);\n\n  @Override\n  public String getName() {\n    return this.name;\n  }\n\n  @Override\n  public ItemComponent<T> setValue(T value) {\n    this.value = value;\n    return this;\n  }\n\n  @Override\n  public T getValue() {\n    return this.value;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/SimpleBlock.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world;\n\nimport com.google.gson.Gson;\nimport com.google.gson.internal.LinkedTreeMap;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport io.netty.util.collection.ShortObjectHashMap;\nimport io.netty.util.collection.ShortObjectMap;\nimport java.io.InputStreamReader;\nimport java.nio.charset.StandardCharsets;\nimport java.util.Arrays;\nimport java.util.EnumMap;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.Set;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.material.WorldVersion;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\npublic class SimpleBlock implements VirtualBlock {\n\n  private static final Gson GSON = new Gson();\n  private static final ShortObjectHashMap<SimpleBlock> LEGACY_BLOCK_STATE_IDS_MAP = new ShortObjectHashMap<>();\n  private static final Map<ProtocolVersion, ShortObjectMap<Short>> MODERN_BLOCK_STATE_IDS_MAP = new EnumMap<>(ProtocolVersion.class);\n  private static final ShortObjectHashMap<String> MODERN_BLOCK_STATE_PROTOCOL_ID_MAP = new ShortObjectHashMap<>();\n  private static final Map<String, Map<Set<String>, Short>> MODERN_BLOCK_STATE_STRING_MAP = new HashMap<>();\n  private static final Map<String, Short> MODERN_BLOCK_STRING_MAP = new HashMap<>();\n  private static final ShortObjectHashMap<Map<WorldVersion, Short>> LEGACY_BLOCK_IDS_MAP = new ShortObjectHashMap<>();\n  private static final Map<String, Map<String, String>> DEFAULT_PROPERTIES_MAP = new HashMap<>();\n  private static final Map<String, String> MODERN_ID_REMAP = new HashMap<>();\n\n  public static final SimpleBlock AIR = new SimpleBlock(false, true, false, \"minecraft:air\", (short) 0, (short) 0);\n\n  @SuppressWarnings(\"unchecked\")\n  public static void init() {\n    LinkedTreeMap<String, String> blocks = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/blocks.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    blocks.forEach((modernId, protocolId) -> MODERN_BLOCK_STRING_MAP.put(modernId, Short.valueOf(protocolId)));\n\n    LinkedTreeMap<String, LinkedTreeMap<String, String>> blockVersionMapping = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/blocks_mapping.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    blockVersionMapping.forEach((protocolId, versionMap) -> {\n      EnumMap<WorldVersion, Short> deserializedVersionMap = new EnumMap<>(WorldVersion.class);\n      versionMap.forEach((version, id) -> deserializedVersionMap.put(WorldVersion.parse(version), Short.valueOf(id)));\n      LEGACY_BLOCK_IDS_MAP.put(Short.valueOf(protocolId), deserializedVersionMap);\n    });\n\n    LinkedTreeMap<String, String> blockStates = GSON.fromJson(\n        new InputStreamReader(Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/blockstates.json\")), StandardCharsets.UTF_8),\n        LinkedTreeMap.class\n    );\n    blockStates.forEach((key, value) -> {\n      MODERN_BLOCK_STATE_PROTOCOL_ID_MAP.put(Short.valueOf(value), key);\n\n      String[] stringIDArgs = key.split(\"\\\\[\");\n      if (!MODERN_BLOCK_STATE_STRING_MAP.containsKey(stringIDArgs[0])) {\n        MODERN_BLOCK_STATE_STRING_MAP.put(stringIDArgs[0], new HashMap<>());\n      }\n\n      if (stringIDArgs.length == 1) {\n        MODERN_BLOCK_STATE_STRING_MAP.get(stringIDArgs[0]).put(null, Short.valueOf(value));\n      } else {\n        stringIDArgs[1] = stringIDArgs[1].substring(0, stringIDArgs[1].length() - 1);\n        MODERN_BLOCK_STATE_STRING_MAP.get(stringIDArgs[0]).put(new HashSet<>(Arrays.asList(stringIDArgs[1].split(\",\"))), Short.valueOf(value));\n      }\n    });\n\n    LinkedTreeMap<String, String> legacyBlocks = GSON.fromJson(\n        new InputStreamReader(Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/legacyblocks.json\")), StandardCharsets.UTF_8),\n        LinkedTreeMap.class\n    );\n    legacyBlocks.forEach((legacyBlockID, modernID)\n        -> LEGACY_BLOCK_STATE_IDS_MAP.put(Short.valueOf(legacyBlockID), solid(Short.parseShort(modernID))));\n\n    LEGACY_BLOCK_STATE_IDS_MAP.put((short) 0, AIR);\n\n    LinkedTreeMap<String, LinkedTreeMap<String, String>> modernMap = GSON.fromJson(\n        new InputStreamReader(Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/blockstates_mapping.json\")), StandardCharsets.UTF_8),\n        LinkedTreeMap.class\n    );\n\n    modernMap.forEach((modernID, versionMap) -> {\n      Short id = null;\n      for (ProtocolVersion version : ProtocolVersion.SUPPORTED_VERSIONS) {\n        id = Short.valueOf(versionMap.getOrDefault(version.toString(), String.valueOf(id)));\n        SimpleBlock.MODERN_BLOCK_STATE_IDS_MAP.computeIfAbsent(version, k -> new ShortObjectHashMap<>()).put(Short.parseShort(modernID), id);\n      }\n    });\n\n    LinkedTreeMap<String, LinkedTreeMap<String, String>> properties = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/defaultblockproperties.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n    properties.forEach((key, value) -> DEFAULT_PROPERTIES_MAP.put(key, new HashMap<>(value)));\n\n    LinkedTreeMap<String, String> modernIdRemap = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/modern_block_id_remap.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n    MODERN_ID_REMAP.putAll(modernIdRemap);\n  }\n\n  private final boolean solid;\n  private final boolean air;\n  private final boolean motionBlocking; // 1.14+\n  private final String modernID;\n  private final short blockStateID;\n  private final short blockID;\n\n  public SimpleBlock(boolean solid, boolean air, boolean motionBlocking, short blockStateID) {\n    this(solid, air, motionBlocking, MODERN_BLOCK_STATE_PROTOCOL_ID_MAP.get(blockStateID), blockStateID);\n  }\n\n  public SimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, short blockStateID) {\n    this(solid, air, motionBlocking, modernID, blockStateID, findId(modernID));\n  }\n\n  private static short findId(String modernID) {\n    String block = modernID.split(\"\\\\[\")[0];\n    Short id = MODERN_BLOCK_STRING_MAP.get(block);\n    if (id == null) {\n      throw new IllegalStateException(\"failed to find local id for specific block: \" + block);\n    }\n\n    return id;\n  }\n\n  public SimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, short blockStateID, short blockID) {\n    this.solid = solid;\n    this.air = air;\n    this.motionBlocking = motionBlocking;\n    this.modernID = modernID;\n    this.blockStateID = blockStateID;\n    this.blockID = blockID;\n  }\n\n  public SimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, Map<String, String> properties) {\n    this(solid, air, motionBlocking, modernID, transformID(modernID, properties));\n  }\n\n  public SimpleBlock(boolean solid, boolean air, boolean motionBlocking, String modernID, Map<String, String> properties, short blockID) {\n    this(solid, air, motionBlocking, modernID, transformID(modernID, properties), blockID);\n  }\n\n  public SimpleBlock(SimpleBlock block) {\n    this.solid = block.solid;\n    this.air = block.air;\n    this.motionBlocking = block.motionBlocking;\n    this.modernID = block.modernID;\n    this.blockStateID = block.blockStateID;\n    this.blockID = block.blockID;\n  }\n\n  @Override\n  public short getModernID() {\n    return this.blockStateID;\n  }\n\n  @Override\n  public String getModernStringID() {\n    return this.modernID;\n  }\n\n  @Override\n  public short getID(ProtocolVersion version) {\n    return this.getBlockStateID(version);\n  }\n\n  @Override\n  public short getBlockID(WorldVersion version) {\n    return LEGACY_BLOCK_IDS_MAP.get(this.blockID).get(version);\n  }\n\n  @Override\n  public short getBlockID(ProtocolVersion version) {\n    return this.getBlockID(WorldVersion.from(version));\n  }\n\n  @Override\n  public boolean isSupportedOn(WorldVersion version) {\n    return LEGACY_BLOCK_IDS_MAP.get(this.blockID).containsKey(version);\n  }\n\n  @Override\n  public boolean isSupportedOn(ProtocolVersion version) {\n    return this.isSupportedOn(WorldVersion.from(version));\n  }\n\n  @Override\n  public short getBlockStateID(ProtocolVersion version) {\n    return MODERN_BLOCK_STATE_IDS_MAP.get(version).getOrDefault(this.blockStateID, this.blockStateID);\n  }\n\n  @Override\n  public boolean isSolid() {\n    return this.solid;\n  }\n\n  @Override\n  public boolean isAir() {\n    return this.air;\n  }\n\n  @Override\n  public boolean isMotionBlocking() {\n    return this.motionBlocking;\n  }\n\n  public static VirtualBlock fromModernID(String modernID) {\n    String[] deserializedModernId = modernID.split(\"[\\\\[\\\\]]\");\n    if (deserializedModernId.length < 2) {\n      return fromModernID(modernID, Map.of());\n    } else {\n      Map<String, String> properties = new HashMap<>();\n      for (String property : deserializedModernId[1].split(\",\")) {\n        String[] propertyKeyValue = property.split(\"=\");\n        properties.put(propertyKeyValue[0], propertyKeyValue[1]);\n      }\n\n      return fromModernID(deserializedModernId[0], properties);\n    }\n  }\n\n  public static VirtualBlock fromModernID(String modernID, Map<String, String> properties) {\n    modernID = remapModernID(modernID);\n    return solid(modernID, transformID(modernID, properties));\n  }\n\n  private static short transformID(String modernID, Map<String, String> properties) {\n    Map<String, String> defaultProperties = DEFAULT_PROPERTIES_MAP.get(modernID);\n    if (defaultProperties == null || defaultProperties.isEmpty()) {\n      return transformID(modernID, (Set<String>) null);\n    } else {\n      Set<String> propertiesSet = new HashSet<>();\n      defaultProperties.forEach((key, value) -> {\n        if (properties != null) {\n          value = properties.getOrDefault(key, value);\n        }\n\n        propertiesSet.add(key + \"=\" + value.toLowerCase(Locale.ROOT));\n      });\n      return transformID(modernID, propertiesSet);\n    }\n  }\n\n  private static short transformID(String modernID, Set<String> properties) {\n    Map<Set<String>, Short> blockInfo = MODERN_BLOCK_STATE_STRING_MAP.get(modernID);\n\n    if (blockInfo == null) {\n      LimboAPI.getLogger().warn(\"Block \" + modernID + \" is not supported, and was replaced with air.\");\n      return AIR.getModernID();\n    }\n\n    Short id;\n    if (properties == null || properties.isEmpty()) {\n      id = blockInfo.get(null);\n    } else {\n      id = blockInfo.get(properties);\n    }\n\n    if (id == null) {\n      LimboAPI.getLogger().warn(\"Block \" + modernID + \" is not supported with \" + properties + \" properties, and was replaced with air.\");\n      return AIR.getModernID();\n    }\n\n    return id;\n  }\n\n  private static String remapModernID(String modernID) {\n    String strippedID = modernID.split(\"\\\\[\")[0];\n    String remappedID = MODERN_ID_REMAP.get(strippedID);\n    if (remappedID != null) {\n      modernID = remappedID + modernID.substring(strippedID.length());\n    }\n\n    return modernID;\n  }\n\n  @NonNull\n  public static SimpleBlock solid(short id) {\n    return solid(true, MODERN_BLOCK_STATE_PROTOCOL_ID_MAP.get(id), id);\n  }\n\n  @NonNull\n  public static SimpleBlock solid(String modernID, short id) {\n    return solid(true, remapModernID(modernID), id);\n  }\n\n  @NonNull\n  public static SimpleBlock solid(boolean motionBlocking, short id) {\n    return new SimpleBlock(true, false, motionBlocking, MODERN_BLOCK_STATE_PROTOCOL_ID_MAP.get(id), id);\n  }\n\n  @NonNull\n  public static SimpleBlock solid(boolean motionBlocking, String modernID, short id) {\n    return new SimpleBlock(true, false, motionBlocking, remapModernID(modernID), id);\n  }\n\n  @NonNull\n  public static SimpleBlock nonSolid(short id) {\n    return nonSolid(true, MODERN_BLOCK_STATE_PROTOCOL_ID_MAP.get(id), id);\n  }\n\n  @NonNull\n  public static SimpleBlock nonSolid(String modernID, short id) {\n    return nonSolid(true, remapModernID(modernID), id);\n  }\n\n  @NonNull\n  public static SimpleBlock nonSolid(boolean motionBlocking, short id) {\n    return new SimpleBlock(false, false, motionBlocking, MODERN_BLOCK_STATE_PROTOCOL_ID_MAP.get(id), id);\n  }\n\n  @NonNull\n  public static SimpleBlock nonSolid(boolean motionBlocking, String modernID, short id) {\n    return new SimpleBlock(false, false, motionBlocking, remapModernID(modernID), id);\n  }\n\n  @NonNull\n  public static SimpleBlock fromLegacyID(short id) {\n    if (LEGACY_BLOCK_STATE_IDS_MAP.containsKey(id)) {\n      return LEGACY_BLOCK_STATE_IDS_MAP.get(id);\n    } else {\n      LimboAPI.getLogger().warn(\"Block #\" + id + \" is not supported, and was replaced with air.\");\n      return AIR;\n    }\n  }\n\n  @Override\n  public String toString() {\n    return \"SimpleBlock{\"\n        + \"solid=\" + this.solid\n        + \", air=\" + this.air\n        + \", motionBlocking=\" + this.motionBlocking\n        + \", id=\" + this.blockStateID\n        + \"}\";\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/SimpleBlockEntity.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world;\n\nimport com.google.gson.Gson;\nimport com.google.gson.internal.LinkedTreeMap;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.io.InputStreamReader;\nimport java.nio.charset.StandardCharsets;\nimport java.util.EnumMap;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Objects;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.api.chunk.BlockEntityVersion;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\n\npublic class SimpleBlockEntity implements VirtualBlockEntity {\n\n  private static final Gson GSON = new Gson();\n\n  private static final Map<String, SimpleBlockEntity> MODERN_ID_MAP = new HashMap<>();\n\n  private final String modernId;\n  private final Map<BlockEntityVersion, Integer> versionIDs = new EnumMap<>(BlockEntityVersion.class);\n\n  public SimpleBlockEntity(String modernId) {\n    this.modernId = modernId;\n  }\n\n  @Override\n  public int getID(ProtocolVersion version) {\n    return this.getID(BlockEntityVersion.from(version));\n  }\n\n  @Override\n  public int getID(BlockEntityVersion version) {\n    return this.versionIDs.get(version);\n  }\n\n  @Override\n  public boolean isSupportedOn(ProtocolVersion version) {\n    return this.versionIDs.containsKey(BlockEntityVersion.from(version));\n  }\n\n  @Override\n  public boolean isSupportedOn(BlockEntityVersion version) {\n    return this.versionIDs.containsKey(version);\n  }\n\n  @Override\n  public String getModernID() {\n    return this.modernId;\n  }\n\n  @Override\n  public VirtualBlockEntity.Entry getEntry(int posX, int posY, int posZ, CompoundBinaryTag nbt) {\n    return new Entry(posX, posY, posZ, nbt);\n  }\n\n  @SuppressWarnings(\"unchecked\")\n  public static void init() {\n    LinkedTreeMap<String, LinkedTreeMap<String, String>> blockEntitiesMapping = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/blockentities_mapping.json\")), StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    blockEntitiesMapping.forEach((modernId, protocols) -> {\n      SimpleBlockEntity simpleBlockEntity = new SimpleBlockEntity(modernId);\n      protocols.forEach((key, value) -> simpleBlockEntity.versionIDs.put(BlockEntityVersion.parse(key), Integer.parseInt(value)));\n      MODERN_ID_MAP.put(modernId, simpleBlockEntity);\n    });\n  }\n\n  public static SimpleBlockEntity fromModernID(String id) {\n    return MODERN_ID_MAP.get(id);\n  }\n\n  public class Entry implements VirtualBlockEntity.Entry {\n    private final int posX;\n    private final int posY;\n    private final int posZ;\n    private final CompoundBinaryTag nbt;\n\n    public Entry(int posX, int posY, int posZ, CompoundBinaryTag nbt) {\n      this.posX = posX;\n      this.posY = posY;\n      this.posZ = posZ;\n      this.nbt = nbt;\n    }\n\n    @Override\n    public VirtualBlockEntity getBlockEntity() {\n      return SimpleBlockEntity.this;\n    }\n\n    @Override\n    public int getPosX() {\n      return this.posX;\n    }\n\n    @Override\n    public int getPosY() {\n      return this.posY;\n    }\n\n    @Override\n    public int getPosZ() {\n      return this.posZ;\n    }\n\n    @Override\n    public CompoundBinaryTag getNbt() {\n      return this.nbt;\n    }\n\n    @Override\n    public int getID(ProtocolVersion version) {\n      return SimpleBlockEntity.this.getID(version);\n    }\n\n    @Override\n    public int getID(BlockEntityVersion version) {\n      return SimpleBlockEntity.this.getID(version);\n    }\n\n    @Override\n    public boolean isSupportedOn(ProtocolVersion version) {\n      return SimpleBlockEntity.this.isSupportedOn(version);\n    }\n\n    @Override\n    public boolean isSupportedOn(BlockEntityVersion version) {\n      return SimpleBlockEntity.this.isSupportedOn(version);\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/SimpleItem.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world;\n\nimport com.google.gson.Gson;\nimport com.google.gson.internal.LinkedTreeMap;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.io.InputStreamReader;\nimport java.nio.charset.StandardCharsets;\nimport java.util.EnumMap;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Objects;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.api.material.Item;\nimport net.elytrium.limboapi.api.material.VirtualItem;\nimport net.elytrium.limboapi.api.material.WorldVersion;\n\npublic class SimpleItem implements VirtualItem {\n\n  private static final Gson GSON = new Gson();\n\n  private static final Map<String, SimpleItem> MODERN_ID_MAP = new HashMap<>();\n  private static final Map<Integer, SimpleItem> LEGACY_ID_MAP = new HashMap<>();\n\n  private final String modernId;\n  private final Map<WorldVersion, Short> versionIDs = new EnumMap<>(WorldVersion.class);\n\n  public SimpleItem(String modernId) {\n    this.modernId = modernId;\n  }\n\n  @Override\n  public short getID(ProtocolVersion version) {\n    return this.getID(WorldVersion.from(version));\n  }\n\n  @Override\n  public short getID(WorldVersion version) {\n    Short result = this.versionIDs.get(version);\n    if (result == null) {\n      throw new IllegalArgumentException(\"Item \" + this.modernId + \" does not exists on \" + version);\n    }\n\n    return result;\n  }\n\n  @Override\n  public boolean isSupportedOn(ProtocolVersion version) {\n    return this.isSupportedOn(WorldVersion.from(version));\n  }\n\n  @Override\n  public boolean isSupportedOn(WorldVersion version) {\n    return this.versionIDs.containsKey(version);\n  }\n\n  public String getModernID() {\n    return this.modernId;\n  }\n\n  @SuppressWarnings(\"unchecked\")\n  public static void init() {\n    LinkedTreeMap<String, LinkedTreeMap<String, String>> itemsMapping = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/items_mapping.json\")), StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    LinkedTreeMap<String, String> modernItems = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/items.json\")), StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    LinkedTreeMap<String, String> legacyItems = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/legacyitems.json\")), StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    LinkedTreeMap<String, String> modernIdRemap = GSON.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/modern_item_id_remap.json\")), StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    modernItems.forEach((modernId, modernProtocolId) -> {\n      SimpleItem simpleItem = new SimpleItem(modernId);\n      itemsMapping.get(modernProtocolId).forEach((key, value) -> simpleItem.versionIDs.put(WorldVersion.parse(key), Short.parseShort(value)));\n      MODERN_ID_MAP.put(modernId, simpleItem);\n\n      String remapped = modernIdRemap.get(modernId);\n      if (remapped != null) {\n        if (MODERN_ID_MAP.containsKey(remapped)) {\n          throw new IllegalStateException(\"Remapped id \" + remapped + \" (from \" + modernId + \") already exists\");\n        }\n\n        MODERN_ID_MAP.put(remapped, simpleItem);\n      }\n    });\n\n    legacyItems.forEach((legacyProtocolId, modernId) -> LEGACY_ID_MAP.put(Integer.parseInt(legacyProtocolId), MODERN_ID_MAP.get(modernId)));\n  }\n\n  public static SimpleItem fromItem(Item item) {\n    return LEGACY_ID_MAP.get(item.getLegacyID());\n  }\n\n  public static SimpleItem fromLegacyID(int id) {\n    return LEGACY_ID_MAP.get(id);\n  }\n\n  public static SimpleItem fromModernID(String id) {\n    return MODERN_ID_MAP.get(id);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/SimpleTagManager.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world;\n\nimport com.google.gson.Gson;\nimport com.google.gson.internal.LinkedTreeMap;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport java.io.InputStreamReader;\nimport java.nio.charset.StandardCharsets;\nimport java.util.EnumMap;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.stream.Collectors;\nimport net.elytrium.limboapi.LimboAPI;\nimport net.elytrium.limboapi.api.material.WorldVersion;\nimport net.elytrium.limboapi.protocol.packets.s2c.UpdateTagsPacket;\n\npublic class SimpleTagManager {\n\n  private static final Map<String, Integer> FLUIDS = new HashMap<>();\n  private static final Map<WorldVersion, UpdateTagsPacket> VERSION_MAP = new EnumMap<>(WorldVersion.class);\n\n  @SuppressWarnings(\"unchecked\")\n  public static void init() {\n    Gson gson = new Gson();\n    LinkedTreeMap<String, String> fluids = gson.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/fluids.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    fluids.forEach((id, protocolId) -> FLUIDS.put(id, Integer.valueOf(protocolId)));\n\n    LinkedTreeMap<String, LinkedTreeMap<String, List<String>>> tags = gson.fromJson(\n        new InputStreamReader(\n            Objects.requireNonNull(LimboAPI.class.getResourceAsStream(\"/mapping/tags.json\")),\n            StandardCharsets.UTF_8\n        ),\n        LinkedTreeMap.class\n    );\n\n    for (WorldVersion version : WorldVersion.values()) {\n      VERSION_MAP.put(version, localGetTagsForVersion(tags, version));\n    }\n  }\n\n  public static UpdateTagsPacket getUpdateTagsPacket(ProtocolVersion version) {\n    return VERSION_MAP.get(WorldVersion.from(version));\n  }\n\n  public static UpdateTagsPacket getUpdateTagsPacket(WorldVersion version) {\n    return VERSION_MAP.get(version);\n  }\n\n  private static UpdateTagsPacket localGetTagsForVersion(LinkedTreeMap<String, LinkedTreeMap<String, List<String>>> defaultTags,\n                                                         WorldVersion version) {\n    Map<String, Map<String, List<Integer>>> tags = new LinkedTreeMap<>();\n    defaultTags.forEach((tagType, defaultTagList) -> {\n      LinkedTreeMap<String, List<Integer>> tagList = new LinkedTreeMap<>();\n      switch (tagType) {\n        case \"minecraft:block\": {\n          defaultTagList.forEach((tagName, blockList) ->\n              tagList.put(tagName, blockList.stream()\n                  .map(e -> SimpleBlock.fromModernID(e, Map.of()))\n                  .filter(e -> e.isSupportedOn(version))\n                  .map(e -> (int) e.getBlockID(version))\n                  .collect(Collectors.toList())));\n          break;\n        }\n        case \"minecraft:fluid\": {\n          defaultTagList.forEach((tagName, fluidList) ->\n              tagList.put(tagName, fluidList.stream().map(FLUIDS::get).collect(Collectors.toList())));\n          break;\n        }\n        case \"minecraft:item\": {\n          defaultTagList.forEach((tagName, itemList) ->\n              tagList.put(tagName, itemList.stream()\n                  .map(SimpleItem::fromModernID)\n                  .filter(item -> item.isSupportedOn(version))\n                  .map(item -> (int) item.getID(version))\n                  .collect(Collectors.toList())));\n          break;\n        }\n        case \"minecraft:banner_pattern\":\n        case \"minecraft:damage_type\": {\n          if (version.getMinSupportedVersion().noLessThan(ProtocolVersion.MINECRAFT_26_1)) {\n            defaultTagList.forEach((tagName, itemList) -> tagList.put(tagName, List.of()));\n            break;\n          } else {\n            return;\n          }\n        }\n        default: {\n          defaultTagList.forEach((tagName, entryList) -> {\n            if (!entryList.isEmpty()) {\n              throw new IllegalStateException(\"The \" + tagType + \" tag type is not supported yet.\");\n            }\n\n            tagList.put(tagName, List.of());\n          });\n          break;\n        }\n      }\n\n      tags.put(tagType, tagList);\n    });\n\n    return new UpdateTagsPacket(tags);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/SimpleWorld.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world;\n\nimport com.google.common.collect.ImmutableList;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.function.Function;\nimport java.util.function.Supplier;\nimport net.elytrium.limboapi.api.chunk.Dimension;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\nimport net.elytrium.limboapi.api.chunk.VirtualChunk;\nimport net.elytrium.limboapi.api.chunk.VirtualWorld;\nimport net.elytrium.limboapi.material.Biome;\nimport net.elytrium.limboapi.server.world.chunk.SimpleChunk;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport org.checkerframework.checker.nullness.qual.NonNull;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic class SimpleWorld implements VirtualWorld {\n\n  private final Map<Long, SimpleChunk> chunks = new HashMap<>();\n  private final List<List<VirtualChunk>> distanceChunkMap = new ArrayList<>();\n  @NonNull\n  private final Dimension dimension;\n  private final VirtualBiome defaultBiome;\n\n  private final double spawnX;\n  private final double spawnY;\n  private final double spawnZ;\n  private final float yaw;\n  private final float pitch;\n\n  public SimpleWorld(@NonNull Dimension dimension, double posX, double posY, double posZ, float yaw, float pitch) {\n    this.dimension = dimension;\n    this.defaultBiome = Biome.of(dimension.getDefaultBiome());\n\n    this.spawnX = posX;\n    this.spawnY = posY;\n    this.spawnZ = posZ;\n    this.yaw = yaw;\n    this.pitch = pitch;\n\n\n    this.getChunkOrNew((int) posX, (int) posZ);\n  }\n\n  @Override\n  public void setBlock(int posX, int posY, int posZ, @Nullable VirtualBlock block) {\n    this.getChunkOrNew(posX, posZ).setBlock(getChunkCoordinate(posX), posY, getChunkCoordinate(posZ), block);\n  }\n\n  @Override\n  public void setBlockEntity(int posX, int posY, int posZ, @Nullable CompoundBinaryTag nbt, @Nullable VirtualBlockEntity blockEntity) {\n    this.getChunkOrNew(posX, posZ).setBlockEntity(getChunkCoordinate(posX), posY, getChunkCoordinate(posZ), nbt, blockEntity);\n  }\n\n  @NonNull\n  @Override\n  public VirtualBlock getBlock(int posX, int posY, int posZ) {\n    return this.chunkAction(posX, posZ, chunk -> chunk.getBlock(getChunkCoordinate(posX), posY, getChunkCoordinate(posZ)), () -> SimpleBlock.AIR);\n  }\n\n  @Override\n  public void setBiome2d(int posX, int posZ, @NonNull VirtualBiome biome) {\n    this.getChunkOrNew(posX, posZ).setBiome2D(getChunkCoordinate(posX), getChunkCoordinate(posZ), biome);\n  }\n\n  @Override\n  public void setBiome3d(int posX, int posY, int posZ, @NonNull VirtualBiome biome) {\n    this.getChunkOrNew(posX, posZ).setBiome3D(getChunkCoordinate(posX), posY, getChunkCoordinate(posZ), biome);\n  }\n\n  @Override\n  public VirtualBiome getBiome(int posX, int posY, int posZ) {\n    return this.chunkAction(posX, posZ, chunk -> chunk.getBiome(posX, posY, posZ), () -> Biome.PLAINS);\n  }\n\n  @Override\n  public byte getBlockLight(int posX, int posY, int posZ) {\n    return this.chunkAction(posX, posZ, chunk -> chunk.getBlockLight(getChunkCoordinate(posX), posY, getChunkCoordinate(posZ)), () -> (byte) 0);\n  }\n\n  @Override\n  public void setBlockLight(int posX, int posY, int posZ, byte light) {\n    this.getChunkOrNew(posX, posZ).setBlockLight(getChunkCoordinate(posX), posY, getChunkCoordinate(posZ), light);\n  }\n\n  @Override\n  public void fillBlockLight(int level) {\n    for (SimpleChunk chunk : this.chunks.values()) {\n      chunk.fillBlockLight(level);\n    }\n  }\n\n  @Override\n  public void fillSkyLight(int level) {\n    for (SimpleChunk chunk : this.chunks.values()) {\n      chunk.fillSkyLight(level);\n    }\n  }\n\n  @Override\n  public List<VirtualChunk> getChunks() {\n    return ImmutableList.copyOf(this.chunks.values());\n  }\n\n  @Override\n  public List<List<VirtualChunk>> getOrderedChunks() {\n    return this.distanceChunkMap.stream()\n        .map(Collections::unmodifiableList)\n        .toList();\n  }\n\n  private int getDistanceToSpawn(VirtualChunk chunk) {\n    int diffX = getChunkXZ((int) this.spawnX) - chunk.getPosX();\n    int diffZ = getChunkXZ((int) this.spawnZ) - chunk.getPosZ();\n    return (int) Math.sqrt((diffX * diffX) + (diffZ * diffZ));\n  }\n\n  @Nullable\n  @Override\n  public SimpleChunk getChunk(int posX, int posZ) {\n    return this.chunks.get(getChunkIndex(getChunkXZ(posX), getChunkXZ(posZ)));\n  }\n\n  @Override\n  public SimpleChunk getChunkOrNew(int posX, int posZ) {\n    posX = getChunkXZ(posX);\n    posZ = getChunkXZ(posZ);\n\n    // Modern Sodium versions don't load chunks if their \"neighbours\" are unloaded.\n    // We are fixing this problem there by generating all the \"neighbours\".\n    for (int chunkX = posX - 1; chunkX <= posX + 1; ++chunkX) {\n      for (int chunkZ = posZ - 1; chunkZ <= posZ + 1; ++chunkZ) {\n        this.localCreateChunk(chunkX, chunkZ);\n      }\n    }\n\n    return this.chunks.get(getChunkIndex(posX, posZ));\n  }\n\n  private void localCreateChunk(int posX, int posZ) {\n    long index = getChunkIndex(posX, posZ);\n    if (!this.chunks.containsKey(index)) {\n      SimpleChunk chunk = new SimpleChunk(posX, posZ, this.defaultBiome);\n\n      this.chunks.put(index, chunk);\n\n      int distance = this.getDistanceToSpawn(chunk);\n      for (int i = this.distanceChunkMap.size(); i <= distance; i++) {\n        this.distanceChunkMap.add(new LinkedList<>());\n      }\n\n      this.distanceChunkMap.get(distance).add(chunk);\n    }\n  }\n\n  @NonNull\n  @Override\n  public Dimension getDimension() {\n    return this.dimension;\n  }\n\n  @Override\n  public double getSpawnX() {\n    return this.spawnX;\n  }\n\n  @Override\n  public double getSpawnY() {\n    return this.spawnY;\n  }\n\n  @Override\n  public double getSpawnZ() {\n    return this.spawnZ;\n  }\n\n  @Override\n  public float getYaw() {\n    return this.yaw;\n  }\n\n  @Override\n  public float getPitch() {\n    return this.pitch;\n  }\n\n  private <T> T chunkAction(int posX, int posZ, Function<SimpleChunk, T> function, Supplier<T> ifNull) {\n    SimpleChunk chunk = this.getChunk(posX, posZ);\n    if (chunk == null) {\n      return ifNull.get();\n    }\n\n    return function.apply(chunk);\n  }\n\n  private static long getChunkIndex(int posX, int posZ) {\n    return (long) posX << 32 | posZ & 0xFFFFFFFFL;\n  }\n\n  private static int getChunkXZ(int pos) {\n    return pos >> 4;\n  }\n\n  private static int getChunkCoordinate(int pos) {\n    return pos & 15;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/chunk/SimpleChunk.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world.chunk;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\nimport net.elytrium.limboapi.api.chunk.VirtualChunk;\nimport net.elytrium.limboapi.api.chunk.data.ChunkSnapshot;\nimport net.elytrium.limboapi.api.chunk.data.LightSection;\nimport net.elytrium.limboapi.material.Biome;\nimport net.elytrium.limboapi.server.world.SimpleBlock;\nimport net.kyori.adventure.nbt.CompoundBinaryTag;\nimport org.checkerframework.checker.nullness.qual.NonNull;\nimport org.checkerframework.checker.nullness.qual.Nullable;\nimport org.checkerframework.common.value.qual.IntRange;\n\npublic class SimpleChunk implements VirtualChunk {\n\n  public static final int MAX_BLOCKS_PER_SECTION = 16 * 16 * 16;\n  public static final int MAX_BIOMES_PER_SECTION = 4 * 4 * 4;\n\n  private final int posX;\n  private final int posZ;\n\n  private final SimpleSection[] sections = new SimpleSection[16];\n  private final LightSection[] light = new LightSection[18];\n  private final VirtualBiome[] biomes = new VirtualBiome[1024];\n  private final List<VirtualBlockEntity.Entry> blockEntityEntries = new ArrayList<>();\n\n  public SimpleChunk(int posX, int posZ) {\n    this(posX, posZ, Biome.PLAINS);\n  }\n\n  public SimpleChunk(int posX, int posZ, VirtualBiome defaultBiome) {\n    this.posX = posX;\n    this.posZ = posZ;\n\n    for (int i = 0; i < this.light.length; ++i) {\n      this.light[i] = new SimpleLightSection();\n    }\n\n    Arrays.fill(this.biomes, defaultBiome);\n  }\n\n  @Override\n  public void setBlock(int posX, int posY, int posZ, @Nullable VirtualBlock block) {\n    this.getSection(posY).setBlockAt(posX, posY & 15, posZ, block);\n  }\n\n  @Override\n  public void setBlockEntity(int posX, int posY, int posZ, @Nullable CompoundBinaryTag nbt, @Nullable VirtualBlockEntity blockEntity) {\n    if (blockEntity == null) {\n      this.blockEntityEntries.removeIf(entry -> entry.getPosX() == posX && entry.getPosY() == posY && entry.getPosZ() == posZ);\n      return;\n    }\n\n    this.blockEntityEntries.add(blockEntity.getEntry(posX, posY, posZ, nbt));\n  }\n\n  @Override\n  public void setBlockEntity(VirtualBlockEntity.Entry blockEntityEntry) {\n    this.blockEntityEntries.add(blockEntityEntry);\n  }\n\n  private SimpleSection getSection(int posY) {\n    int sectionIndex = getSectionIndex(posY);\n    SimpleSection section = this.sections[sectionIndex];\n    if (section == null) {\n      section = new SimpleSection();\n      this.sections[sectionIndex] = section;\n    }\n\n    return section;\n  }\n\n  @NonNull\n  @Override\n  public VirtualBlock getBlock(int posX, int posY, int posZ) {\n    SimpleSection section = this.sections[getSectionIndex(posY)];\n    if (section == null) {\n      return SimpleBlock.AIR;\n    } else {\n      return section.getBlockAt(posX, posY & 15, posZ);\n    }\n  }\n\n  @Override\n  public void setBiome2D(int posX, int posZ, @NonNull VirtualBiome biome) {\n    for (int posY = 0; posY < 256; posY += 4) {\n      this.setBiome3D(posX, posY, posZ, biome);\n    }\n  }\n\n  @Override\n  public void setBiome3D(int posX, int posY, int posZ, @NonNull VirtualBiome biome) {\n    this.biomes[getBiomeIndex(posX, posY, posZ)] = biome;\n  }\n\n  @NonNull\n  @Override\n  public VirtualBiome getBiome(int posX, int posY, int posZ) {\n    return this.biomes[getBiomeIndex(posX, posY, posZ)];\n  }\n\n  @Override\n  public void setBlockLight(int posX, int posY, int posZ, byte light) {\n    this.getLightSection(posY).setBlockLight(posX, posY & 15, posZ, light);\n  }\n\n  @Override\n  public byte getBlockLight(int posX, int posY, int posZ) {\n    return this.getLightSection(posY).getBlockLight(posX, posY & 15, posZ);\n  }\n\n  @Override\n  public void setSkyLight(int posX, int posY, int posZ, byte light) {\n    this.getLightSection(posY).setSkyLight(posX, posY & 15, posZ, light);\n  }\n\n  @Override\n  public byte getSkyLight(int posX, int posY, int posZ) {\n    return this.getLightSection(posY).getSkyLight(posX, posY & 15, posZ);\n  }\n\n  private LightSection getLightSection(int posY) {\n    return this.light[posY < 0 ? 0 : getSectionIndex(posY) + 1];\n  }\n\n  @Override\n  public void fillBlockLight(@IntRange(from = 0, to = 15) int level) {\n    for (LightSection lightSection : this.light) {\n      lightSection.getBlockLight().fill(level);\n    }\n  }\n\n  @Override\n  public void fillSkyLight(@IntRange(from = 0, to = 15) int level) {\n    for (LightSection lightSection : this.light) {\n      lightSection.getSkyLight().fill(level);\n    }\n  }\n\n  @Override\n  public int getPosX() {\n    return this.posX;\n  }\n\n  @Override\n  public int getPosZ() {\n    return this.posZ;\n  }\n\n  @Override\n  public ChunkSnapshot getFullChunkSnapshot() {\n    return this.createSnapshot(true, 0);\n  }\n\n  @Override\n  public ChunkSnapshot getPartialChunkSnapshot(long previousUpdate) {\n    return this.createSnapshot(false, previousUpdate);\n  }\n\n  private ChunkSnapshot createSnapshot(boolean full, long previousUpdate) {\n    SimpleSection[] sectionsSnapshot = new SimpleSection[this.sections.length];\n    for (int i = 0; i < this.sections.length; ++i) {\n      if (this.sections[i] != null && this.sections[i].getLastUpdate() > previousUpdate) {\n        sectionsSnapshot[i] = this.sections[i].getSnapshot();\n      }\n    }\n\n    LightSection[] lightSnapshot = new LightSection[this.light.length];\n    for (int i = 0; i < lightSnapshot.length; ++i) {\n      if (this.light[i].getLastUpdate() > previousUpdate) {\n        lightSnapshot[i] = this.light[i].copy();\n      }\n    }\n\n    return new SimpleChunkSnapshot(this.posX, this.posZ, full, sectionsSnapshot, lightSnapshot,\n        Arrays.copyOf(this.biomes, this.biomes.length), List.copyOf(this.blockEntityEntries));\n  }\n\n  private static int getBiomeIndex(int posX, int posY, int posZ) {\n    return (posY >> 2 & 63) << 4 | (posZ >> 2 & 3) << 2 | posX >> 2 & 3;\n  }\n\n  private static int getSectionIndex(int posY) {\n    return posY >> 4;\n  }\n\n  @Override\n  public String toString() {\n    return \"SimpleChunk{\"\n        + \"posX=\" + this.posX\n        + \", posZ=\" + this.posZ\n        + '}';\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/chunk/SimpleChunkSnapshot.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world.chunk;\n\nimport java.util.List;\nimport net.elytrium.limboapi.api.chunk.VirtualBiome;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.VirtualBlockEntity;\nimport net.elytrium.limboapi.api.chunk.data.ChunkSnapshot;\nimport net.elytrium.limboapi.api.chunk.data.LightSection;\nimport net.elytrium.limboapi.server.world.SimpleBlock;\n\npublic class SimpleChunkSnapshot implements ChunkSnapshot {\n\n  private final int posX;\n  private final int posZ;\n  private final boolean fullChunk;\n  private final SimpleSection[] sections;\n  private final LightSection[] light;\n  private final VirtualBiome[] biomes;\n  private final List<VirtualBlockEntity.Entry> blockEntityEntries;\n\n  public SimpleChunkSnapshot(int posX, int posZ, boolean fullChunk, SimpleSection[] sections, LightSection[] light,\n                             VirtualBiome[] biomes, List<VirtualBlockEntity.Entry> blockEntityEntries) {\n    this.posX = posX;\n    this.posZ = posZ;\n    this.fullChunk = fullChunk;\n    this.sections = sections;\n    this.light = light;\n    this.biomes = biomes;\n    this.blockEntityEntries = blockEntityEntries;\n  }\n\n  @Override\n  public VirtualBlock getBlock(int posX, int posY, int posZ) {\n    SimpleSection section = this.sections[posY >> 4];\n    return section == null ? SimpleBlock.AIR : section.getBlockAt(posX, posY & 15, posZ);\n  }\n\n  @Override\n  public int getPosX() {\n    return this.posX;\n  }\n\n  @Override\n  public int getPosZ() {\n    return this.posZ;\n  }\n\n  @Override\n  public boolean isFullChunk() {\n    return this.fullChunk;\n  }\n\n  @Override\n  public SimpleSection[] getSections() {\n    return this.sections;\n  }\n\n  @Override\n  public LightSection[] getLight() {\n    return this.light;\n  }\n\n  @Override\n  public VirtualBiome[] getBiomes() {\n    return this.biomes;\n  }\n\n  @Override\n  public List<VirtualBlockEntity.Entry> getBlockEntityEntries() {\n    return this.blockEntityEntries;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/chunk/SimpleLightSection.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world.chunk;\n\nimport com.google.common.base.Preconditions;\nimport net.elytrium.limboapi.api.chunk.data.LightSection;\nimport net.elytrium.limboapi.api.mcprotocollib.NibbleArray3D;\n\npublic class SimpleLightSection implements LightSection {\n\n  private static final NibbleArray3D NO_LIGHT = new NibbleArray3D(SimpleChunk.MAX_BLOCKS_PER_SECTION);\n  private static final NibbleArray3D ALL_LIGHT = new NibbleArray3D(SimpleChunk.MAX_BLOCKS_PER_SECTION, 15);\n\n  private NibbleArray3D blockLight;\n  private NibbleArray3D skyLight;\n  private long lastUpdate;\n\n  public SimpleLightSection() {\n    this(NO_LIGHT, ALL_LIGHT, System.nanoTime());\n  }\n\n  private SimpleLightSection(NibbleArray3D blockLight, NibbleArray3D skyLight, long lastUpdate) {\n    this.blockLight = blockLight;\n    this.skyLight = skyLight;\n    this.lastUpdate = lastUpdate;\n  }\n\n  @Override\n  public void setBlockLight(int posX, int posY, int posZ, byte light) {\n    this.checkIndexes(posX, posY, posZ);\n    Preconditions.checkArgument(light >= 0 && light <= 15, \"light should be between 0 and 15\");\n\n    if (this.blockLight == NO_LIGHT && light != 0) {\n      this.blockLight = new NibbleArray3D(SimpleChunk.MAX_BLOCKS_PER_SECTION);\n    }\n\n    this.blockLight.set(posX, posY, posZ, light);\n    this.lastUpdate = System.nanoTime();\n  }\n\n  @Override\n  public NibbleArray3D getBlockLight() {\n    return this.blockLight;\n  }\n\n  @Override\n  public byte getBlockLight(int posX, int posY, int posZ) {\n    this.checkIndexes(posX, posY, posZ);\n    return (byte) this.blockLight.get(posX, posY, posZ);\n  }\n\n  @Override\n  public void setSkyLight(int posX, int posY, int posZ, byte light) {\n    this.checkIndexes(posX, posY, posZ);\n    Preconditions.checkArgument(light >= 0 && light <= 15, \"light should be between 0 and 15\");\n\n    if (this.skyLight == ALL_LIGHT && light != 15) {\n      this.skyLight = new NibbleArray3D(SimpleChunk.MAX_BLOCKS_PER_SECTION);\n    }\n\n    this.skyLight.set(posX, posY, posZ, light);\n    this.lastUpdate = System.nanoTime();\n  }\n\n  @Override\n  public NibbleArray3D getSkyLight() {\n    return this.skyLight;\n  }\n\n  @Override\n  public byte getSkyLight(int posX, int posY, int posZ) {\n    this.checkIndexes(posX, posY, posZ);\n    return (byte) this.skyLight.get(posX, posY, posZ);\n  }\n\n  private void checkIndexes(int posX, int posY, int posZ) {\n    Preconditions.checkArgument(this.checkIndex(posX), \"x should be between 0 and 15\");\n    Preconditions.checkArgument(this.checkIndex(posY), \"y should be between 0 and 15\");\n    Preconditions.checkArgument(this.checkIndex(posZ), \"z should be between 0 and 15\");\n  }\n\n  private boolean checkIndex(int pos) {\n    return pos >= 0 && pos <= 15;\n  }\n\n  @Override\n  public long getLastUpdate() {\n    return this.lastUpdate;\n  }\n\n  @Override\n  public SimpleLightSection copy() {\n    NibbleArray3D skyLight = this.skyLight == ALL_LIGHT ? ALL_LIGHT : this.skyLight.copy();\n    NibbleArray3D blockLight = this.blockLight == NO_LIGHT ? NO_LIGHT : this.blockLight.copy();\n    return new SimpleLightSection(blockLight, skyLight, this.lastUpdate);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/server/world/chunk/SimpleSection.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.server.world.chunk;\n\nimport com.google.common.base.Preconditions;\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport net.elytrium.limboapi.api.chunk.VirtualBlock;\nimport net.elytrium.limboapi.api.chunk.data.BlockSection;\nimport net.elytrium.limboapi.api.chunk.data.BlockStorage;\nimport net.elytrium.limboapi.protocol.data.BlockStorage19;\nimport net.elytrium.limboapi.server.world.SimpleBlock;\nimport org.checkerframework.checker.nullness.qual.Nullable;\n\npublic class SimpleSection implements BlockSection {\n\n  private final BlockStorage blocks;\n\n  private long lastUpdate = System.nanoTime();\n\n  public SimpleSection() {\n    this(new BlockStorage19(ProtocolVersion.MINECRAFT_1_17));\n  }\n\n  public SimpleSection(BlockStorage blocks) {\n    this.blocks = blocks;\n  }\n\n  public SimpleSection(BlockStorage blocks, long lastUpdate) {\n    this.blocks = blocks;\n    this.lastUpdate = lastUpdate;\n  }\n\n  @Override\n  public void setBlockAt(int posX, int posY, int posZ, @Nullable VirtualBlock block) {\n    this.checkIndexes(posX, posY, posZ);\n    this.blocks.set(posX, posY, posZ, block == null ? SimpleBlock.AIR : block);\n    this.lastUpdate = System.nanoTime();\n  }\n\n  @Override\n  public VirtualBlock getBlockAt(int posX, int posY, int posZ) {\n    this.checkIndexes(posX, posY, posZ);\n    return this.blocks.get(posX, posY, posZ);\n  }\n\n  private void checkIndexes(int posX, int posY, int posZ) {\n    Preconditions.checkArgument(this.checkIndex(posX), \"x should be between 0 and 15\");\n    Preconditions.checkArgument(this.checkIndex(posY), \"y should be between 0 and 15\");\n    Preconditions.checkArgument(this.checkIndex(posZ), \"z should be between 0 and 15\");\n  }\n\n  private boolean checkIndex(int pos) {\n    return pos >= 0 && pos <= 15;\n  }\n\n  @Override\n  public SimpleSection getSnapshot() {\n    return new SimpleSection(this.blocks.copy(), this.lastUpdate);\n  }\n\n  @Override\n  public long getLastUpdate() {\n    return this.lastUpdate;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/utils/LambdaUtil.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.utils;\n\nimport java.lang.invoke.LambdaMetafactory;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.MethodType;\nimport java.lang.reflect.Field;\nimport java.util.function.BiConsumer;\nimport java.util.function.Function;\n\npublic final class LambdaUtil {\n  private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();\n\n  public static <T, R> Function<T, R> getterOf(Field field) throws Throwable {\n    MethodHandle handle = LOOKUP.unreflectGetter(field);\n    MethodType type = handle.type();\n    //noinspection unchecked\n    return (Function<T, R>) LambdaMetafactory.metafactory(\n        LOOKUP,\n        \"apply\",\n        MethodType.methodType(Function.class, MethodHandle.class),\n        type.generic(),\n        MethodHandles.exactInvoker(type),\n        type\n    ).getTarget().invokeExact(handle);\n  }\n\n  public static <T, R> BiConsumer<T, R> setterOf(Field f) throws Throwable {\n    MethodHandle handle = LOOKUP.unreflectSetter(f);\n    MethodType type = handle.type();\n    //noinspection unchecked\n    return (BiConsumer<T, R>) LambdaMetafactory.metafactory(\n        LOOKUP,\n        \"accept\",\n        MethodType.methodType(BiConsumer.class, MethodHandle.class),\n        type.generic().changeReturnType(void.class),\n        MethodHandles.exactInvoker(type),\n        type\n    ).getTarget().invokeExact(handle);\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/utils/OverlayIntObjectMap.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.utils;\n\nimport com.google.common.collect.Iterables;\nimport com.google.common.collect.Streams;\nimport io.netty.util.collection.IntObjectMap;\nimport java.util.Collection;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport net.elytrium.limboapi.api.utils.OverlayMap;\nimport org.jetbrains.annotations.NotNull;\n\npublic class OverlayIntObjectMap<K> extends OverlayMap<Integer, K> implements IntObjectMap<K> {\n\n  public OverlayIntObjectMap(Map<Integer, K> parent, Map<Integer, K> overlay) {\n    super(parent, overlay);\n  }\n\n  @Override\n  public K get(int key) {\n    return super.get(key);\n  }\n\n  @Override\n  public K put(int key, K value) {\n    return super.put(key, value);\n  }\n\n  @Override\n  public K remove(int key) {\n    return super.remove(key);\n  }\n\n  @Override\n  public Iterable<PrimitiveEntry<K>> entries() {\n    return Iterables.concat(((IntObjectMap<K>) parent).entries(), ((IntObjectMap<K>) overlay).entries());\n  }\n\n  @Override\n  public boolean containsKey(int key) {\n    return super.containsKey(key);\n  }\n\n  @Override\n  public Set<Integer> keySet() {\n    return Streams.concat(this.parent.keySet().stream(), this.overlay.keySet().stream()).collect(Collectors.toSet());\n  }\n\n  @NotNull\n  @Override\n  public Collection<K> values() {\n    return Streams.concat(this.parent.values().stream(), this.overlay.values().stream()).collect(Collectors.toList());\n  }\n\n  @NotNull\n  @Override\n  public Set<Entry<Integer, K>> entrySet() {\n    return Streams.concat(this.parent.entrySet().stream(), this.overlay.entrySet().stream()).collect(Collectors.toSet());\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/utils/OverlayObject2IntMap.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.utils;\n\nimport com.google.common.collect.Streams;\nimport it.unimi.dsi.fastutil.ints.IntArrayList;\nimport it.unimi.dsi.fastutil.ints.IntCollection;\nimport it.unimi.dsi.fastutil.objects.Object2IntMap;\nimport it.unimi.dsi.fastutil.objects.ObjectSet;\nimport java.util.stream.Collectors;\nimport net.elytrium.limboapi.api.utils.OverlayMap;\nimport org.jetbrains.annotations.NotNull;\n\npublic class OverlayObject2IntMap<K> extends OverlayMap<K, Integer> implements Object2IntMap<K> {\n\n  public OverlayObject2IntMap(Object2IntMap<K> parent, Object2IntMap<K> overlay) {\n    super(parent, overlay);\n    overlay.defaultReturnValue(parent.defaultReturnValue());\n  }\n\n  @Override\n  public int getInt(Object key) {\n    int value = ((Object2IntMap<K>) this.overlay).getInt(key);\n    if (value == this.defaultReturnValue()) {\n      value = ((Object2IntMap<K>) this.parent).getInt(key);\n    }\n\n    return value;\n  }\n\n  @Override\n  public int put(K key, int value) {\n    return ((Object2IntMap<K>) this.overlay).put(key, value);\n  }\n\n  @Override\n  public void defaultReturnValue(int rv) {\n    ((Object2IntMap<K>) this.overlay).defaultReturnValue(rv);\n  }\n\n  @Override\n  public int defaultReturnValue() {\n    return ((Object2IntMap<K>) this.overlay).defaultReturnValue();\n  }\n\n  @Override\n  public ObjectSet<Object2IntMap.Entry<K>> object2IntEntrySet() {\n    return new SetIsObjectSet<>(\n        Streams\n            .concat(((Object2IntMap<K>) this.parent).object2IntEntrySet().stream(), ((Object2IntMap<K>) this.overlay).object2IntEntrySet().stream())\n            .collect(Collectors.toSet()));\n  }\n\n  @NotNull\n  @Override\n  public ObjectSet<K> keySet() {\n    return new SetIsObjectSet<>(\n        Streams\n            .concat(((Object2IntMap<K>) this.parent).keySet().stream(), ((Object2IntMap<K>) this.overlay).keySet().stream())\n            .collect(Collectors.toSet()));\n  }\n\n  @Override\n  public IntCollection values() {\n    return Streams\n        .concat(((Object2IntMap<K>) this.parent).values().intStream(), ((Object2IntMap<K>) this.overlay).values().intStream())\n        .boxed()\n        .collect(Collectors.toCollection(IntArrayList::new));\n  }\n\n  @Override\n  public boolean containsValue(int value) {\n    return false;\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/utils/ProtocolTools.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.utils;\n\nimport com.velocitypowered.api.network.ProtocolVersion;\nimport com.velocitypowered.proxy.protocol.ProtocolUtils;\nimport io.netty.buffer.ByteBuf;\n\npublic class ProtocolTools {\n\n  public static void writeContainerId(ByteBuf buf, ProtocolVersion version, int id) {\n    if (version.noLessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n      ProtocolUtils.writeVarInt(buf, id);\n    } else {\n      buf.writeByte(id);\n    }\n  }\n\n  public static int readContainerId(ByteBuf buf, ProtocolVersion version) {\n    if (version.noLessThan(ProtocolVersion.MINECRAFT_1_21_2)) {\n      return ProtocolUtils.readVarInt(buf);\n    } else {\n      return buf.readUnsignedByte();\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/utils/ReloadListener.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.utils;\n\nimport com.velocitypowered.api.event.Subscribe;\nimport com.velocitypowered.api.event.proxy.ProxyReloadEvent;\nimport net.elytrium.limboapi.LimboAPI;\n\npublic class ReloadListener {\n\n  private final LimboAPI plugin;\n\n  public ReloadListener(LimboAPI plugin) {\n    this.plugin = plugin;\n  }\n\n  @Subscribe\n  public void onReload(ProxyReloadEvent event) {\n    this.plugin.reloadPreparedPacketFactory();\n    this.plugin.reload();\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/java/net/elytrium/limboapi/utils/SetIsObjectSet.java",
    "content": "/*\n * Copyright (C) 2021 - 2025 Elytrium\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\npackage net.elytrium.limboapi.utils;\n\nimport it.unimi.dsi.fastutil.objects.ObjectIterator;\nimport it.unimi.dsi.fastutil.objects.ObjectSet;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.Set;\nimport org.checkerframework.checker.nullness.qual.NonNull;\n\npublic class SetIsObjectSet<K> implements ObjectSet<K> {\n\n  private final Set<K> set;\n\n  public SetIsObjectSet(Set<K> set) {\n    this.set = set;\n  }\n\n  @Override\n  public int size() {\n    return this.set.size();\n  }\n\n  @Override\n  public boolean isEmpty() {\n    return this.set.isEmpty();\n  }\n\n  @Override\n  public boolean contains(Object o) {\n    return this.set.contains(o);\n  }\n\n  @Override\n  public ObjectIterator<K> iterator() {\n    return new IteratorIsObjectIterator<>(this.set.iterator());\n  }\n\n  @NonNull\n  @Override\n  public Object[] toArray() {\n    return this.set.toArray();\n  }\n\n  @NonNull\n  @Override\n  public <T> T[] toArray(T @NonNull [] ts) {\n    return this.set.toArray(ts);\n  }\n\n  @Override\n  public boolean add(K k) {\n    return this.set.add(k);\n  }\n\n  @Override\n  public boolean remove(Object o) {\n    return this.set.remove(o);\n  }\n\n  @Override\n  public boolean containsAll(@NonNull Collection<?> collection) {\n    return this.set.containsAll(collection);\n  }\n\n  @Override\n  public boolean addAll(@NonNull Collection<? extends K> collection) {\n    return this.set.addAll(collection);\n  }\n\n  @Override\n  public boolean removeAll(@NonNull Collection<?> collection) {\n    return this.set.removeAll(collection);\n  }\n\n  @Override\n  public boolean retainAll(@NonNull Collection<?> collection) {\n    return this.set.retainAll(collection);\n  }\n\n  @Override\n  public void clear() {\n    this.set.clear();\n  }\n\n  private static final class IteratorIsObjectIterator<K> implements ObjectIterator<K> {\n\n    private final Iterator<K> iterator;\n\n    private IteratorIsObjectIterator(Iterator<K> iterator) {\n      this.iterator = iterator;\n    }\n\n    @Override\n    public boolean hasNext() {\n      return this.iterator.hasNext();\n    }\n\n    @Override\n    public K next() {\n      return this.iterator.next();\n    }\n  }\n}\n"
  },
  {
    "path": "plugin/src/main/resources/mapping/fluids.json",
    "content": "{\n  \"minecraft:empty\": \"0\",\n  \"minecraft:flowing_water\": \"1\",\n  \"minecraft:water\": \"2\",\n  \"minecraft:flowing_lava\": \"3\",\n  \"minecraft:lava\": \"4\"\n}"
  },
  {
    "path": "plugin/src/main/resources/mapping/legacyitems.json",
    "content": "{\n  \"0\": \"minecraft:air\",\n  \"1\": \"minecraft:stone\",\n  \"2\": \"minecraft:short_grass\",\n  \"3\": \"minecraft:dirt\",\n  \"4\": \"minecraft:cobblestone\",\n  \"5\": \"minecraft:oak_planks\",\n  \"6\": \"minecraft:oak_sapling\",\n  \"7\": \"minecraft:bedrock\",\n  \"12\": \"minecraft:sand\",\n  \"13\": \"minecraft:gravel\",\n  \"14\": \"minecraft:gold_ore\",\n  \"15\": \"minecraft:iron_ore\",\n  \"16\": \"minecraft:coal_ore\",\n  \"17\": \"minecraft:oak_log\",\n  \"18\": \"minecraft:oak_leaves\",\n  \"19\": \"minecraft:sponge\",\n  \"20\": \"minecraft:glass\",\n  \"21\": \"minecraft:lapis_ore\",\n  \"22\": \"minecraft:lapis_block\",\n  \"23\": \"minecraft:dispenser\",\n  \"24\": \"minecraft:sandstone\",\n  \"25\": \"minecraft:note_block\",\n  \"27\": \"minecraft:powered_rail\",\n  \"28\": \"minecraft:detector_rail\",\n  \"29\": \"minecraft:sticky_piston\",\n  \"30\": \"minecraft:cobweb\",\n  \"31\": \"minecraft:tall_grass\",\n  \"32\": \"minecraft:dead_bush\",\n  \"33\": \"minecraft:piston\",\n  \"35\": \"minecraft:white_wool\",\n  \"37\": \"minecraft:dandelion\",\n  \"38\": \"minecraft:poppy\",\n  \"39\": \"minecraft:brown_mushroom\",\n  \"40\": \"minecraft:red_mushroom\",\n  \"41\": \"minecraft:gold_block\",\n  \"42\": \"minecraft:iron_block\",\n  \"45\": \"minecraft:bricks\",\n  \"46\": \"minecraft:tnt\",\n  \"47\": \"minecraft:bookshelf\",\n  \"48\": \"minecraft:mossy_cobblestone\",\n  \"49\": \"minecraft:obsidian\",\n  \"50\": \"minecraft:torch\",\n  \"52\": \"minecraft:spawner\",\n  \"53\": \"minecraft:oak_stairs\",\n  \"54\": \"minecraft:chest\",\n  \"56\": \"minecraft:diamond_ore\",\n  \"57\": \"minecraft:diamond_block\",\n  \"58\": \"minecraft:crafting_table\",\n  \"60\": \"minecraft:farmland\",\n  \"61\": \"minecraft:furnace\",\n  \"65\": \"minecraft:ladder\",\n  \"66\": \"minecraft:rail\",\n  \"67\": \"minecraft:cobblestone_stairs\",\n  \"69\": \"minecraft:lever\",\n  \"70\": \"minecraft:stone_pressure_plate\",\n  \"72\": \"minecraft:oak_pressure_plate\",\n  \"73\": \"minecraft:redstone_ore\",\n  \"76\": \"minecraft:redstone_torch\",\n  \"77\": \"minecraft:stone_button\",\n  \"78\": \"minecraft:snow_block\",\n  \"79\": \"minecraft:ice\",\n  \"80\": \"minecraft:snow\",\n  \"81\": \"minecraft:cactus\",\n  \"82\": \"minecraft:clay\",\n  \"84\": \"minecraft:jukebox\",\n  \"85\": \"minecraft:oak_fence\",\n  \"86\": \"minecraft:pumpkin\",\n  \"87\": \"minecraft:netherrack\",\n  \"88\": \"minecraft:soul_sand\",\n  \"89\": \"minecraft:glowstone\",\n  \"91\": \"minecraft:jack_o_lantern\",\n  \"95\": \"minecraft:white_stained_glass\",\n  \"96\": \"minecraft:oak_trapdoor\",\n  \"98\": \"minecraft:stone_bricks\",\n  \"99\": \"minecraft:brown_mushroom_block\",\n  \"100\": \"minecraft:red_mushroom_block\",\n  \"101\": \"minecraft:iron_bars\",\n  \"102\": \"minecraft:glass_pane\",\n  \"106\": \"minecraft:vine\",\n  \"107\": \"minecraft:oak_fence_gate\",\n  \"108\": \"minecraft:brick_stairs\",\n  \"109\": \"minecraft:stone_brick_stairs\",\n  \"110\": \"minecraft:mycelium\",\n  \"111\": \"minecraft:lily_pad\",\n  \"112\": \"minecraft:nether_brick\",\n  \"113\": \"minecraft:nether_brick_fence\",\n  \"114\": \"minecraft:nether_brick_stairs\",\n  \"116\": \"minecraft:enchanting_table\",\n  \"120\": \"minecraft:end_portal_frame\",\n  \"121\": \"minecraft:end_stone\",\n  \"122\": \"minecraft:dragon_egg\",\n  \"123\": \"minecraft:redstone_lamp\",\n  \"126\": \"minecraft:oak_slab\",\n  \"128\": \"minecraft:sandstone_stairs\",\n  \"129\": \"minecraft:emerald_ore\",\n  \"130\": \"minecraft:ender_chest\",\n  \"131\": \"minecraft:tripwire_hook\",\n  \"133\": \"minecraft:emerald_block\",\n  \"134\": \"minecraft:spruce_stairs\",\n  \"135\": \"minecraft:birch_stairs\",\n  \"136\": \"minecraft:jungle_stairs\",\n  \"137\": \"minecraft:command_block\",\n  \"138\": \"minecraft:beacon\",\n  \"139\": \"minecraft:cobblestone_wall\",\n  \"143\": \"minecraft:oak_button\",\n  \"145\": \"minecraft:anvil\",\n  \"146\": \"minecraft:trapped_chest\",\n  \"147\": \"minecraft:light_weighted_pressure_plate\",\n  \"148\": \"minecraft:heavy_weighted_pressure_plate\",\n  \"151\": \"minecraft:daylight_detector\",\n  \"152\": \"minecraft:redstone_block\",\n  \"153\": \"minecraft:nether_quartz_ore\",\n  \"154\": \"minecraft:hopper\",\n  \"155\": \"minecraft:quartz_block\",\n  \"156\": \"minecraft:quartz_stairs\",\n  \"157\": \"minecraft:activator_rail\",\n  \"158\": \"minecraft:dropper\",\n  \"159\": \"minecraft:white_concrete\",\n  \"160\": \"minecraft:white_stained_glass_pane\",\n  \"161\": \"minecraft:acacia_leaves\",\n  \"162\": \"minecraft:acacia_log\",\n  \"163\": \"minecraft:acacia_stairs\",\n  \"164\": \"minecraft:dark_oak_stairs\",\n  \"165\": \"minecraft:slime_block\",\n  \"166\": \"minecraft:barrier\",\n  \"167\": \"minecraft:iron_trapdoor\",\n  \"168\": \"minecraft:prismarine\",\n  \"169\": \"minecraft:sea_lantern\",\n  \"170\": \"minecraft:hay_block\",\n  \"171\": \"minecraft:white_carpet\",\n  \"172\": \"minecraft:brown_concrete\",\n  \"173\": \"minecraft:coal_block\",\n  \"174\": \"minecraft:packed_ice\",\n  \"175\": \"minecraft:sunflower\",\n  \"179\": \"minecraft:red_sandstone\",\n  \"180\": \"minecraft:red_sandstone_stairs\",\n  \"182\": \"minecraft:stone_slab\",\n  \"183\": \"minecraft:spruce_fence_gate\",\n  \"184\": \"minecraft:birch_fence_gate\",\n  \"185\": \"minecraft:jungle_fence_gate\",\n  \"186\": \"minecraft:dark_oak_fence_gate\",\n  \"187\": \"minecraft:acacia_fence_gate\",\n  \"188\": \"minecraft:spruce_fence\",\n  \"189\": \"minecraft:birch_fence\",\n  \"190\": \"minecraft:jungle_fence\",\n  \"191\": \"minecraft:dark_oak_fence\",\n  \"192\": \"minecraft:acacia_fence\",\n  \"256\": \"minecraft:iron_shovel\",\n  \"257\": \"minecraft:iron_pickaxe\",\n  \"258\": \"minecraft:iron_axe\",\n  \"259\": \"minecraft:flint_and_steel\",\n  \"260\": \"minecraft:apple\",\n  \"261\": \"minecraft:bow\",\n  \"262\": \"minecraft:arrow\",\n  \"263\": \"minecraft:coal\",\n  \"264\": \"minecraft:diamond\",\n  \"265\": \"minecraft:iron_ingot\",\n  \"266\": \"minecraft:gold_ingot\",\n  \"267\": \"minecraft:iron_sword\",\n  \"268\": \"minecraft:wooden_sword\",\n  \"269\": \"minecraft:wooden_shovel\",\n  \"270\": \"minecraft:wooden_pickaxe\",\n  \"271\": \"minecraft:wooden_axe\",\n  \"272\": \"minecraft:stone_sword\",\n  \"273\": \"minecraft:stone_shovel\",\n  \"274\": \"minecraft:stone_pickaxe\",\n  \"275\": \"minecraft:stone_axe\",\n  \"276\": \"minecraft:diamond_sword\",\n  \"277\": \"minecraft:diamond_shovel\",\n  \"278\": \"minecraft:diamond_pickaxe\",\n  \"279\": \"minecraft:diamond_axe\",\n  \"280\": \"minecraft:stick\",\n  \"281\": \"minecraft:bowl\",\n  \"282\": \"minecraft:mushroom_stew\",\n  \"283\": \"minecraft:golden_sword\",\n  \"284\": \"minecraft:golden_shovel\",\n  \"285\": \"minecraft:golden_pickaxe\",\n  \"286\": \"minecraft:golden_axe\",\n  \"287\": \"minecraft:string\",\n  \"288\": \"minecraft:feather\",\n  \"289\": \"minecraft:gunpowder\",\n  \"290\": \"minecraft:wooden_hoe\",\n  \"291\": \"minecraft:stone_hoe\",\n  \"292\": \"minecraft:iron_hoe\",\n  \"293\": \"minecraft:diamond_hoe\",\n  \"294\": \"minecraft:golden_hoe\",\n  \"295\": \"minecraft:wheat_seeds\",\n  \"296\": \"minecraft:wheat\",\n  \"297\": \"minecraft:bread\",\n  \"298\": \"minecraft:leather_helmet\",\n  \"299\": \"minecraft:leather_chestplate\",\n  \"300\": \"minecraft:leather_leggings\",\n  \"301\": \"minecraft:leather_boots\",\n  \"302\": \"minecraft:chainmail_helmet\",\n  \"303\": \"minecraft:chainmail_chestplate\",\n  \"304\": \"minecraft:chainmail_leggings\",\n  \"305\": \"minecraft:chainmail_boots\",\n  \"306\": \"minecraft:iron_helmet\",\n  \"307\": \"minecraft:iron_chestplate\",\n  \"308\": \"minecraft:iron_leggings\",\n  \"309\": \"minecraft:iron_boots\",\n  \"310\": \"minecraft:diamond_helmet\",\n  \"311\": \"minecraft:diamond_chestplate\",\n  \"312\": \"minecraft:diamond_leggings\",\n  \"313\": \"minecraft:diamond_boots\",\n  \"314\": \"minecraft:golden_helmet\",\n  \"315\": \"minecraft:golden_chestplate\",\n  \"316\": \"minecraft:golden_leggings\",\n  \"317\": \"minecraft:golden_boots\",\n  \"318\": \"minecraft:flint\",\n  \"319\": \"minecraft:porkchop\",\n  \"320\": \"minecraft:cooked_porkchop\",\n  \"321\": \"minecraft:painting\",\n  \"322\": \"minecraft:golden_apple\",\n  \"323\": \"minecraft:sign\",\n  \"324\": \"minecraft:oak_door\",\n  \"325\": \"minecraft:bucket\",\n  \"326\": \"minecraft:water_bucket\",\n  \"327\": \"minecraft:lava_bucket\",\n  \"328\": \"minecraft:minecart\",\n  \"329\": \"minecraft:saddle\",\n  \"330\": \"minecraft:iron_door\",\n  \"331\": \"minecraft:redstone\",\n  \"332\": \"minecraft:snowball\",\n  \"333\": \"minecraft:oak_boat\",\n  \"334\": \"minecraft:leather\",\n  \"335\": \"minecraft:milk_bucket\",\n  \"336\": \"minecraft:brick\",\n  \"337\": \"minecraft:clay_ball\",\n  \"338\": \"minecraft:sugar_cane\",\n  \"339\": \"minecraft:paper\",\n  \"340\": \"minecraft:book\",\n  \"341\": \"minecraft:slime_ball\",\n  \"342\": \"minecraft:chest_minecart\",\n  \"343\": \"minecraft:furnace_minecart\",\n  \"344\": \"minecraft:egg\",\n  \"345\": \"minecraft:compass\",\n  \"346\": \"minecraft:fishing_rod\",\n  \"347\": \"minecraft:clock\",\n  \"348\": \"minecraft:glowstone_dust\",\n  \"349\": \"minecraft:tropical_fish\",\n  \"350\": \"minecraft:cooked_cod\",\n  \"351\": \"minecraft:light_gray_dye\",\n  \"352\": \"minecraft:bone\",\n  \"353\": \"minecraft:sugar\",\n  \"354\": \"minecraft:cake\",\n  \"355\": \"minecraft:white_bed\",\n  \"356\": \"minecraft:repeater\",\n  \"357\": \"minecraft:cookie\",\n  \"358\": \"minecraft:filled_map\",\n  \"359\": \"minecraft:shears\",\n  \"360\": \"minecraft:melon\",\n  \"361\": \"minecraft:pumpkin_seeds\",\n  \"362\": \"minecraft:melon_seeds\",\n  \"363\": \"minecraft:beef\",\n  \"364\": \"minecraft:cooked_beef\",\n  \"365\": \"minecraft:chicken\",\n  \"366\": \"minecraft:cooked_chicken\",\n  \"367\": \"minecraft:rotten_flesh\",\n  \"368\": \"minecraft:ender_pearl\",\n  \"369\": \"minecraft:blaze_rod\",\n  \"370\": \"minecraft:ghast_tear\",\n  \"371\": \"minecraft:gold_nugget\",\n  \"372\": \"minecraft:nether_wart\",\n  \"373\": \"minecraft:potion\",\n  \"374\": \"minecraft:glass_bottle\",\n  \"375\": \"minecraft:spider_eye\",\n  \"376\": \"minecraft:fermented_spider_eye\",\n  \"377\": \"minecraft:blaze_powder\",\n  \"378\": \"minecraft:magma_cream\",\n  \"379\": \"minecraft:brewing_stand\",\n  \"380\": \"minecraft:cauldron\",\n  \"381\": \"minecraft:ender_eye\",\n  \"382\": \"minecraft:glistering_melon_slice\",\n  \"383\": \"minecraft:wolf_spawn_egg\",\n  \"384\": \"minecraft:experience_bottle\",\n  \"385\": \"minecraft:fire_charge\",\n  \"386\": \"minecraft:writable_book\",\n  \"387\": \"minecraft:written_book\",\n  \"388\": \"minecraft:emerald\",\n  \"389\": \"minecraft:item_frame\",\n  \"390\": \"minecraft:flower_pot\",\n  \"391\": \"minecraft:carrot\",\n  \"392\": \"minecraft:potato\",\n  \"393\": \"minecraft:baked_potato\",\n  \"394\": \"minecraft:poisonous_potato\",\n  \"395\": \"minecraft:map\",\n  \"396\": \"minecraft:golden_carrot\",\n  \"397\": \"minecraft:skeleton_skull\",\n  \"398\": \"minecraft:carrot_on_a_stick\",\n  \"399\": \"minecraft:nether_star\",\n  \"400\": \"minecraft:pumpkin_pie\",\n  \"401\": \"minecraft:firework_rocket\",\n  \"402\": \"minecraft:firework_star\",\n  \"403\": \"minecraft:enchanted_book\",\n  \"404\": \"minecraft:comparator\",\n  \"405\": \"minecraft:nether_bricks\",\n  \"406\": \"minecraft:quartz\",\n  \"407\": \"minecraft:tnt_minecart\",\n  \"408\": \"minecraft:hopper_minecart\",\n  \"409\": \"minecraft:prismarine_shard\",\n  \"410\": \"minecraft:prismarine_crystals\",\n  \"411\": \"minecraft:rabbit\",\n  \"412\": \"minecraft:cooked_rabbit\",\n  \"413\": \"minecraft:rabbit_stew\",\n  \"414\": \"minecraft:rabbit_foot\",\n  \"415\": \"minecraft:rabbit_hide\",\n  \"416\": \"minecraft:armor_stand\",\n  \"417\": \"minecraft:iron_horse_armor\",\n  \"418\": \"minecraft:golden_horse_armor\",\n  \"419\": \"minecraft:diamond_horse_armor\",\n  \"420\": \"minecraft:lead\",\n  \"421\": \"minecraft:name_tag\",\n  \"422\": \"minecraft:command_block_minecart\",\n  \"423\": \"minecraft:mutton\",\n  \"424\": \"minecraft:cooked_mutton\",\n  \"425\": \"minecraft:white_banner\",\n  \"427\": \"minecraft:spruce_door\",\n  \"428\": \"minecraft:birch_door\",\n  \"429\": \"minecraft:jungle_door\",\n  \"430\": \"minecraft:acacia_door\",\n  \"431\": \"minecraft:dark_oak_door\",\n  \"2256\": \"minecraft:music_disc_13\",\n  \"2257\": \"minecraft:music_disc_cat\",\n  \"2258\": \"minecraft:music_disc_blocks\",\n  \"2259\": \"minecraft:music_disc_chirp\",\n  \"2260\": \"minecraft:music_disc_far\",\n  \"2261\": \"minecraft:music_disc_mall\",\n  \"2262\": \"minecraft:music_disc_mellohi\",\n  \"2263\": \"minecraft:music_disc_stal\",\n  \"2264\": \"minecraft:music_disc_strad\",\n  \"2265\": \"minecraft:music_disc_ward\",\n  \"2266\": \"minecraft:music_disc_11\",\n  \"2267\": \"minecraft:music_disc_wait\"\n}\n"
  },
  {
    "path": "plugin/src/main/resources/mapping/modern_block_id_remap.json",
    "content": "{\n  \"minecraft:grass\": \"minecraft:short_grass\",\n  \"minecraft:chain\": \"minecraft:iron_chain\"\n}"
  },
  {
    "path": "plugin/src/main/resources/mapping/modern_item_id_remap.json",
    "content": "{\n  \"minecraft:turtle_scute\": \"minecraft:scute\"\n}"
  },
  {
    "path": "settings.gradle.kts",
    "content": "dependencyResolutionManagement {\n    repositories {\n        mavenCentral()\n        maven {\n            name = \"elytrium-repo\"\n            url = uri(\"https://maven.elytrium.net/repo/\")\n        }\n        maven {\n            name = \"papermc-repo\"\n            url = uri(\"https://repo.papermc.io/repository/maven-public/\")\n        }\n    }\n}\n\nenableFeaturePreview(\"TYPESAFE_PROJECT_ACCESSORS\")\n\nrootProject.name = \"limboapi\"\n\ninclude(\"api\")\ninclude(\"plugin\")\n"
  }
]