[
  {
    "path": ".gitignore",
    "content": "# User-specific stuff\n.idea/\n\n*.iml\n*.ipr\n*.iws\n\n# IntelliJ\nout/\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# BlueJ files\n*.ctxt\n\n# Package Files #\n*.jar\n*.war\n*.nar\n*.ear\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\nbuild/\n\n# Ignore Gradle GUI config\ngradle-app.setting\n\n# Cache of project\n.gradletasknamecache\n\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": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2021 \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\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# MineClient 1.16.4 \n[![discord](https://img.shields.io/badge/Discord-h8EQyuYTK7-9080c2)](https://discord.gg/h8EQyuYTK7)\n\nThis is fabric 1.16 mod, for highway digging on endcrystal. To use just get on a highway axis and press Y.\n\n## Installation:\n\nDownload [fabric for minecraft 1.16.4](https://fabricmc.net/use/)  \nDownload the latest compiled version of MineClient for your Minecraft version [from the releases section](https://github.com/ChiquitaV2/MineClient/releases)  \n\n"
  },
  {
    "path": "build.gradle",
    "content": "plugins {\n    id 'fabric-loom' version '0.6-SNAPSHOT'\n    id 'maven-publish'\n}\nallprojects {\n    repositories {\n        maven { url 'https://jitpack.io' }\n    }\n}\n\n\nsourceCompatibility = JavaVersion.VERSION_1_8\ntargetCompatibility = JavaVersion.VERSION_1_8\n\narchivesBaseName = project.archives_base_name\nversion = project.mod_version\ngroup = project.maven_group\n\ndependencies {\n    //to change the versions see the gradle.properties file\n    minecraft \"com.mojang:minecraft:${project.minecraft_version}\"\n    mappings \"net.fabricmc:yarn:${project.yarn_mappings}:v2\"\n    modImplementation \"net.fabricmc:fabric-loader:${project.loader_version}\"\n    modImplementation \"net.fabricmc.fabric-api:fabric-api:0.29.3+1.16\"\n    modImplementation 'com.github.ZeroMemes:Alpine:1.9'\n    include 'com.github.ZeroMemes:Alpine:1.9'\n    include 'net.jodah:typetools:0.4.4'\n\n    // Fabric API. This is technically optional, but you probably want it anyway.\n   // modImplementation \"net.fabricmc.fabric-api:fabric-api:${project.fabric_version}\"\n\n    // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.\n    // You may need to force-disable transitiveness on them.\n}\n\nprocessResources {\n    inputs.property \"version\", project.version\n\n    from(sourceSets.main.resources.srcDirs) {\n        include \"fabric.mod.json\"\n        expand \"version\": project.version\n    }\n\n    from(sourceSets.main.resources.srcDirs) {\n        exclude \"fabric.mod.json\"\n    }\n}\n\n// ensure that the encoding is set to UTF-8, no matter what the system default is\n// this fixes some edge cases with special characters not displaying correctly\n// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html\ntasks.withType(JavaCompile) {\n    options.encoding = \"UTF-8\"\n}\n\n// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the \"build\" task\n// if it is present.\n// If you remove this task, sources will not be generated.\ntask sourcesJar(type: Jar, dependsOn: classes) {\n    classifier = \"sources\"\n    from sourceSets.main.allSource\n}\n\njar {\n    from \"LICENSE\"\n}\n\n// configure the maven publication\npublishing {\n    publications {\n        mavenJava(MavenPublication) {\n            // add all the jars that should be included when publishing to maven\n            artifact(remapJar) {\n                builtBy remapJar\n            }\n            artifact(sourcesJar) {\n                builtBy remapSourcesJar\n            }\n        }\n    }\n\n    // select the repositories you want to publish to\n    repositories {\n        // uncomment to publish to the local maven\n        // mavenLocal()\n    }\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-6.5.1-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "# Done to increase the memory available to gradle.\norg.gradle.jvmargs=-Xmx1G\n# Fabric Properties\n# check these on https://modmuss50.me/fabric.html\nminecraft_version=1.16.5\nyarn_mappings=1.16.5+build.1\nloader_version=0.11.1\n# Mod Properties\nmod_version=0.1-SNAPSHOT\nmaven_group=chiquita\narchives_base_name=mineclient\n"
  },
  {
    "path": "gradlew",
    "content": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or 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 UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$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}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\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\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif [ \"$cygwin\" = \"true\" -o \"$msys\" = \"true\" ] ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    \n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=`expr $i + 1`\n    done\n    case $i in\n        0) set -- ;;\n        1) set -- \"$args0\" ;;\n        2) set -- \"$args0\" \"$args1\" ;;\n        3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=`save \"$@\"`\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\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 init\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 init\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:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\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 %CMD_LINE_ARGS%\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": "settings.gradle",
    "content": "pluginManagement {\n    repositories {\n        jcenter()\n        maven {\n            name = 'Fabric'\n            url = 'https://maven.fabricmc.net/'\n        }\n        gradlePluginPortal()\n    }\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/Mineclient.java",
    "content": "package chiquita.mineclient;\n\nimport chiquita.mineclient.module.ModuleManager;\nimport me.zero.alpine.bus.EventBus;\nimport me.zero.alpine.bus.EventManager;\nimport net.fabricmc.api.ModInitializer;\n\npublic class Mineclient implements ModInitializer {\n    public static final String VERSION = \"0.0.1\";\n    public static final String NAME = \"MineClient \";\n    public static EventBus eventBus = new EventManager();\n    public static final ModuleManager moduleManager = new ModuleManager();\n\n\n    @Override\n    public void onInitialize() {\n        moduleManager.init();\n    }\n    public static ModuleManager getModuleManager() {\n        return moduleManager;\n    }\n\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/Event.java",
    "content": "package chiquita.mineclient.event;\n\nimport me.zero.alpine.event.type.Cancellable;\n\npublic class Event extends Cancellable {\n\n    private Era era = Era.PRE;\n\n    public enum Era {\n        PRE,\n        POST\n    }\n\n    public Event(Era Era) {\n        era = Era;\n    }\n\n    public Event() {\n\n    }\n\n    public Era getEra() {\n        return era;\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/EventMove.java",
    "content": "package chiquita.mineclient.event;\n\nimport net.minecraft.entity.MovementType;\nimport net.minecraft.util.math.Vec3d;\n\npublic class EventMove {\n    public MovementType Type;\n    public Vec3d vec3d;\n\n    public EventMove(MovementType p_Type, Vec3d vec3d_1)\n    {\n        this.Type = p_Type;\n        this.vec3d = vec3d_1;\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/EventTick.java",
    "content": "package chiquita.mineclient.event;\n\npublic class EventTick extends Event {\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/KeyPressEvent.java",
    "content": "package chiquita.mineclient.event;\n\npublic class KeyPressEvent extends Event {\n    public final int keyCode;\n    public final int action;\n\n    public KeyPressEvent(int keyCode, int action)\n    {\n        this.keyCode = keyCode;\n        this.action = action;\n    }\n}\n\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/mixin/IKeyBinding.java",
    "content": "package chiquita.mineclient.mixin;\n\nimport net.minecraft.client.options.KeyBinding;\nimport net.minecraft.client.util.InputUtil;\nimport org.spongepowered.asm.mixin.Mixin;\nimport org.spongepowered.asm.mixin.gen.Accessor;\n\n@Mixin(KeyBinding.class)\npublic interface IKeyBinding {\n\n    @Accessor\n    InputUtil.Key getBoundKey();\n    @Accessor\n    void setPressed(boolean pressed);\n\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/mixin/MixinClientPlayerEntity.java",
    "content": "package chiquita.mineclient.mixin;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.event.EventMove;\nimport chiquita.mineclient.event.EventTick;\nimport com.mojang.authlib.GameProfile;\nimport net.minecraft.client.network.AbstractClientPlayerEntity;\nimport net.minecraft.client.network.ClientPlayerEntity;\nimport net.minecraft.client.world.ClientWorld;\nimport net.minecraft.entity.MovementType;\nimport net.minecraft.util.math.Vec3d;\nimport org.spongepowered.asm.mixin.Mixin;\nimport org.spongepowered.asm.mixin.injection.At;\nimport org.spongepowered.asm.mixin.injection.Inject;\nimport org.spongepowered.asm.mixin.injection.callback.CallbackInfo;\n\n@Mixin(ClientPlayerEntity.class)\npublic class MixinClientPlayerEntity extends AbstractClientPlayerEntity {\n\n    public MixinClientPlayerEntity(ClientWorld world, GameProfile profile) {\n        super(world, profile);\n    }\n\n    @Inject(at = @At(\"HEAD\"), method = \"move\", cancellable = true)\n    public void move(MovementType movementType_1, Vec3d vec3d_1, CallbackInfo info) {\n        EventMove event = new EventMove(movementType_1, vec3d_1);\n        Mineclient.eventBus.post(event);\n    }\n\n    @Inject(at = @At(\"RETURN\"), method = \"tick()V\", cancellable = true)\n    public void tick(CallbackInfo info) {\n        EventTick event = new EventTick();\n        Mineclient.eventBus.post(event);\n        if (event.isCancelled())\n            info.cancel();\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/mixin/MixinKeyboard.java",
    "content": "package chiquita.mineclient.mixin;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.event.KeyPressEvent;\nimport net.minecraft.client.Keyboard;\nimport org.spongepowered.asm.mixin.Mixin;\nimport org.spongepowered.asm.mixin.injection.At;\nimport org.spongepowered.asm.mixin.injection.Inject;\nimport org.spongepowered.asm.mixin.injection.callback.CallbackInfo;\n\n@Mixin(Keyboard.class)\npublic class MixinKeyboard\n{\n    @Inject(at = @At(\"HEAD\"), method = \"onKey(JIIII)V\")\n    private void onOnKey(long windowHandle, int keyCode, int scanCode,\n                         int action, int modifiers, CallbackInfo ci)\n    {\n        KeyPressEvent event = new KeyPressEvent(keyCode, action);\n        Mineclient.eventBus.post(event);\n    }\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/Module.java",
    "content": "package chiquita.mineclient.module;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.settings.Value;\nimport me.zero.alpine.listener.Listenable;\nimport net.minecraft.client.MinecraftClient;\n\nimport java.util.List;\n\npublic class Module implements Listenable {\n\n    public final static int KEY_UNBOUND = 63;\n\n    private boolean toggled = false;\n    public String name;\n    public Category category;\n    public boolean hasSettings;\n    public List<Value> settings;\n    public int bind = -2;\n\n    public MinecraftClient mc = MinecraftClient.getInstance();\n\n    public Module(String displayName, Category category, boolean doesItHaveSettings, int defaultBind) {\n        this.name = displayName;\n        this.category = category;\n        this.hasSettings = doesItHaveSettings;\n        this.bind = defaultBind;\n    }\n\n    public void toggle() {\n        toggled = !toggled;\n        if (toggled) onEnable();\n        else onDisable();\n    }\n\n    public enum Category {\n        movement, player, world\n    }\n\n    public void setToggled(boolean toggled) {\n        this.toggled = toggled;\n        if (toggled) onEnable();\n        else onDisable();\n    }\n\n    public boolean isToggled() {\n        return toggled;\n    }\n\n    public void onEnable() {\n        Mineclient.eventBus.subscribe(this);\n    }\n\n    public void onDisable() {\n        try {\n            Mineclient.eventBus.unsubscribe(this);\n        }\n        catch (Exception uhoh) {\n            uhoh.printStackTrace();\n        }\n    }\n\n    public Category getCategory() {\n        return category;\n    }\n    public void signalValueChange(Value value) {\n\n    }\n\n\n    public void signalEnumChange() {\n\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public List<Value> getSettings()\n    {\n        return settings;\n    }\n    public int getBind() {\n        return bind;\n    }\n\n    public void toggleNoSave()\n    {\n        this.toggled = !toggled;\n        if (toggled) onEnable();\n        else onDisable();\n    }\n\n    public void setBind(String bindString) {\n        int bindNum = Integer.parseInt(bindString);\n        this.bind = bindNum;\n    }\n\n    public void setBind(int bindInt) {\n        this.bind = bindInt;\n    }\n\n    public void onToggle() {}\n\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/ModuleManager.java",
    "content": "package chiquita.mineclient.module;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.event.KeyPressEvent;\nimport chiquita.mineclient.module.modules.*;\nimport chiquita.mineclient.settings.Value;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listenable;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.client.MinecraftClient;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.lang.reflect.Field;\nimport java.util.ArrayList;\nimport java.util.Comparator;\nimport java.util.List;\n\npublic class ModuleManager extends Object implements Listenable {\n    public static ArrayList<Module> modules = new ArrayList<Module>();\n\n    public static void init() {\n        Mineclient.eventBus.subscribe(Mineclient.getModuleManager());\n        add(new Yaw());\n        add(new OffAxisAlarm());\n        add(new Nuker());\n        add(new HotbarCache());\n        add(new AutoSwitcher());\n        add(new AutoWalk());\n        add(new AutoTunnel());\n        add(new AutoEat());\n    }\n\n    public static List<Module> getModules() {\n        return modules;\n    }\n\n    public static Module getModule(Class module) {\n        for (Module mod : modules) {\n            if (mod.getClass() == module)\n                return mod;\n        }\n        return null;\n    }\n\n    public static void add(Module mod) {\n        try\n        {\n            for (Field field : mod.getClass().getDeclaredFields())\n            {\n                if (Value.class.isAssignableFrom(field.getType()))\n                {\n                    if (!field.isAccessible())\n                    {\n                        field.setAccessible(true);\n                    }\n                    final Value val = (Value) field.get(mod);\n                    val.initializeMod(mod);\n                }\n            }\n            modules.add(mod);\n        }\n        catch (Exception e)\n        {\n            e.printStackTrace();\n        }\n    }\n\n    public static final List<Module> getModuleList(Module.Category category) {\n        List<Module> list = new ArrayList<>();\n        for (Module module : modules) {\n            if (module.getCategory().equals(category)) {\n                list.add(module);\n            }\n        }\n        // Organize alphabetically or ppl will get mad :D\n        list.sort(Comparator.comparing(Module::getName));\n        return list;\n    }\n\n    public static ModuleManager get() {\n        return Mineclient.getModuleManager();\n    }\n\n    public static Module getModuleByName(String name) {\n        for (Module m : modules) {\n            if (name.equalsIgnoreCase(m.getName()))\n                return m;\n        }\n        return null;\n    }\n\n    @EventHandler\n    private Listener<KeyPressEvent> keyPressEventListener = new Listener<>(event -> {\n        if (event.action != GLFW.GLFW_PRESS) return;\n        if (MinecraftClient.getInstance().currentScreen != null) return;\n        modules.stream().filter(m -> m.getBind() == event.keyCode).forEach(Module::toggle);\n    });\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoEat.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.mixin.IKeyBinding;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.settings.Value;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.client.options.KeyBinding;\nimport net.minecraft.item.ItemGroup;\nimport net.minecraft.item.ItemStack;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Objects;\n\npublic class AutoEat extends Module {\n\n    public final Value<Integer> mode = new Value<>(\"Mode\", new String[]{\"Mode\"}, \"What mode to use, 1 = Hunger, 2 = Health, 3 = Both.\", 1, 1, 3, 1, 0);\n    public final Value<Integer> healthToEat = new Value<>(\"Health\", new String[]{\"Health\"}, \"How much health to heal at.\", 10, 1, 36, 1, 0);\n    public final Value<Integer> hungerToEat = new Value<>(\"Hunger\", new String[]{\"Hunger\"}, \"How much hunger to eat at.\", 13, 1, 20, 1, 0);\n\n    public List<Value> values = Arrays.asList(\n            mode,\n            healthToEat,\n            hungerToEat\n    );\n\n    public AutoEat() {\n        super(\"AutoEat\", Category.player, true, GLFW.GLFW_KEY_Y);\n        super.settings = values;\n    }\n    private int lastSlot = -1;\n    private boolean eating = false;\n\n    private boolean isValid(ItemStack stack, int food) {\n        return stack.getItem().getGroup() == ItemGroup.FOOD && (20 - food) >= Objects.requireNonNull(stack.getItem().getFoodComponent()).getHunger();\n    }\n\n    @EventHandler\n    private Listener<EventTick> eventTickListener = new Listener<>(event -> {\n        assert mc.player != null;\n        if (mode.getValue() == 1) {\n            if (eating && (mc.player.getHungerManager().getFoodLevel() == 20)) {\n                if (lastSlot != -1) {\n                    mc.player.inventory.selectedSlot = lastSlot;\n                    lastSlot = -1;\n                }\n                eating = false;\n                KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), false);\n                return;\n            }\n        }\n        if (mode.getValue() == 2) {\n            if (eating && (mc.player.getHealth() + mc.player.getAbsorptionAmount() > healthToEat.getValue())) {\n                if (lastSlot != -1) {\n                    mc.player.inventory.selectedSlot = lastSlot;\n                    lastSlot = -1;\n                }\n                eating = false;\n                KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), false);\n                return;\n            }\n        }\n        if (mode.getValue() == 3) {\n            if (eating && (mc.player.getHealth() + mc.player.getAbsorptionAmount() > healthToEat.getValue()) && (mc.player.getHungerManager().getFoodLevel() == 20)) {\n                if (lastSlot != -1) {\n                    mc.player.inventory.selectedSlot = lastSlot;\n                    lastSlot = -1;\n                }\n                eating = false;\n                KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), false);\n                return;\n            }\n        }\n        if (eating) return;\n        if (mode.getValue() == 1) {\n            if (mc.player.getHungerManager().getFoodLevel() < hungerToEat.getValue()) {\n                for (int i = 0; i < 9; i++) {\n                    if (mc.player.inventory.getStack(i).isFood()) {\n                        lastSlot = mc.player.inventory.selectedSlot;\n                        mc.player.inventory.selectedSlot = i;\n                        eating = true;\n                        KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), true);\n                        return;\n                    }\n                }\n            }\n        }\n        if (mode.getValue() == 2) {\n            if (mc.player.getHealth() + mc.player.getAbsorptionAmount() <= healthToEat.getValue()) {\n                for (int i = 0; i < 9; i++) {\n                    if (mc.player.inventory.getStack(i).isFood()) {\n                        lastSlot = mc.player.inventory.selectedSlot;\n                        mc.player.inventory.selectedSlot = i;\n                        eating = true;\n                        KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), true);\n                        return;\n                    }\n                }\n            }\n        }\n        if (mode.getValue() == 3) {\n            if (mc.player.getHealth() + mc.player.getAbsorptionAmount() <= healthToEat.getValue() || mc.player.getHungerManager().getFoodLevel() < hungerToEat.getValue()) {\n                for (int i = 0; i < 9; i++) {\n                    if (mc.player.inventory.getStack(i).isFood()) {\n                        lastSlot = mc.player.inventory.selectedSlot;\n                        mc.player.inventory.selectedSlot = i;\n                        eating = true;\n                        KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), true);\n                        return;\n                    }\n                }\n            }\n        }\n    });\n    public boolean isEating() {\n        return eating;\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoSwitcher.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.module.ModuleManager;\nimport chiquita.mineclient.settings.Value;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.client.MinecraftClient;\nimport net.minecraft.entity.player.PlayerEntity;\nimport net.minecraft.item.Items;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class AutoSwitcher extends Module {\n\n\n    public AutoSwitcher() {\n        super(\"AutoSwitcher\", Category.player, false, GLFW.GLFW_KEY_Y);\n    }\n\n    @EventHandler\n    private Listener<EventTick> eventTickListener = new Listener<>(event -> {\n        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);\n        if (autoEat.isEating()) return;\n        MinecraftClient mc = MinecraftClient.getInstance();\n        PlayerEntity player = mc.player;\n        int mode = 1;\n        switch (mode) {\n            case 0:\n                if (player.inventory.getMainHandStack().isEmpty() || player.inventory.getMainHandStack().getItem() != Items.DIAMOND_PICKAXE || player.inventory.getMainHandStack().getItem() != Items.NETHERITE_PICKAXE) {\n                    for (int i = 0; i < 9; i++) {\n                        if (player.inventory.getStack(i).getItem() == Items.DIAMOND_PICKAXE || player.inventory.getStack(i).getItem() == Items.NETHERITE_PICKAXE) {\n                            player.inventory.selectedSlot = i;\n                            //                            player.inventory.swapSlotWithHotbar(i);\n                            return;\n                        }\n                    }\n                }\n                break;\n        }\n    });\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoTunnel.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventMove;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.module.ModuleManager;\nimport chiquita.mineclient.settings.Value;\nimport chiquita.mineclient.utils.EntityUtils;\nimport chiquita.mineclient.utils.Timer;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.block.Block;\nimport net.minecraft.block.BlockState;\nimport net.minecraft.block.Blocks;\nimport net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;\nimport net.minecraft.util.math.BlockPos;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.util.List;\nimport java.util.concurrent.CopyOnWriteArrayList;\n\nimport static net.minecraft.util.math.Direction.UP;\n\npublic class AutoTunnel extends Module\n{\n\n    public final Value<Boolean> pauseAutoWalk = new Value<>(\"PauseAutoWalk\", new String[]{\"Blocks\"}, \"Pause AutoWalk?\", true);\n\n    public AutoTunnel()\n    {\n        super(\"AutoTunnel\", Category.world, false, GLFW.GLFW_KEY_Y);\n    }\n\n    private List<BlockPos> blocksToDestroy = new CopyOnWriteArrayList<>();\n    private boolean needPause = false;\n    private Timer pauseTimer = new Timer();\n\n    @EventHandler\n    private Listener<EventMove> eventMoveListener = new Listener<>(event -> {\n        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);\n        if (autoEat.isEating()) return;\n\n        blocksToDestroy.clear();\n\n        BlockPos playerPos = new BlockPos(Math.floor(mc.player.getX()), Math.floor(mc.player.getY()), Math.floor(mc.player.getZ()));\n\n        switch (EntityUtils.GetFacing())\n        {\n            case East:\n                switch (1)\n                {\n                    case 1:\n                        for (int i = 0; i < 3; ++i)\n                        {\n                            blocksToDestroy.add(playerPos.east());\n                            blocksToDestroy.add(playerPos.east().up());\n                            blocksToDestroy.add(playerPos.east().up().up());\n                            blocksToDestroy.add(playerPos.east().north());\n                            blocksToDestroy.add(playerPos.east().north().up());\n                            blocksToDestroy.add(playerPos.east().north().up().up());\n\n                            playerPos = new BlockPos(playerPos).east();\n                        }\n                        break;\n                }\n                break;\n            case North:\n                switch (1)\n                {\n                    case 1:\n                        for (int i = 0; i < 3; ++i)\n                        {\n                            blocksToDestroy.add(playerPos.north());\n                            blocksToDestroy.add(playerPos.north().up());\n                            blocksToDestroy.add(playerPos.north().up().up());\n                            blocksToDestroy.add(playerPos.north().east());\n                            blocksToDestroy.add(playerPos.north().east().up());\n                            blocksToDestroy.add(playerPos.north().east().up().up());\n\n                            playerPos = new BlockPos(playerPos).north();\n                        }\n                        break;\n                }\n                break;\n            case South:\n                switch (1)\n                {\n                    case 1:\n                        for (int i = 0; i < 3; ++i)\n                        {\n                            blocksToDestroy.add(playerPos.south());\n                            blocksToDestroy.add(playerPos.south().up());\n                            blocksToDestroy.add(playerPos.south().up().up());\n                            blocksToDestroy.add(playerPos.south().west());\n                            blocksToDestroy.add(playerPos.south().west().up());\n                            blocksToDestroy.add(playerPos.south().west().up().up());\n\n                            playerPos = new BlockPos(playerPos).south();\n                        }\n                        break;\n                }\n                break;\n            case West:\n                switch (1)\n                {\n                    case 1:\n                        for (int i = 0; i < 3; ++i)\n                        {\n                            blocksToDestroy.add(playerPos.west());\n                            blocksToDestroy.add(playerPos.west().up());\n                            blocksToDestroy.add(playerPos.west().up().up());\n                            blocksToDestroy.add(playerPos.west().south());\n                            blocksToDestroy.add(playerPos.west().south().up());\n                            blocksToDestroy.add(playerPos.west().south().up().up());\n\n                            playerPos = new BlockPos(playerPos).west();\n                        }\n                        break;\n                }\n                break;\n            default:\n                break;\n        }\n\n        BlockPos toDestroy = null;\n\n        for (BlockPos pos : blocksToDestroy)\n        {\n            BlockState state = mc.world.getBlockState(pos);\n\n            if (state.getBlock() == Blocks.AIR || state.getBlock() == Blocks.WATER || state.getBlock() == Blocks.LAVA || state.getBlock() == Blocks.BEDROCK || state.getBlock() == Blocks.NETHERRACK || state.getBlock() == Blocks.CAVE_AIR || state.getBlock() == Blocks.VOID_AIR)\n                continue;\n\n            toDestroy = pos;\n            break;\n        }\n\n        if (toDestroy != null) {\n            Block td = mc.world.getBlockState(toDestroy).getBlock();\n            if (td != Blocks.AIR && td != Blocks.NETHERRACK && td != Blocks.NETHER_PORTAL) {\n                mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket(\n                        PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, toDestroy, UP));\n                mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK,\n                        toDestroy, UP));\n                needPause = true;\n            }\n        }\n        else needPause = false;\n    });\n\n    public boolean PauseAutoWalk()\n    {\n        return needPause && pauseAutoWalk.getValue();\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoWalk.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.module.ModuleManager;\nimport chiquita.mineclient.settings.Value;\nimport chiquita.mineclient.utils.EntityUtils;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.item.Items;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class AutoWalk extends Module {\n\n    public final Value<Boolean> autoAlign = new Value<>(\"AutoAlign\", new String[]{\"AutoAlign\"}, \"See what highway you're on and make a decision.\", false);\n    public final Value<Boolean> pauseNoPickaxe = new Value<>(\"PauseNoPick\", new String[]{\"PauseNoPick\"}, \"See if you have no pickaxe in your hand and pause\", false);\n    public final Value<Integer> direction = new Value<>(\"Direction\", new String[]{\"Direction\"}, \"Which key to hold down.\", 1, 0, 4, 1,0);\n\n    public List<Value> values = Arrays.asList(\n            autoAlign,\n            direction,\n            pauseNoPickaxe\n    );\n\n    public AutoWalk() {\n        super(\"AutoWalk\", Module.Category.movement, true, GLFW.GLFW_KEY_Y);\n        super.settings = values;\n    }\n\n    @EventHandler\n    private Listener<EventTick> eventTickListener = new Listener<>(event -> {\n        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);\n        AutoTunnel at = ((AutoTunnel) ModuleManager.getModule(AutoTunnel.class));\n        boolean pause = at.PauseAutoWalk() || autoEat.isEating() || (pauseNoPickaxe.getValue() && (mc.player.inventory.getMainHandStack().getItem() != Items.DIAMOND_PICKAXE && mc.player.inventory.getMainHandStack().getItem() != Items.NETHERITE_PICKAXE));\n        if (!pause) {\n            if (autoAlign.getValue()) {\n                ModuleManager.getModule(Yaw.class).getSettings().get(0).setValue(false);\n                ModuleManager.getModule(Yaw.class).getSettings().get(1).setValue(false);\n                switch (EntityUtils.determineHighway()) {\n                    case XPZP:\n                        mc.player.yaw = 0;\n                        mc.player.headYaw = -45;\n                        mc.options.keyLeft.setPressed(true);\n                        mc.options.keyForward.setPressed(true);\n                        break;\n                    case XNZP:\n                        mc.player.yaw = 90;\n                        mc.player.headYaw = -135;\n                        mc.options.keyForward.setPressed(true);\n                        mc.options.keyLeft.setPressed(true);\n                        break;\n                    case XPZN:\n                        mc.player.yaw = 180;\n                        mc.player.yaw = 135;\n                        break;\n                }\n            }\n            else {\n                switch (direction.getValue()) {\n                    case 1:\n                        mc.options.keyForward.setPressed(true);\n                        break;\n                    case 2:\n                        mc.options.keyRight.setPressed(true);\n                        break;\n                    case 3:\n                        mc.options.keyBack.setPressed(true);\n                        break;\n                    case 4:\n                        mc.options.keyLeft.setPressed(true);\n                        break;\n                }\n            }\n        }\n        if (pause) {\n            mc.options.keyForward.setPressed(false);\n            mc.options.keyLeft.setPressed(false);\n            mc.options.keyRight.setPressed(false);\n            mc.options.keyBack.setPressed(false);\n        }\n    });\n\n    public void onDisable() {\n        mc.options.keyForward.setPressed(false);\n        mc.options.keyLeft.setPressed(false);\n        mc.options.keyRight.setPressed(false);\n        mc.options.keyBack.setPressed(false);\n        super.onDisable();\n    }\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/HotbarCache.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.settings.Value;\nimport chiquita.mineclient.utils.Timer;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.client.MinecraftClient;\nimport net.minecraft.item.Item;\nimport net.minecraft.item.ItemStack;\nimport net.minecraft.item.Items;\nimport net.minecraft.screen.slot.SlotActionType;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class HotbarCache extends Module\n{\n    public final Value<Integer> Mode = new Value<Integer>(\"Mode\", new String[] {\"M\"}, \"The mode of refilling to use, Refill may cause desync\", 1, 1, 2, 1, 0);\n    public final Value<Float> Delay = new Value<Float>(\"Delay\", new String[] {\"D\"}, \"Delay to use\", 1.0f, 0.0f, 10.0f, 1.0f, 1);\n\n    public List<Value> values = Arrays.asList(\n            Mode, Delay\n    );\n\n    public HotbarCache()\n    {\n        super(\"HotbarCache\", Category.player, true, GLFW.GLFW_KEY_Y);\n        super.settings = values;\n    }\n\n    private ArrayList<Item> Hotbar = new ArrayList<Item>();\n    private Timer timer = new Timer();\n\n    static MinecraftClient staticMC = MinecraftClient.getInstance();\n\n    @Override\n    public void onEnable()\n    {\n        super.onEnable();\n        Hotbar.clear();\n        for (int i = 0; i < 9; ++i) {\n            ItemStack l_Stack = mc.player.inventory.getStack(i);\n            if (!l_Stack.isEmpty() && !Hotbar.contains(l_Stack.getItem()))\n                Hotbar.add(l_Stack.getItem());\n            else\n                Hotbar.add(Items.AIR);\n        }\n    }\n\n    /// Don't activate on startup\n    @Override\n    public void toggleNoSave() {\n    }\n\n    @EventHandler\n    private Listener<EventTick> OnPlayerUpdate = new Listener<>(p_Event -> {\n        if (!timer.passed(Delay.getValue() * 1000))\n            return;\n\n        switch (Mode.getValue()) {\n            case 1:\n                for (int i = 0; i < 9; ++i) {\n                    if (switchSlotIfNeed(i)) {\n                        timer.reset();\n                        return;\n                    }\n                }\n                break;\n            case 2:\n                for (int i = 0; i < 9; ++i) {\n                    if (refillSlotIfNeed(i)) {\n                        timer.reset();\n                        return;\n                    }\n                }\n                break;\n            default:\n                break;\n        }\n    });\n\n    private boolean switchSlotIfNeed(int targetSlot) {\n        Item targetItem = Hotbar.get(targetSlot);\n\n        if (targetItem == Items.AIR)\n            return false;\n\n        if (!mc.player.inventory.getStack(targetSlot).isEmpty() && mc.player.inventory.getStack(targetSlot).getItem() == targetItem)\n            return false;\n\n        int slotFromCache = getItemSlot(targetItem);\n\n        if (slotFromCache != -1 && slotFromCache != 45) {\n            mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, slotFromCache, 0,\n                    SlotActionType.PICKUP, mc.player);\n            mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, targetSlot+36, 0, SlotActionType.PICKUP,\n                    mc.player);\n            mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, slotFromCache, 0,\n                    SlotActionType.PICKUP, mc.player);\n            mc.interactionManager.tick();\n\n            return true;\n        }\n\n        return false;\n    }\n\n    private boolean refillSlotIfNeed(int targetSlot) {\n        ItemStack targetStack = mc.player.inventory.getStack(targetSlot);\n\n        if (targetStack.isEmpty() || targetStack.getItem() == Items.AIR)\n            return false;\n\n        if (!targetStack.isStackable())\n            return false;\n\n        if (targetStack.getCount() >= targetStack.getMaxCount())\n            return false;\n\n        /// We're going to search the entire inventory for the same stack, WITH THE SAME NAME, and use quick move.\n        for (int i = 9; i < 36; ++i) {\n            final ItemStack currentItem = mc.player.inventory.getStack(i);\n\n            if (currentItem.isEmpty())\n                continue;\n\n            if (canItemBeMergedWith(targetStack, currentItem)) {\n                mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, i, 0,\n                        SlotActionType.QUICK_MOVE, mc.player);\n                mc.interactionManager.tick();\n\n                /// Check again for more next available tick\n                return true;\n            }\n        }\n\n        return false;\n    }\n\n    private boolean canItemBeMergedWith(ItemStack source, ItemStack target) {\n        return source.getItem() == target.getItem() && source.getName().equals(target.getName());\n    }\n\n    public static int getItemSlot(Item input) {\n        if (staticMC.player == null)\n            return 0;\n\n        for (int i = 0; i < staticMC.player.inventory.size(); ++i) {\n            if (i == 0 || i == 5 || i == 6 || i == 7 || i == 8)\n                continue;\n\n            ItemStack s = staticMC.player.inventory.getStack(i);\n\n            if (s.isEmpty())\n                continue;\n\n            if (s.getItem() == input) {\n                return i;\n            }\n        }\n        return -1;\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/Nuker.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.module.ModuleManager;\nimport chiquita.mineclient.settings.Value;\nimport chiquita.mineclient.utils.EntityUtils;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.block.Block;\nimport net.minecraft.block.Blocks;\nimport net.minecraft.util.math.BlockPos;\nimport net.minecraft.util.math.Direction;\nimport net.minecraft.util.math.MathHelper;\nimport net.minecraft.util.math.Vec3d;\nimport net.minecraft.world.RaycastContext;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Nuker extends Module {\n\n    private List<Block> blockList = new ArrayList<>();\n\n\n    public Nuker() {\n        super(\"Nuker\", Category.world, false, GLFW.GLFW_KEY_Y);\n    }\n\n    private BlockPos lastPlayerPos = null;\n\n    private List<BlockPos> getBlocks() {\n        int mode = 1;\n        List<BlockPos> blocks = new ArrayList<>();\n        if (this.isToggled()) {\n            switch (mode) {\n                case 1:\n                    blocks = get2x3();\n                    break;\n            }\n        }\n        return blocks;\n    }\n    public boolean canSeeBlock(BlockPos pos) {\n        double diffX = pos.getX() + 0.5 - mc.player.getCameraPosVec(mc.getTickDelta()).x;\n        double diffY = pos.getY() + 0.5 - mc.player.getCameraPosVec(mc.getTickDelta()).y;\n        double diffZ = pos.getZ() + 0.5 - mc.player.getCameraPosVec(mc.getTickDelta()).z;\n\n        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);\n\n        float yaw = mc.player.yaw + MathHelper.wrapDegrees((float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90 - mc.player.yaw);\n        float pitch = mc.player.pitch + MathHelper.wrapDegrees((float) -Math.toDegrees(Math.atan2(diffY, diffXZ)) - mc.player.pitch);\n\n        Vec3d rotation = new Vec3d(\n                (double) (MathHelper.sin(-yaw * 0.017453292F) * MathHelper.cos(pitch * 0.017453292F)),\n                (double) (-MathHelper.sin(pitch * 0.017453292F)),\n                (double) (MathHelper.cos(-yaw * 0.017453292F) * MathHelper.cos(pitch * 0.017453292F)));\n\n        Vec3d rayVec = mc.player.getCameraPosVec(mc.getTickDelta()).add(rotation.x * 6, rotation.y * 6, rotation.z * 6);\n        return mc.world.raycast(new RaycastContext(mc.player.getCameraPosVec(mc.getTickDelta()),\n                rayVec, RaycastContext.ShapeType.OUTLINE, RaycastContext.FluidHandling.NONE, mc.player))\n                .getBlockPos().equals(pos);\n    }\n\n    @EventHandler\n    private Listener<EventTick> eventTickListener = new Listener<>(event -> {\n        List<BlockPos> blocks = getBlocks();\n        double range = 6;\n\n        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);\n\n        if (autoEat.isEating()) return;\n\n        if (blocks.isEmpty()) return;\n\n        for (BlockPos pos : blocks) {\n            if (!canSeeBlock(pos) || (mc.world.getBlockState(pos).getBlock() != Blocks.NETHERRACK && mc.world.getBlockState(pos).getBlock() != Blocks.SPONGE && mc.world.getBlockState(pos).getBlock() != Blocks.WET_SPONGE))\n                continue;\n\n            Vec3d vec = Vec3d.of(pos).add(0.5, 0.5, 0.5);\n\n            if (mc.player.getPos().distanceTo(vec) > range + 0.5) continue;\n\n            Direction dir = null;\n            double dist = Double.MAX_VALUE;\n            for (Direction d : Direction.values()) {\n                double dist2 = mc.player.getPos().distanceTo(Vec3d.of(pos.offset(d)).add(0.5, 0.5, 0.5));\n                if (dist2 > range || mc.world.getBlockState(pos.offset(d)).getBlock() != Blocks.AIR || dist2 > dist)\n                    continue;\n                dist = dist2;\n                dir = d;\n            }\n\n            if (dir == null) continue;\n\n            mc.interactionManager.attackBlock(pos, dir);\n        }\n    });\n\n    public List<BlockPos> getCube() {\n        List<BlockPos> cubeBlocks = new ArrayList<>();\n        BlockPos playerPos = new BlockPos(Math.floor(mc.player.getX()), Math.floor(mc.player.getY()), Math.floor(mc.player.getZ()));\n        if (lastPlayerPos == null || !lastPlayerPos.equals(playerPos)) {\n            switch (EntityUtils.GetFacing()) {\n                case East:\n                    for (int i = 0; i < 7; ++i) {\n                        cubeBlocks.add(playerPos.east());\n                        cubeBlocks.add(playerPos.east().up());\n                        cubeBlocks.add(playerPos.east().up().up());\n                        cubeBlocks.add(playerPos.east().north());\n                        cubeBlocks.add(playerPos.east().north().up());\n                        cubeBlocks.add(playerPos.east().north().up().up());\n                        cubeBlocks.add(playerPos.east().south());\n                        cubeBlocks.add(playerPos.east().south().up());\n                        cubeBlocks.add(playerPos.east().south().up().up());\n\n                        playerPos = new BlockPos(playerPos).east();\n                    }\n                    break;\n                case North:\n                    for (int i = 0; i < 7; ++i) {\n                        cubeBlocks.add(playerPos.north());\n                        cubeBlocks.add(playerPos.north().up());\n                        cubeBlocks.add(playerPos.north().up().up());\n                        cubeBlocks.add(playerPos.north().east());\n                        cubeBlocks.add(playerPos.north().east().up());\n                        cubeBlocks.add(playerPos.north().east().up().up());\n                        cubeBlocks.add(playerPos.north().west());\n                        cubeBlocks.add(playerPos.north().west().up());\n                        cubeBlocks.add(playerPos.north().west().up().up());\n\n                        playerPos = new BlockPos(playerPos).north();\n                    }\n                    break;\n                case South:\n                    for (int i = 0; i < 7; ++i) {\n                        cubeBlocks.add(playerPos.south());\n                        cubeBlocks.add(playerPos.south().up());\n                        cubeBlocks.add(playerPos.south().up().up());\n                        cubeBlocks.add(playerPos.south().west());\n                        cubeBlocks.add(playerPos.south().west().up());\n                        cubeBlocks.add(playerPos.south().west().up().up());\n                        cubeBlocks.add(playerPos.south().east());\n                        cubeBlocks.add(playerPos.south().east().up());\n                        cubeBlocks.add(playerPos.south().east().up().up());\n\n                        playerPos = new BlockPos(playerPos).south();\n                    }\n                    break;\n                case West:\n                    for (int i = 0; i < 7; ++i) {\n                        cubeBlocks.add(playerPos.west());\n                        cubeBlocks.add(playerPos.west().up());\n                        cubeBlocks.add(playerPos.west().up().up());\n                        cubeBlocks.add(playerPos.west().south());\n                        cubeBlocks.add(playerPos.west().south().up());\n                        cubeBlocks.add(playerPos.west().south().up().up());\n                        cubeBlocks.add(playerPos.west().north());\n                        cubeBlocks.add(playerPos.west().north().up());\n                        cubeBlocks.add(playerPos.west().north().up().up());\n\n\n                        playerPos = new BlockPos(playerPos).west();\n                    }\n                    break;\n            }\n        }\n        return cubeBlocks;\n    }\n\n\n    public List<BlockPos> get2x3() {\n        List<BlockPos> cubeBlocks = new ArrayList<>();\n        BlockPos playerPos = new BlockPos(Math.floor(mc.player.getX()), Math.floor(mc.player.getY()), Math.floor(mc.player.getZ()));\n        if (lastPlayerPos == null || !lastPlayerPos.equals(playerPos)) {\n            switch (EntityUtils.GetFacing()) {\n                case East:\n                    for (int i = 0; i < 4; ++i) {\n                        cubeBlocks.add(playerPos.east());\n                        cubeBlocks.add(playerPos.east().up());\n                        cubeBlocks.add(playerPos.east().up().up());\n                        cubeBlocks.add(playerPos.east().north());\n                        cubeBlocks.add(playerPos.east().north().up());\n                        cubeBlocks.add(playerPos.east().north().up().up());\n                        playerPos = new BlockPos(playerPos).east();\n                    }\n                    break;\n                case North:\n                    for (int i = 0; i < 4; ++i) {\n                        cubeBlocks.add(playerPos.north());\n                        cubeBlocks.add(playerPos.north().up());\n                        cubeBlocks.add(playerPos.north().up().up());\n                        cubeBlocks.add(playerPos.north().east());\n                        cubeBlocks.add(playerPos.north().east().up());\n                        cubeBlocks.add(playerPos.north().east().up().up());\n                        playerPos = new BlockPos(playerPos).north();\n                    }\n                    break;\n                case South:\n                    for (int i = 0; i < 4; ++i) {\n                        cubeBlocks.add(playerPos.south());\n                        cubeBlocks.add(playerPos.south().up());\n                        cubeBlocks.add(playerPos.south().up().up());\n                        cubeBlocks.add(playerPos.south().west());\n                        cubeBlocks.add(playerPos.south().west().up());\n                        cubeBlocks.add(playerPos.south().west().up().up());\n                        playerPos = new BlockPos(playerPos).south();\n                    }\n                    break;\n                case West:\n                    for (int i = 0; i < 4; ++i) {\n                        cubeBlocks.add(playerPos.west());\n                        cubeBlocks.add(playerPos.west().up());\n                        cubeBlocks.add(playerPos.west().up().up());\n                        cubeBlocks.add(playerPos.west().south());\n                        cubeBlocks.add(playerPos.west().south().up());\n                        cubeBlocks.add(playerPos.west().south().up().up());\n                        playerPos = new BlockPos(playerPos).west();\n                    }\n                    break;\n            }\n        }\n        return cubeBlocks;\n    }\n\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/OffAxisAlarm.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.utils.EntityUtils;\nimport chiquita.mineclient.utils.Logger;\nimport chiquita.mineclient.utils.Timer;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.client.sound.PositionedSoundInstance;\nimport net.minecraft.sound.SoundEvents;\nimport org.lwjgl.glfw.GLFW;\n\npublic class OffAxisAlarm extends Module {\n    public OffAxisAlarm() {\n        super(\"OffAxisAlarm\", Category.world, false, GLFW.GLFW_KEY_Y);\n    }\n\n    Timer chatTimer = new Timer();\n    Timer timer = new Timer();\n\n    @EventHandler\n    private Listener<EventTick> eventTickListener = new Listener<>(event -> {\n        if (timer.passed(1000)) {\n            switch (EntityUtils.determineHighway()) {\n                case XP:\n                    if (!(mc.player.getZ() > 0 && mc.player.getZ() < 1)) {\n                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));\n                        if (chatTimer.passed(5000)) {\n                            Logger.chatMessage(\"You're off axis!\");\n                            chatTimer.reset();\n                        }\n                        timer.reset();\n                    }\n                    break;\n                case XN:\n                    if (!(mc.player.getZ() < 0 && mc.player.getZ() > -1)) {\n                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));\n                        if (chatTimer.passed(5000)) {\n                            Logger.chatMessage(\"You're off axis!\");\n                            chatTimer.reset();\n                        }\n                        timer.reset();\n                    }\n                    break;\n                case ZP:\n                    if (!(mc.player.getX() < 0 && mc.player.getX() > -1)) {\n                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));\n                        if (chatTimer.passed(5000)) {\n                            Logger.chatMessage(\"You're off axis!\");\n                            chatTimer.reset();\n                        }\n                        timer.reset();\n                    }\n                    break;\n                case ZN:\n                    if (!(mc.player.getX() > 0 && mc.player.getX() < 1)) {\n                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));\n                        if (chatTimer.passed(5000)) {\n                            Logger.chatMessage(\"You're off axis!\");\n                            chatTimer.reset();\n                        }\n                        timer.reset();\n                    }\n                    break;\n            }\n        }\n    });\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/Yaw.java",
    "content": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.module.Module;\nimport chiquita.mineclient.settings.Value;\nimport chiquita.mineclient.utils.EntityUtils;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.client.util.InputUtil;\nimport org.lwjgl.glfw.GLFW;\n\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Yaw extends Module {\n\n    private boolean lDown = false;\n    private boolean rDown = false;\n\n    public final Value<Boolean> autoAlign = new Value<>(\"AutoAlign\", new String[]{\"Yaw\"}, \"Automatically determines highway and snaps yaw\", true);\n    public final Value<Boolean> useYaw = new Value<>(\"UseYaw\", new String[]{\"UseYaw\"}, \"Snaps yaw based on stuff and stuff\", false);\n    public final Value<Integer> yaw = new Value<>(\"Yaw\", new String[]{\"Yaw\"}, \"What angle to snap to, 1 = 45, 2 = 30, 3 = 15, 4 = 90\", 1, 4, 1, 1, 0);\n\n    public List<Value> values = Arrays.asList(\n            autoAlign,\n            useYaw,\n            yaw\n    );\n\n    public Yaw() {\n        super(\"Yaw\", Category.player, true, GLFW.GLFW_KEY_Y);\n        super.settings = values;\n    }\n\n    @EventHandler\n    private Listener<EventTick> eventTickListener = new Listener<>(event -> {\n        /* yes looks like a good way to do it to me */\n        if (useYaw.getValue() && mc.currentScreen == null) {\n            int ymode = yaw.getValue() - 1;\n\n            if (InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT) && !lDown) {\n                mc.player.yaw -= ymode == 0 ? 45 : ymode == 1 ? 30 : ymode == 2 ? 15 : 90;\n                lDown = true;\n            } else if (!InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT)) {\n                lDown = false;\n            }\n\n            if (InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_RIGHT) && !rDown) {\n                mc.player.yaw += ymode == 0 ? 45 : ymode == 1 ? 30 : ymode == 2 ? 15 : 90;\n                rDown = true;\n            } else if (!InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_RIGHT)) {\n                rDown = false;\n            }\n            snap();\n        }\n        else if (autoAlign.getValue()) {\n            switch (EntityUtils.determineHighway()) {\n                case XP: mc.player.yaw = -90; break;\n                case XPZP: mc.player.yaw = -45; break;\n                case XPZN: mc.player.yaw = -135; break;\n                case XN: mc.player.yaw = 90; break;\n                case XNZP: mc.player.yaw = 45; break;\n                case XNZN: mc.player.yaw = 135; break;\n                case ZP: mc.player.yaw = 0; break;\n                case ZN: mc.player.yaw = 180; break;\n            }\n        }\n\n    });\n\n    public void snap() {\n        // quic maff\n        if (useYaw.getValue()) {\n            int mode = yaw.getValue() - 1;\n            int interval = mode == 0 ? 45 : mode == 1 ? 30 : mode == 2 ? 15 : 90;\n            int rot = (int) mc.player.yaw + (Math.floorMod((int) mc.player.yaw, interval) < interval / 2 ?\n                    -Math.floorMod((int) mc.player.yaw, interval) : interval - Math.floorMod((int) mc.player.yaw, interval));\n\n            mc.player.yaw = rot;\n        }\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/settings/Value.java",
    "content": "package chiquita.mineclient.settings;\n\nimport chiquita.mineclient.module.Module;\n\npublic class Value<T>\n{\n\n    private String name;\n    private String[] alias;\n    private T[] modes;\n    private String desc;\n    private Module mod;\n    public ValueListeners listener;\n\n    private T value;\n\n    private T min;\n    private T max;\n    private T inc;\n    private int decimals;\n\n    public Value(String name, String[] alias, String desc)\n    {\n        this.name = name;\n        this.alias = alias;\n        this.desc = desc;\n    }\n\n    public Value(String name, String[] alias, String desc, T value)\n    {\n        this(name, alias, desc);\n        this.value = value;\n    }\n\n    public Value(String name, String[] alias, String desc, T value, T min, T max, T inc, int decimals)\n    {\n        this(name, alias, desc, value);\n        this.min = min;\n        this.max = max;\n        this.inc = inc;\n        this.decimals = decimals;\n    }\n\n    public Value(String name, String[] alias, String desc, T[] modes) {\n        this(name, alias, desc);\n        this.modes = modes;\n    }\n\n    public <T> T clamp(T value, T min, T max)\n    {\n        return ((Comparable) value).compareTo(min) < 0 ? min : (((Comparable) value).compareTo(max) > 0 ? max : value);\n    }\n\n    public T getValue()\n    {\n        return this.value;\n    }\n\n    public int getDecimals() {\n        return this.decimals;\n    }\n\n    public void setValue(T value)\n    {\n        if (min != null && max != null) {\n            final Number val = (Number) value;\n            final Number min = (Number) this.min;\n            final Number max = (Number) this.max;\n            this.value = (T) this.clamp(val, min, max);\n        }\n        else {\n            this.value = value;\n        }\n\n        if (mod != null)\n            mod.signalValueChange(this);\n        if (listener != null)\n            listener.onValueChange(this);\n    }\n\n    public String getNextEnumValue(boolean reverse)\n    {\n        final Enum currentEnum = (Enum) this.getValue();\n\n        int i = 0;\n\n        for (; i < this.value.getClass().getEnumConstants().length; i++)\n        {\n            final Enum e = (Enum) this.value.getClass().getEnumConstants()[i];\n            if (e.name().equalsIgnoreCase(currentEnum.name()))\n            {\n                break;\n            }\n        }\n\n        return this.value.getClass()\n                .getEnumConstants()[(reverse ? (i != 0 ? i - 1 : value.getClass().getEnumConstants().length - 1)\n                : i + 1) % value.getClass().getEnumConstants().length].toString();\n    }\n\n    public int getEnum(String input)\n    {\n        for (int i = 0; i < this.value.getClass().getEnumConstants().length; i++)\n        {\n            final Enum e = (Enum) this.value.getClass().getEnumConstants()[i];\n            if (e.name().equalsIgnoreCase(input))\n            {\n                return i;\n            }\n        }\n        return -1;\n    }\n\n    public Enum getEnumReal(String input)\n    {\n        for (int i = 0; i < this.value.getClass().getEnumConstants().length; i++)\n        {\n            final Enum e = (Enum) this.value.getClass().getEnumConstants()[i];\n            if (e.name().equalsIgnoreCase(input))\n            {\n                return e;\n            }\n        }\n        return null;\n    }\n\n    public void setEnumValue(String value)\n    {\n        for (Enum e : ((Enum) this.value).getClass().getEnumConstants())\n        {\n            if (e.name().equalsIgnoreCase(value))\n            {\n                setValue((T)e);\n                break;\n            }\n        }\n\n        if (mod != null)\n            mod.signalEnumChange();\n    }\n\n    public T getMin()\n    {\n        return min;\n    }\n\n    public void setMin(T min)\n    {\n        this.min = min;\n    }\n\n    public T getMax()\n    {\n        return max;\n    }\n\n    public void setMax(T max)\n    {\n        this.max = max;\n    }\n\n    public T getInc()\n    {\n        return inc;\n    }\n\n    public void setInc(T inc)\n    {\n        this.inc = inc;\n    }\n\n    public String getName()\n    {\n        return name;\n    }\n\n    public void setName(String name)\n    {\n        this.name = name;\n    }\n\n    public String[] getAlias()\n    {\n        return alias;\n    }\n\n    public void setAlias(String[] alias)\n    {\n        this.alias = alias;\n    }\n\n    public T[] getList() {\n        return modes;\n    }\n\n    public String getDesc()\n    {\n        return desc;\n    }\n\n    public void setDesc(String desc)\n    {\n        this.desc = desc;\n    }\n\n    public void SetListener(ValueListeners valueListeners)\n    {\n        listener = valueListeners;\n    }\n\n    public void initializeMod(Module mod)\n    {\n        this.mod = mod;\n    }\n\n    public void setForcedValue(T value)\n    {\n        if (min != null && max != null)\n        {\n            final Number val = (Number) value;\n            final Number min = (Number) this.min;\n            final Number max = (Number) this.max;\n            this.value = (T) val;\n            // this.value = (T) this.clamp(val, min, max);\n        }\n        else\n        {\n            this.value = value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/settings/ValueListeners.java",
    "content": "package chiquita.mineclient.settings;\n\npublic interface ValueListeners\n{\n    public void onValueChange(final Value value);\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/utils/EntityUtils.java",
    "content": "package chiquita.mineclient.utils;\n\nimport net.minecraft.block.Block;\nimport net.minecraft.block.Blocks;\nimport net.minecraft.client.MinecraftClient;\nimport net.minecraft.entity.Entity;\nimport net.minecraft.entity.LivingEntity;\nimport net.minecraft.entity.mob.AmbientEntity;\nimport net.minecraft.entity.mob.WaterCreatureEntity;\nimport net.minecraft.entity.passive.GolemEntity;\nimport net.minecraft.entity.passive.PassiveEntity;\nimport net.minecraft.entity.player.PlayerEntity;\nimport net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;\nimport net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;\nimport net.minecraft.util.Hand;\nimport net.minecraft.util.Pair;\nimport net.minecraft.util.hit.BlockHitResult;\nimport net.minecraft.util.math.*;\nimport net.minecraft.world.World;\n\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class EntityUtils {\n\n    static MinecraftClient mc = MinecraftClient.getInstance();\n\n    public static final List<Block> NONSOLID_BLOCKS = Arrays.asList(\n            Blocks.AIR, Blocks.LAVA, Blocks.WATER, Blocks.GRASS,\n            Blocks.VINE, Blocks.SEAGRASS, Blocks.TALL_SEAGRASS,\n            Blocks.SNOW, Blocks.TALL_GRASS, Blocks.FIRE, Blocks.VOID_AIR);\n\n    public static final List<Block> RIGHTCLICKABLE_BLOCKS = Arrays.asList(\n            Blocks.CHEST, Blocks.TRAPPED_CHEST, Blocks.ENDER_CHEST,\n            Blocks.WHITE_SHULKER_BOX, Blocks.ORANGE_SHULKER_BOX, Blocks.MAGENTA_SHULKER_BOX,\n            Blocks.LIGHT_BLUE_SHULKER_BOX, Blocks.YELLOW_SHULKER_BOX, Blocks.LIME_SHULKER_BOX,\n            Blocks.PINK_SHULKER_BOX, Blocks.GRAY_SHULKER_BOX, Blocks.LIGHT_GRAY_SHULKER_BOX,\n            Blocks.CYAN_SHULKER_BOX, Blocks.PURPLE_SHULKER_BOX, Blocks.BLUE_SHULKER_BOX,\n            Blocks.BROWN_SHULKER_BOX, Blocks.GREEN_SHULKER_BOX, Blocks.RED_SHULKER_BOX,\n            Blocks.BLACK_SHULKER_BOX, Blocks.ANVIL,\n            Blocks.OAK_BUTTON, Blocks.ACACIA_BUTTON, Blocks.BIRCH_BUTTON, Blocks.DARK_OAK_BUTTON,\n            Blocks.JUNGLE_BUTTON, Blocks.SPRUCE_BUTTON, Blocks.STONE_BUTTON, Blocks.COMPARATOR,\n            Blocks.REPEATER, Blocks.OAK_FENCE_GATE, Blocks.SPRUCE_FENCE_GATE, Blocks.BIRCH_FENCE_GATE,\n            Blocks.JUNGLE_FENCE_GATE, Blocks.DARK_OAK_FENCE_GATE, Blocks.ACACIA_FENCE_GATE,\n            Blocks.BREWING_STAND, Blocks.DISPENSER, Blocks.DROPPER,\n            Blocks.LEVER, Blocks.NOTE_BLOCK, Blocks.JUKEBOX,\n            Blocks.BEACON, Blocks.BLACK_BED, Blocks.BLUE_BED, Blocks.BROWN_BED, Blocks.CYAN_BED, Blocks.GRAY_BED,\n            Blocks.GREEN_BED, Blocks.LIGHT_BLUE_BED, Blocks.LIGHT_GRAY_BED, Blocks.LIME_BED, Blocks.MAGENTA_BED,\n            Blocks.ORANGE_BED, Blocks.PINK_BED, Blocks.PURPLE_BED, Blocks.RED_BED, Blocks.WHITE_BED,\n            Blocks.YELLOW_BED, Blocks.FURNACE, Blocks.OAK_DOOR, Blocks.SPRUCE_DOOR,\n            Blocks.BIRCH_DOOR, Blocks.JUNGLE_DOOR, Blocks.ACACIA_DOOR,\n            Blocks.DARK_OAK_DOOR, Blocks.CAKE, Blocks.ENCHANTING_TABLE,\n            Blocks.DRAGON_EGG, Blocks.HOPPER, Blocks.REPEATING_COMMAND_BLOCK,\n            Blocks.COMMAND_BLOCK, Blocks.CHAIN_COMMAND_BLOCK, Blocks.CRAFTING_TABLE,\n            Blocks.ACACIA_TRAPDOOR, Blocks.BIRCH_TRAPDOOR, Blocks.DARK_OAK_TRAPDOOR, Blocks.JUNGLE_TRAPDOOR,\n            Blocks.OAK_TRAPDOOR, Blocks.SPRUCE_TRAPDOOR, Blocks.CAKE, Blocks.ACACIA_SIGN, Blocks.ACACIA_WALL_SIGN,\n            Blocks.BIRCH_SIGN, Blocks.BIRCH_WALL_SIGN, Blocks.DARK_OAK_SIGN, Blocks.DARK_OAK_WALL_SIGN,\n            Blocks.JUNGLE_SIGN, Blocks.JUNGLE_WALL_SIGN, Blocks.OAK_SIGN, Blocks.OAK_WALL_SIGN,\n            Blocks.SPRUCE_SIGN, Blocks.SPRUCE_WALL_SIGN);\n\n    public static boolean isBlockEmpty(BlockPos pos) {\n        if (!NONSOLID_BLOCKS.contains(mc.world.getBlockState(pos).getBlock()))\n            return false;\n\n        Box box = new Box(pos);\n        for (Entity e : mc.world.getEntities()) {\n            if (e instanceof LivingEntity && box.intersects(e.getBoundingBox()))\n                return false;\n        }\n\n        return true;\n    }\n\n\n    public static boolean placeBlock(BlockPos pos, int slot, boolean rotate, boolean rotateBack) {\n        if (pos.getY() < 0 || pos.getY() > 255 || !isBlockEmpty(pos))\n            return false;\n\n        if (slot != mc.player.inventory.selectedSlot && slot >= 0 && slot <= 8)\n            mc.player.inventory.selectedSlot = slot;\n\n        for (Direction d : Direction.values()) {\n            if ((d == Direction.DOWN && pos.getY() == 0) || (d == Direction.UP && pos.getY() == 255))\n                continue;\n\n            Block neighborBlock = mc.world.getBlockState(pos.offset(d)).getBlock();\n\n            Vec3d vec = new Vec3d(pos.getX() + 0.5 + d.getOffsetX() * 0.5,\n                    pos.getY() + 0.5 + d.getOffsetY() * 0.5,\n                    pos.getZ() + 0.5 + d.getOffsetZ() * 0.5);\n\n            if (NONSOLID_BLOCKS.contains(neighborBlock)\n                    || mc.player.getPos().add(0, mc.player.getEyeHeight(mc.player.getPose()), 0).distanceTo(vec) > 4.55)\n                continue;\n\n            float[] rot = new float[] { mc.player.yaw, mc.player.pitch };\n\n            if (rotate)\n                facePosPacket(vec.x, vec.y, vec.z);\n            if (RIGHTCLICKABLE_BLOCKS.contains(neighborBlock))\n                mc.player.networkHandler.sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.PRESS_SHIFT_KEY));\n\n            mc.interactionManager.interactBlock(\n                    mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), d.getOpposite(), pos.offset(d), false));\n\n            if (RIGHTCLICKABLE_BLOCKS.contains(neighborBlock))\n                mc.player.networkHandler.sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.RELEASE_SHIFT_KEY));\n            if (rotateBack)\n                mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookOnly(rot[0], rot[1], mc.player.isOnGround()));\n            return true;\n        }\n        return false;\n    }\n\n    public enum FacingDirection\n    {\n        North,\n        South,\n        East,\n        West,\n        SouthEast,\n        SouthWest,\n        NorthWest,\n        NorthEast,\n    }\n\n    public static FacingDirection GetFacing()\n    {\n        switch (MathHelper.floor((double) (mc.player.yaw * 8.0F / 360.0F) + 0.5D) & 7)\n        {\n            case 0:\n            case 1:\n                return FacingDirection.South;\n            case 2:\n            case 3:\n                return FacingDirection.West;\n            case 4:\n            case 5:\n                return FacingDirection.North;\n            case 6:\n            case 7:\n                return FacingDirection.East;\n            case 8:\n        }\n        return FacingDirection.North;\n    }\n\n    public enum highways {\n        XP, XN, ZP, ZN, XPZP, XNZP, XPZN, XNZN\n    }\n\n    public static highways determineHighway() {\n        MinecraftClient mc = MinecraftClient.getInstance();\n        PlayerEntity player = mc.player;\n        highways highwayNum = highways.XP;\n        if (player.getX() >= 100) {\n            if (player.getZ() >= -5 && player.getZ() <= 5) {\n                //+X highway\n                highwayNum = highways.XP;\n            }\n            else if (player.getZ() - player.getX() >= -50 && player.getZ() - player.getX() <= 50) {\n                //+X+Z highway\n                highwayNum = highways.XPZP;\n            }\n            else if (player.getZ() + player.getX() >= -50 && player.getZ() + player.getX() <= 50) {\n                //+X-Z highway\n                highwayNum = highways.XPZN;\n            }\n        }\n        else if (player.getX() <= -100) {\n            if (player.getZ() >= -5 && player.getZ() <= 5) {\n                //-X highway\n                highwayNum = highways.XN;\n            }\n            else if (player.getX() + player.getZ() >= -50 && player.getX() + player.getZ() <= 50) {\n                //-X+Z highway\n                highwayNum = highways.XNZP;\n            }\n            else if (player.getZ() <= player.getX() + 100 && player.getZ() >= player.getX() - 100) {\n                //-X-Z highway\n                highwayNum = highways.XNZN;\n            }\n        }\n        else if (player.getZ() >= 100) {\n            if (player.getX() >= -5 && player.getX() <= 5) {\n                //+Z highway\n                highwayNum = highways.ZP;\n            }\n        }\n        else if (player.getZ() <= -100) {\n            if (player.getX() >= -5 && player.getX() <= 5) {\n                //-Z highway\n                highwayNum = highways.ZN;\n            }\n        }\n        return highwayNum;\n    }\n\n    public static boolean isAnimal(Entity e) {\n        return e instanceof PassiveEntity || e instanceof AmbientEntity || e instanceof WaterCreatureEntity || e instanceof GolemEntity;\n    }\n\n    public static void facePosAuto(double x, double y, double z, boolean sr) {\n        if (sr) {\n            facePosPacket(x, y, z);\n        }\n        else {\n            facePos(x, y, z);\n        }\n    }\n\n    public static void facePosPacket(double x, double y, double z) {\n        double diffX = x - mc.player.getX();\n        double diffY = y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));\n        double diffZ = z - mc.player.getZ();\n        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);\n        float yaw = (float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90F;\n        float pitch = (float) -Math.toDegrees(Math.atan2(diffY, diffXZ));\n        mc.player.networkHandler.sendPacket(\n                new PlayerMoveC2SPacket.LookOnly(\n                        mc.player.yaw + MathHelper.wrapDegrees(yaw - mc.player.yaw),\n                        mc.player.pitch + MathHelper.wrapDegrees(pitch - mc.player.pitch), mc.player.isOnGround()));\n    }\n\n    public static int getPitchNeeded(double x, double y, double z) {\n        double diffX = x - mc.player.getX();\n        double diffY = y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));\n        double diffZ = z - mc.player.getZ();\n        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);\n        float pitch = (float) -Math.toDegrees(Math.atan2(diffY, diffXZ));\n        return (int) (mc.player.pitch + MathHelper.wrapDegrees(pitch - mc.player.pitch));\n    }\n\n    public static int getYawNeeded(double x, double z) {\n        double diffX = x - mc.player.getX();\n        double diffZ = z - mc.player.getZ();\n        float yaw = (float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90F;\n        return (int) (mc.player.yaw + MathHelper.wrapDegrees(yaw - mc.player.yaw));\n    }\n\n    public static void facePos(double x, double y, double z) {\n        double diffX = x - mc.player.getX();\n        double diffY = y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));\n        double diffZ = z - mc.player.getZ();\n\n        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);\n\n        float yaw = (float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90F;\n        float pitch = (float) -Math.toDegrees(Math.atan2(diffY, diffXZ));\n\n        mc.player.yaw += MathHelper.wrapDegrees(yaw - mc.player.yaw);\n        mc.player.pitch += MathHelper.wrapDegrees(pitch - mc.player.pitch);\n    }\n\n    public static Vec3d prevPos() {\n        return new Vec3d(mc.player.prevX, mc.player.prevY, mc.player.prevZ);\n    }\n\n    public static Vec3d getInterpPos(float tickDelta) {\n        Vec3d prev = prevPos();\n        return addVec3d(prev, minusVec3d(mc.player.getPos(), prev).multiply(tickDelta));\n    }\n\n    public static Vec3d minusVec3d(Vec3d one, Vec3d two) {\n        return addVec3d(one, two.negate());\n    }\n\n    public static Vec3d addVec3d(Vec3d one, Vec3d two) {\n        return new Vec3d(one.x + two.x, one.y + two.y, one.z + two.z);\n    }\n\n    public static Vec3d addVec3d(Vec3d one, double blah) {\n        return new Vec3d(one.x + blah, one.y + blah, one.z + blah);\n    }\n\n    public static Vec3d vec3dUp(Vec3d one, double blah) {\n        return new Vec3d(one.x, one.y + blah, one.z);\n    }\n\n    public static Vec3d divVec3d(Vec3d one, double blah) {\n        return new Vec3d(one.x / blah, one.y / blah, one.z / blah);\n    }\n\n    public static Pair<BlockPos, Direction> getIrreplaceableNeighbor(BlockPos blockPos, World world) {\n        if (blockPos == null) return null;\n        for (Direction side : Direction.values()) {\n            BlockPos neighbor = blockPos.offset(side);\n            if (world.getBlockState(neighbor) != null) {\n                if (world.getBlockState(neighbor).getMaterial() != null) {\n                    if (world.getBlockState(neighbor).getMaterial().isReplaceable()) return new Pair<>(neighbor, side.getOpposite());\n                }\n            }\n        }\n        return null;\n    }\n\n    public static Vec3d asVec(BlockPos blockPos) {\n        return new Vec3d((double) blockPos.getX(), (double) blockPos.getY(), (double) blockPos.getZ());\n    }\n\n    public static Vec3d asVec(Vec3i vec3i) {\n        return new Vec3d((double) vec3i.getX(), (double) vec3i.getY(), (double) vec3i.getZ());\n    }\n\n    public static Vec3d getInterpolatedAmount(Entity entity, double x, double y, double z) {\n        return entity.getPos().subtract(entity.prevX, entity.prevY, entity.prevZ).multiply(x, y, z);\n    }\n    public static Vec3d getInterpolatedAmount(Entity entity, double ticks) {\n        return getInterpolatedAmount(entity, ticks, ticks, ticks);\n    }\n    public static BlockPos toBlockPos(Vec3d vec3d) {\n        return new BlockPos(vec3d.x, vec3d.y, vec3d.z);\n    }\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/utils/Logger.java",
    "content": "package chiquita.mineclient.utils;\n\nimport net.minecraft.client.MinecraftClient;\nimport net.minecraft.text.LiteralText;\nimport net.minecraft.util.Formatting;\n\nimport javax.imageio.ImageIO;\nimport java.awt.*;\nimport java.io.IOException;\n\npublic class Logger {\n    public static void chatMessage(String s) {\n        try {\n            MinecraftClient.getInstance().inGameHud.getChatHud()\n                    .addMessage(new LiteralText(Text(Formatting.DARK_RED) + \"\" + s));\n        } catch (Exception e) {\n            System.out.println(\"[MineClient] INFO: \" + s);\n        }\n    }\n\n    private static String Text(Formatting color) {\n        return color + \"[MineClient] \\u00A7f\";\n    }\n\n}\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/utils/Timer.java",
    "content": "package chiquita.mineclient.utils;\n\npublic final class Timer\n{\n    private long time;\n\n    public Timer()\n    {\n        time = -1;\n    }\n\n    public boolean passed(double ms)\n    {\n        return System.currentTimeMillis() - this.time >= ms;\n    }\n\n    public void reset()\n    {\n        this.time = System.currentTimeMillis();\n    }\n\n    public void resetTimeSkipTo(long p_MS)\n    {\n        this.time = System.currentTimeMillis() + p_MS;\n    }\n\n    public long getTime()\n    {\n        return time;\n    }\n\n    public void setTime(long time)\n    {\n        this.time = time;\n    }\n}"
  },
  {
    "path": "src/main/resources/fabric.mod.json",
    "content": "{\n  \"schemaVersion\": 1,\n  \"id\": \"mineclient\",\n  \"version\": \"${version}\",\n  \"name\": \"MineClient\",\n  \"description\": \"Simple highway mining client\",\n  \"authors\": [\"ChiquitaV2#3814\"],\n  \"contact\": {},\n  \"license\": \"MIT\",\n  \"environment\": \"*\",\n  \"entrypoints\": {\n    \"main\": [\n      \"chiquita.mineclient.Mineclient\"\n    ]\n  },\n  \"mixins\": [\n    \"mineclient.mixins.json\"\n  ]\n}\n"
  },
  {
    "path": "src/main/resources/mineclient.mixins.json",
    "content": "{\n  \"required\": true,\n  \"minVersion\": \"0.8\",\n  \"package\": \"chiquita.mineclient.mixin\",\n  \"compatibilityLevel\": \"JAVA_8\",\n  \"mixins\": [\n  ],\n  \"client\": [\n    \"MixinKeyboard\",\n    \"MixinClientPlayerEntity\",\n    \"IKeyBinding\"\n  ],\n  \"injectors\": {\n    \"defaultRequire\": 0\n  }\n}\n"
  }
]