Full Code of ChiquitaV2/MineClient for AI

master 2cb7d42d3035 cached
35 files
82.1 KB
20.8k tokens
146 symbols
1 requests
Download .txt
Repository: ChiquitaV2/MineClient
Branch: master
Commit: 2cb7d42d3035
Files: 35
Total size: 82.1 KB

Directory structure:
gitextract_j6uquiz7/

├── .gitignore
├── LICENSE
├── README.md
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src/
    └── main/
        ├── java/
        │   └── chiquita/
        │       └── mineclient/
        │           ├── Mineclient.java
        │           ├── event/
        │           │   ├── Event.java
        │           │   ├── EventMove.java
        │           │   ├── EventTick.java
        │           │   └── KeyPressEvent.java
        │           ├── mixin/
        │           │   ├── IKeyBinding.java
        │           │   ├── MixinClientPlayerEntity.java
        │           │   └── MixinKeyboard.java
        │           ├── module/
        │           │   ├── Module.java
        │           │   ├── ModuleManager.java
        │           │   └── modules/
        │           │       ├── AutoEat.java
        │           │       ├── AutoSwitcher.java
        │           │       ├── AutoTunnel.java
        │           │       ├── AutoWalk.java
        │           │       ├── HotbarCache.java
        │           │       ├── Nuker.java
        │           │       ├── OffAxisAlarm.java
        │           │       └── Yaw.java
        │           ├── settings/
        │           │   ├── Value.java
        │           │   └── ValueListeners.java
        │           └── utils/
        │               ├── EntityUtils.java
        │               ├── Logger.java
        │               └── Timer.java
        └── resources/
            ├── fabric.mod.json
            └── mineclient.mixins.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws

# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Cache of project
.gradletasknamecache

**/build/

# Common working directory
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2021 

Permission 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:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE 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.


================================================
FILE: README.md
================================================
# MineClient 1.16.4 
[![discord](https://img.shields.io/badge/Discord-h8EQyuYTK7-9080c2)](https://discord.gg/h8EQyuYTK7)

This is fabric 1.16 mod, for highway digging on endcrystal. To use just get on a highway axis and press Y.

## Installation:

Download [fabric for minecraft 1.16.4](https://fabricmc.net/use/)  
Download the latest compiled version of MineClient for your Minecraft version [from the releases section](https://github.com/ChiquitaV2/MineClient/releases)  



================================================
FILE: build.gradle
================================================
plugins {
    id 'fabric-loom' version '0.6-SNAPSHOT'
    id 'maven-publish'
}
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}


sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

dependencies {
    //to change the versions see the gradle.properties file
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
    modImplementation "net.fabricmc.fabric-api:fabric-api:0.29.3+1.16"
    modImplementation 'com.github.ZeroMemes:Alpine:1.9'
    include 'com.github.ZeroMemes:Alpine:1.9'
    include 'net.jodah:typetools:0.4.4'

    // Fabric API. This is technically optional, but you probably want it anyway.
   // modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

    // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
    // You may need to force-disable transitiveness on them.
}

processResources {
    inputs.property "version", project.version

    from(sourceSets.main.resources.srcDirs) {
        include "fabric.mod.json"
        expand "version": project.version
    }

    from(sourceSets.main.resources.srcDirs) {
        exclude "fabric.mod.json"
    }
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
    classifier = "sources"
    from sourceSets.main.allSource
}

jar {
    from "LICENSE"
}

// configure the maven publication
publishing {
    publications {
        mavenJava(MavenPublication) {
            // add all the jars that should be included when publishing to maven
            artifact(remapJar) {
                builtBy remapJar
            }
            artifact(sourcesJar) {
                builtBy remapSourcesJar
            }
        }
    }

    // select the repositories you want to publish to
    repositories {
        // uncomment to publish to the local maven
        // mavenLocal()
    }
}


================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


================================================
FILE: gradle.properties
================================================
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.1
loader_version=0.11.1
# Mod Properties
mod_version=0.1-SNAPSHOT
maven_group=chiquita
archives_base_name=mineclient


================================================
FILE: gradlew
================================================
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    
    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=`expr $i + 1`
    done
    case $i in
        0) set -- ;;
        1) set -- "$args0" ;;
        2) set -- "$args0" "$args1" ;;
        3) set -- "$args0" "$args1" "$args2" ;;
        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "$@"


================================================
FILE: gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: settings.gradle
================================================
pluginManagement {
    repositories {
        jcenter()
        maven {
            name = 'Fabric'
            url = 'https://maven.fabricmc.net/'
        }
        gradlePluginPortal()
    }
}


================================================
FILE: src/main/java/chiquita/mineclient/Mineclient.java
================================================
package chiquita.mineclient;

import chiquita.mineclient.module.ModuleManager;
import me.zero.alpine.bus.EventBus;
import me.zero.alpine.bus.EventManager;
import net.fabricmc.api.ModInitializer;

public class Mineclient implements ModInitializer {
    public static final String VERSION = "0.0.1";
    public static final String NAME = "MineClient ";
    public static EventBus eventBus = new EventManager();
    public static final ModuleManager moduleManager = new ModuleManager();


    @Override
    public void onInitialize() {
        moduleManager.init();
    }
    public static ModuleManager getModuleManager() {
        return moduleManager;
    }

}


================================================
FILE: src/main/java/chiquita/mineclient/event/Event.java
================================================
package chiquita.mineclient.event;

import me.zero.alpine.event.type.Cancellable;

public class Event extends Cancellable {

    private Era era = Era.PRE;

    public enum Era {
        PRE,
        POST
    }

    public Event(Era Era) {
        era = Era;
    }

    public Event() {

    }

    public Era getEra() {
        return era;
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/event/EventMove.java
================================================
package chiquita.mineclient.event;

import net.minecraft.entity.MovementType;
import net.minecraft.util.math.Vec3d;

public class EventMove {
    public MovementType Type;
    public Vec3d vec3d;

    public EventMove(MovementType p_Type, Vec3d vec3d_1)
    {
        this.Type = p_Type;
        this.vec3d = vec3d_1;
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/event/EventTick.java
================================================
package chiquita.mineclient.event;

public class EventTick extends Event {
}

================================================
FILE: src/main/java/chiquita/mineclient/event/KeyPressEvent.java
================================================
package chiquita.mineclient.event;

public class KeyPressEvent extends Event {
    public final int keyCode;
    public final int action;

    public KeyPressEvent(int keyCode, int action)
    {
        this.keyCode = keyCode;
        this.action = action;
    }
}



================================================
FILE: src/main/java/chiquita/mineclient/mixin/IKeyBinding.java
================================================
package chiquita.mineclient.mixin;

import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(KeyBinding.class)
public interface IKeyBinding {

    @Accessor
    InputUtil.Key getBoundKey();
    @Accessor
    void setPressed(boolean pressed);

}

================================================
FILE: src/main/java/chiquita/mineclient/mixin/MixinClientPlayerEntity.java
================================================
package chiquita.mineclient.mixin;

import chiquita.mineclient.Mineclient;
import chiquita.mineclient.event.EventMove;
import chiquita.mineclient.event.EventTick;
import com.mojang.authlib.GameProfile;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.MovementType;
import net.minecraft.util.math.Vec3d;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ClientPlayerEntity.class)
public class MixinClientPlayerEntity extends AbstractClientPlayerEntity {

    public MixinClientPlayerEntity(ClientWorld world, GameProfile profile) {
        super(world, profile);
    }

    @Inject(at = @At("HEAD"), method = "move", cancellable = true)
    public void move(MovementType movementType_1, Vec3d vec3d_1, CallbackInfo info) {
        EventMove event = new EventMove(movementType_1, vec3d_1);
        Mineclient.eventBus.post(event);
    }

    @Inject(at = @At("RETURN"), method = "tick()V", cancellable = true)
    public void tick(CallbackInfo info) {
        EventTick event = new EventTick();
        Mineclient.eventBus.post(event);
        if (event.isCancelled())
            info.cancel();
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/mixin/MixinKeyboard.java
================================================
package chiquita.mineclient.mixin;

import chiquita.mineclient.Mineclient;
import chiquita.mineclient.event.KeyPressEvent;
import net.minecraft.client.Keyboard;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(Keyboard.class)
public class MixinKeyboard
{
    @Inject(at = @At("HEAD"), method = "onKey(JIIII)V")
    private void onOnKey(long windowHandle, int keyCode, int scanCode,
                         int action, int modifiers, CallbackInfo ci)
    {
        KeyPressEvent event = new KeyPressEvent(keyCode, action);
        Mineclient.eventBus.post(event);
    }
}


================================================
FILE: src/main/java/chiquita/mineclient/module/Module.java
================================================
package chiquita.mineclient.module;

import chiquita.mineclient.Mineclient;
import chiquita.mineclient.settings.Value;
import me.zero.alpine.listener.Listenable;
import net.minecraft.client.MinecraftClient;

import java.util.List;

public class Module implements Listenable {

    public final static int KEY_UNBOUND = 63;

    private boolean toggled = false;
    public String name;
    public Category category;
    public boolean hasSettings;
    public List<Value> settings;
    public int bind = -2;

    public MinecraftClient mc = MinecraftClient.getInstance();

    public Module(String displayName, Category category, boolean doesItHaveSettings, int defaultBind) {
        this.name = displayName;
        this.category = category;
        this.hasSettings = doesItHaveSettings;
        this.bind = defaultBind;
    }

    public void toggle() {
        toggled = !toggled;
        if (toggled) onEnable();
        else onDisable();
    }

    public enum Category {
        movement, player, world
    }

    public void setToggled(boolean toggled) {
        this.toggled = toggled;
        if (toggled) onEnable();
        else onDisable();
    }

    public boolean isToggled() {
        return toggled;
    }

    public void onEnable() {
        Mineclient.eventBus.subscribe(this);
    }

    public void onDisable() {
        try {
            Mineclient.eventBus.unsubscribe(this);
        }
        catch (Exception uhoh) {
            uhoh.printStackTrace();
        }
    }

    public Category getCategory() {
        return category;
    }
    public void signalValueChange(Value value) {

    }


    public void signalEnumChange() {

    }

    public String getName() {
        return name;
    }

    public List<Value> getSettings()
    {
        return settings;
    }
    public int getBind() {
        return bind;
    }

    public void toggleNoSave()
    {
        this.toggled = !toggled;
        if (toggled) onEnable();
        else onDisable();
    }

    public void setBind(String bindString) {
        int bindNum = Integer.parseInt(bindString);
        this.bind = bindNum;
    }

    public void setBind(int bindInt) {
        this.bind = bindInt;
    }

    public void onToggle() {}

}


================================================
FILE: src/main/java/chiquita/mineclient/module/ModuleManager.java
================================================
package chiquita.mineclient.module;

import chiquita.mineclient.Mineclient;
import chiquita.mineclient.event.KeyPressEvent;
import chiquita.mineclient.module.modules.*;
import chiquita.mineclient.settings.Value;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listenable;
import me.zero.alpine.listener.Listener;
import net.minecraft.client.MinecraftClient;
import org.lwjgl.glfw.GLFW;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

public class ModuleManager extends Object implements Listenable {
    public static ArrayList<Module> modules = new ArrayList<Module>();

    public static void init() {
        Mineclient.eventBus.subscribe(Mineclient.getModuleManager());
        add(new Yaw());
        add(new OffAxisAlarm());
        add(new Nuker());
        add(new HotbarCache());
        add(new AutoSwitcher());
        add(new AutoWalk());
        add(new AutoTunnel());
        add(new AutoEat());
    }

    public static List<Module> getModules() {
        return modules;
    }

    public static Module getModule(Class module) {
        for (Module mod : modules) {
            if (mod.getClass() == module)
                return mod;
        }
        return null;
    }

    public static void add(Module mod) {
        try
        {
            for (Field field : mod.getClass().getDeclaredFields())
            {
                if (Value.class.isAssignableFrom(field.getType()))
                {
                    if (!field.isAccessible())
                    {
                        field.setAccessible(true);
                    }
                    final Value val = (Value) field.get(mod);
                    val.initializeMod(mod);
                }
            }
            modules.add(mod);
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }

    public static final List<Module> getModuleList(Module.Category category) {
        List<Module> list = new ArrayList<>();
        for (Module module : modules) {
            if (module.getCategory().equals(category)) {
                list.add(module);
            }
        }
        // Organize alphabetically or ppl will get mad :D
        list.sort(Comparator.comparing(Module::getName));
        return list;
    }

    public static ModuleManager get() {
        return Mineclient.getModuleManager();
    }

    public static Module getModuleByName(String name) {
        for (Module m : modules) {
            if (name.equalsIgnoreCase(m.getName()))
                return m;
        }
        return null;
    }

    @EventHandler
    private Listener<KeyPressEvent> keyPressEventListener = new Listener<>(event -> {
        if (event.action != GLFW.GLFW_PRESS) return;
        if (MinecraftClient.getInstance().currentScreen != null) return;
        modules.stream().filter(m -> m.getBind() == event.keyCode).forEach(Module::toggle);
    });
}

================================================
FILE: src/main/java/chiquita/mineclient/module/modules/AutoEat.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventTick;
import chiquita.mineclient.mixin.IKeyBinding;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.settings.Value;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.client.options.KeyBinding;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import org.lwjgl.glfw.GLFW;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;

public class AutoEat extends Module {

    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);
    public final Value<Integer> healthToEat = new Value<>("Health", new String[]{"Health"}, "How much health to heal at.", 10, 1, 36, 1, 0);
    public final Value<Integer> hungerToEat = new Value<>("Hunger", new String[]{"Hunger"}, "How much hunger to eat at.", 13, 1, 20, 1, 0);

    public List<Value> values = Arrays.asList(
            mode,
            healthToEat,
            hungerToEat
    );

    public AutoEat() {
        super("AutoEat", Category.player, true, GLFW.GLFW_KEY_Y);
        super.settings = values;
    }
    private int lastSlot = -1;
    private boolean eating = false;

    private boolean isValid(ItemStack stack, int food) {
        return stack.getItem().getGroup() == ItemGroup.FOOD && (20 - food) >= Objects.requireNonNull(stack.getItem().getFoodComponent()).getHunger();
    }

    @EventHandler
    private Listener<EventTick> eventTickListener = new Listener<>(event -> {
        assert mc.player != null;
        if (mode.getValue() == 1) {
            if (eating && (mc.player.getHungerManager().getFoodLevel() == 20)) {
                if (lastSlot != -1) {
                    mc.player.inventory.selectedSlot = lastSlot;
                    lastSlot = -1;
                }
                eating = false;
                KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), false);
                return;
            }
        }
        if (mode.getValue() == 2) {
            if (eating && (mc.player.getHealth() + mc.player.getAbsorptionAmount() > healthToEat.getValue())) {
                if (lastSlot != -1) {
                    mc.player.inventory.selectedSlot = lastSlot;
                    lastSlot = -1;
                }
                eating = false;
                KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), false);
                return;
            }
        }
        if (mode.getValue() == 3) {
            if (eating && (mc.player.getHealth() + mc.player.getAbsorptionAmount() > healthToEat.getValue()) && (mc.player.getHungerManager().getFoodLevel() == 20)) {
                if (lastSlot != -1) {
                    mc.player.inventory.selectedSlot = lastSlot;
                    lastSlot = -1;
                }
                eating = false;
                KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), false);
                return;
            }
        }
        if (eating) return;
        if (mode.getValue() == 1) {
            if (mc.player.getHungerManager().getFoodLevel() < hungerToEat.getValue()) {
                for (int i = 0; i < 9; i++) {
                    if (mc.player.inventory.getStack(i).isFood()) {
                        lastSlot = mc.player.inventory.selectedSlot;
                        mc.player.inventory.selectedSlot = i;
                        eating = true;
                        KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), true);
                        return;
                    }
                }
            }
        }
        if (mode.getValue() == 2) {
            if (mc.player.getHealth() + mc.player.getAbsorptionAmount() <= healthToEat.getValue()) {
                for (int i = 0; i < 9; i++) {
                    if (mc.player.inventory.getStack(i).isFood()) {
                        lastSlot = mc.player.inventory.selectedSlot;
                        mc.player.inventory.selectedSlot = i;
                        eating = true;
                        KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), true);
                        return;
                    }
                }
            }
        }
        if (mode.getValue() == 3) {
            if (mc.player.getHealth() + mc.player.getAbsorptionAmount() <= healthToEat.getValue() || mc.player.getHungerManager().getFoodLevel() < hungerToEat.getValue()) {
                for (int i = 0; i < 9; i++) {
                    if (mc.player.inventory.getStack(i).isFood()) {
                        lastSlot = mc.player.inventory.selectedSlot;
                        mc.player.inventory.selectedSlot = i;
                        eating = true;
                        KeyBinding.setKeyPressed(((IKeyBinding) mc.options.keyUse).getBoundKey(), true);
                        return;
                    }
                }
            }
        }
    });
    public boolean isEating() {
        return eating;
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/module/modules/AutoSwitcher.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventTick;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.module.ModuleManager;
import chiquita.mineclient.settings.Value;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Items;
import org.lwjgl.glfw.GLFW;

import java.util.Arrays;
import java.util.List;

public class AutoSwitcher extends Module {


    public AutoSwitcher() {
        super("AutoSwitcher", Category.player, false, GLFW.GLFW_KEY_Y);
    }

    @EventHandler
    private Listener<EventTick> eventTickListener = new Listener<>(event -> {
        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);
        if (autoEat.isEating()) return;
        MinecraftClient mc = MinecraftClient.getInstance();
        PlayerEntity player = mc.player;
        int mode = 1;
        switch (mode) {
            case 0:
                if (player.inventory.getMainHandStack().isEmpty() || player.inventory.getMainHandStack().getItem() != Items.DIAMOND_PICKAXE || player.inventory.getMainHandStack().getItem() != Items.NETHERITE_PICKAXE) {
                    for (int i = 0; i < 9; i++) {
                        if (player.inventory.getStack(i).getItem() == Items.DIAMOND_PICKAXE || player.inventory.getStack(i).getItem() == Items.NETHERITE_PICKAXE) {
                            player.inventory.selectedSlot = i;
                            //                            player.inventory.swapSlotWithHotbar(i);
                            return;
                        }
                    }
                }
                break;
        }
    });
}

================================================
FILE: src/main/java/chiquita/mineclient/module/modules/AutoTunnel.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventMove;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.module.ModuleManager;
import chiquita.mineclient.settings.Value;
import chiquita.mineclient.utils.EntityUtils;
import chiquita.mineclient.utils.Timer;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
import net.minecraft.util.math.BlockPos;
import org.lwjgl.glfw.GLFW;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

import static net.minecraft.util.math.Direction.UP;

public class AutoTunnel extends Module
{

    public final Value<Boolean> pauseAutoWalk = new Value<>("PauseAutoWalk", new String[]{"Blocks"}, "Pause AutoWalk?", true);

    public AutoTunnel()
    {
        super("AutoTunnel", Category.world, false, GLFW.GLFW_KEY_Y);
    }

    private List<BlockPos> blocksToDestroy = new CopyOnWriteArrayList<>();
    private boolean needPause = false;
    private Timer pauseTimer = new Timer();

    @EventHandler
    private Listener<EventMove> eventMoveListener = new Listener<>(event -> {
        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);
        if (autoEat.isEating()) return;

        blocksToDestroy.clear();

        BlockPos playerPos = new BlockPos(Math.floor(mc.player.getX()), Math.floor(mc.player.getY()), Math.floor(mc.player.getZ()));

        switch (EntityUtils.GetFacing())
        {
            case East:
                switch (1)
                {
                    case 1:
                        for (int i = 0; i < 3; ++i)
                        {
                            blocksToDestroy.add(playerPos.east());
                            blocksToDestroy.add(playerPos.east().up());
                            blocksToDestroy.add(playerPos.east().up().up());
                            blocksToDestroy.add(playerPos.east().north());
                            blocksToDestroy.add(playerPos.east().north().up());
                            blocksToDestroy.add(playerPos.east().north().up().up());

                            playerPos = new BlockPos(playerPos).east();
                        }
                        break;
                }
                break;
            case North:
                switch (1)
                {
                    case 1:
                        for (int i = 0; i < 3; ++i)
                        {
                            blocksToDestroy.add(playerPos.north());
                            blocksToDestroy.add(playerPos.north().up());
                            blocksToDestroy.add(playerPos.north().up().up());
                            blocksToDestroy.add(playerPos.north().east());
                            blocksToDestroy.add(playerPos.north().east().up());
                            blocksToDestroy.add(playerPos.north().east().up().up());

                            playerPos = new BlockPos(playerPos).north();
                        }
                        break;
                }
                break;
            case South:
                switch (1)
                {
                    case 1:
                        for (int i = 0; i < 3; ++i)
                        {
                            blocksToDestroy.add(playerPos.south());
                            blocksToDestroy.add(playerPos.south().up());
                            blocksToDestroy.add(playerPos.south().up().up());
                            blocksToDestroy.add(playerPos.south().west());
                            blocksToDestroy.add(playerPos.south().west().up());
                            blocksToDestroy.add(playerPos.south().west().up().up());

                            playerPos = new BlockPos(playerPos).south();
                        }
                        break;
                }
                break;
            case West:
                switch (1)
                {
                    case 1:
                        for (int i = 0; i < 3; ++i)
                        {
                            blocksToDestroy.add(playerPos.west());
                            blocksToDestroy.add(playerPos.west().up());
                            blocksToDestroy.add(playerPos.west().up().up());
                            blocksToDestroy.add(playerPos.west().south());
                            blocksToDestroy.add(playerPos.west().south().up());
                            blocksToDestroy.add(playerPos.west().south().up().up());

                            playerPos = new BlockPos(playerPos).west();
                        }
                        break;
                }
                break;
            default:
                break;
        }

        BlockPos toDestroy = null;

        for (BlockPos pos : blocksToDestroy)
        {
            BlockState state = mc.world.getBlockState(pos);

            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)
                continue;

            toDestroy = pos;
            break;
        }

        if (toDestroy != null) {
            Block td = mc.world.getBlockState(toDestroy).getBlock();
            if (td != Blocks.AIR && td != Blocks.NETHERRACK && td != Blocks.NETHER_PORTAL) {
                mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket(
                        PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, toDestroy, UP));
                mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK,
                        toDestroy, UP));
                needPause = true;
            }
        }
        else needPause = false;
    });

    public boolean PauseAutoWalk()
    {
        return needPause && pauseAutoWalk.getValue();
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/module/modules/AutoWalk.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventTick;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.module.ModuleManager;
import chiquita.mineclient.settings.Value;
import chiquita.mineclient.utils.EntityUtils;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.item.Items;
import org.lwjgl.glfw.GLFW;

import java.util.Arrays;
import java.util.List;

public class AutoWalk extends Module {

    public final Value<Boolean> autoAlign = new Value<>("AutoAlign", new String[]{"AutoAlign"}, "See what highway you're on and make a decision.", false);
    public final Value<Boolean> pauseNoPickaxe = new Value<>("PauseNoPick", new String[]{"PauseNoPick"}, "See if you have no pickaxe in your hand and pause", false);
    public final Value<Integer> direction = new Value<>("Direction", new String[]{"Direction"}, "Which key to hold down.", 1, 0, 4, 1,0);

    public List<Value> values = Arrays.asList(
            autoAlign,
            direction,
            pauseNoPickaxe
    );

    public AutoWalk() {
        super("AutoWalk", Module.Category.movement, true, GLFW.GLFW_KEY_Y);
        super.settings = values;
    }

    @EventHandler
    private Listener<EventTick> eventTickListener = new Listener<>(event -> {
        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);
        AutoTunnel at = ((AutoTunnel) ModuleManager.getModule(AutoTunnel.class));
        boolean pause = at.PauseAutoWalk() || autoEat.isEating() || (pauseNoPickaxe.getValue() && (mc.player.inventory.getMainHandStack().getItem() != Items.DIAMOND_PICKAXE && mc.player.inventory.getMainHandStack().getItem() != Items.NETHERITE_PICKAXE));
        if (!pause) {
            if (autoAlign.getValue()) {
                ModuleManager.getModule(Yaw.class).getSettings().get(0).setValue(false);
                ModuleManager.getModule(Yaw.class).getSettings().get(1).setValue(false);
                switch (EntityUtils.determineHighway()) {
                    case XPZP:
                        mc.player.yaw = 0;
                        mc.player.headYaw = -45;
                        mc.options.keyLeft.setPressed(true);
                        mc.options.keyForward.setPressed(true);
                        break;
                    case XNZP:
                        mc.player.yaw = 90;
                        mc.player.headYaw = -135;
                        mc.options.keyForward.setPressed(true);
                        mc.options.keyLeft.setPressed(true);
                        break;
                    case XPZN:
                        mc.player.yaw = 180;
                        mc.player.yaw = 135;
                        break;
                }
            }
            else {
                switch (direction.getValue()) {
                    case 1:
                        mc.options.keyForward.setPressed(true);
                        break;
                    case 2:
                        mc.options.keyRight.setPressed(true);
                        break;
                    case 3:
                        mc.options.keyBack.setPressed(true);
                        break;
                    case 4:
                        mc.options.keyLeft.setPressed(true);
                        break;
                }
            }
        }
        if (pause) {
            mc.options.keyForward.setPressed(false);
            mc.options.keyLeft.setPressed(false);
            mc.options.keyRight.setPressed(false);
            mc.options.keyBack.setPressed(false);
        }
    });

    public void onDisable() {
        mc.options.keyForward.setPressed(false);
        mc.options.keyLeft.setPressed(false);
        mc.options.keyRight.setPressed(false);
        mc.options.keyBack.setPressed(false);
        super.onDisable();
    }
}


================================================
FILE: src/main/java/chiquita/mineclient/module/modules/HotbarCache.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventTick;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.settings.Value;
import chiquita.mineclient.utils.Timer;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.client.MinecraftClient;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.screen.slot.SlotActionType;
import org.lwjgl.glfw.GLFW;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class HotbarCache extends Module
{
    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);
    public final Value<Float> Delay = new Value<Float>("Delay", new String[] {"D"}, "Delay to use", 1.0f, 0.0f, 10.0f, 1.0f, 1);

    public List<Value> values = Arrays.asList(
            Mode, Delay
    );

    public HotbarCache()
    {
        super("HotbarCache", Category.player, true, GLFW.GLFW_KEY_Y);
        super.settings = values;
    }

    private ArrayList<Item> Hotbar = new ArrayList<Item>();
    private Timer timer = new Timer();

    static MinecraftClient staticMC = MinecraftClient.getInstance();

    @Override
    public void onEnable()
    {
        super.onEnable();
        Hotbar.clear();
        for (int i = 0; i < 9; ++i) {
            ItemStack l_Stack = mc.player.inventory.getStack(i);
            if (!l_Stack.isEmpty() && !Hotbar.contains(l_Stack.getItem()))
                Hotbar.add(l_Stack.getItem());
            else
                Hotbar.add(Items.AIR);
        }
    }

    /// Don't activate on startup
    @Override
    public void toggleNoSave() {
    }

    @EventHandler
    private Listener<EventTick> OnPlayerUpdate = new Listener<>(p_Event -> {
        if (!timer.passed(Delay.getValue() * 1000))
            return;

        switch (Mode.getValue()) {
            case 1:
                for (int i = 0; i < 9; ++i) {
                    if (switchSlotIfNeed(i)) {
                        timer.reset();
                        return;
                    }
                }
                break;
            case 2:
                for (int i = 0; i < 9; ++i) {
                    if (refillSlotIfNeed(i)) {
                        timer.reset();
                        return;
                    }
                }
                break;
            default:
                break;
        }
    });

    private boolean switchSlotIfNeed(int targetSlot) {
        Item targetItem = Hotbar.get(targetSlot);

        if (targetItem == Items.AIR)
            return false;

        if (!mc.player.inventory.getStack(targetSlot).isEmpty() && mc.player.inventory.getStack(targetSlot).getItem() == targetItem)
            return false;

        int slotFromCache = getItemSlot(targetItem);

        if (slotFromCache != -1 && slotFromCache != 45) {
            mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, slotFromCache, 0,
                    SlotActionType.PICKUP, mc.player);
            mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, targetSlot+36, 0, SlotActionType.PICKUP,
                    mc.player);
            mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, slotFromCache, 0,
                    SlotActionType.PICKUP, mc.player);
            mc.interactionManager.tick();

            return true;
        }

        return false;
    }

    private boolean refillSlotIfNeed(int targetSlot) {
        ItemStack targetStack = mc.player.inventory.getStack(targetSlot);

        if (targetStack.isEmpty() || targetStack.getItem() == Items.AIR)
            return false;

        if (!targetStack.isStackable())
            return false;

        if (targetStack.getCount() >= targetStack.getMaxCount())
            return false;

        /// We're going to search the entire inventory for the same stack, WITH THE SAME NAME, and use quick move.
        for (int i = 9; i < 36; ++i) {
            final ItemStack currentItem = mc.player.inventory.getStack(i);

            if (currentItem.isEmpty())
                continue;

            if (canItemBeMergedWith(targetStack, currentItem)) {
                mc.interactionManager.clickSlot(mc.player.currentScreenHandler.syncId, i, 0,
                        SlotActionType.QUICK_MOVE, mc.player);
                mc.interactionManager.tick();

                /// Check again for more next available tick
                return true;
            }
        }

        return false;
    }

    private boolean canItemBeMergedWith(ItemStack source, ItemStack target) {
        return source.getItem() == target.getItem() && source.getName().equals(target.getName());
    }

    public static int getItemSlot(Item input) {
        if (staticMC.player == null)
            return 0;

        for (int i = 0; i < staticMC.player.inventory.size(); ++i) {
            if (i == 0 || i == 5 || i == 6 || i == 7 || i == 8)
                continue;

            ItemStack s = staticMC.player.inventory.getStack(i);

            if (s.isEmpty())
                continue;

            if (s.getItem() == input) {
                return i;
            }
        }
        return -1;
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/module/modules/Nuker.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventTick;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.module.ModuleManager;
import chiquita.mineclient.settings.Value;
import chiquita.mineclient.utils.EntityUtils;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext;
import org.lwjgl.glfw.GLFW;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Nuker extends Module {

    private List<Block> blockList = new ArrayList<>();


    public Nuker() {
        super("Nuker", Category.world, false, GLFW.GLFW_KEY_Y);
    }

    private BlockPos lastPlayerPos = null;

    private List<BlockPos> getBlocks() {
        int mode = 1;
        List<BlockPos> blocks = new ArrayList<>();
        if (this.isToggled()) {
            switch (mode) {
                case 1:
                    blocks = get2x3();
                    break;
            }
        }
        return blocks;
    }
    public boolean canSeeBlock(BlockPos pos) {
        double diffX = pos.getX() + 0.5 - mc.player.getCameraPosVec(mc.getTickDelta()).x;
        double diffY = pos.getY() + 0.5 - mc.player.getCameraPosVec(mc.getTickDelta()).y;
        double diffZ = pos.getZ() + 0.5 - mc.player.getCameraPosVec(mc.getTickDelta()).z;

        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);

        float yaw = mc.player.yaw + MathHelper.wrapDegrees((float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90 - mc.player.yaw);
        float pitch = mc.player.pitch + MathHelper.wrapDegrees((float) -Math.toDegrees(Math.atan2(diffY, diffXZ)) - mc.player.pitch);

        Vec3d rotation = new Vec3d(
                (double) (MathHelper.sin(-yaw * 0.017453292F) * MathHelper.cos(pitch * 0.017453292F)),
                (double) (-MathHelper.sin(pitch * 0.017453292F)),
                (double) (MathHelper.cos(-yaw * 0.017453292F) * MathHelper.cos(pitch * 0.017453292F)));

        Vec3d rayVec = mc.player.getCameraPosVec(mc.getTickDelta()).add(rotation.x * 6, rotation.y * 6, rotation.z * 6);
        return mc.world.raycast(new RaycastContext(mc.player.getCameraPosVec(mc.getTickDelta()),
                rayVec, RaycastContext.ShapeType.OUTLINE, RaycastContext.FluidHandling.NONE, mc.player))
                .getBlockPos().equals(pos);
    }

    @EventHandler
    private Listener<EventTick> eventTickListener = new Listener<>(event -> {
        List<BlockPos> blocks = getBlocks();
        double range = 6;

        AutoEat autoEat = (AutoEat) ModuleManager.getModule(AutoEat.class);

        if (autoEat.isEating()) return;

        if (blocks.isEmpty()) return;

        for (BlockPos pos : blocks) {
            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))
                continue;

            Vec3d vec = Vec3d.of(pos).add(0.5, 0.5, 0.5);

            if (mc.player.getPos().distanceTo(vec) > range + 0.5) continue;

            Direction dir = null;
            double dist = Double.MAX_VALUE;
            for (Direction d : Direction.values()) {
                double dist2 = mc.player.getPos().distanceTo(Vec3d.of(pos.offset(d)).add(0.5, 0.5, 0.5));
                if (dist2 > range || mc.world.getBlockState(pos.offset(d)).getBlock() != Blocks.AIR || dist2 > dist)
                    continue;
                dist = dist2;
                dir = d;
            }

            if (dir == null) continue;

            mc.interactionManager.attackBlock(pos, dir);
        }
    });

    public List<BlockPos> getCube() {
        List<BlockPos> cubeBlocks = new ArrayList<>();
        BlockPos playerPos = new BlockPos(Math.floor(mc.player.getX()), Math.floor(mc.player.getY()), Math.floor(mc.player.getZ()));
        if (lastPlayerPos == null || !lastPlayerPos.equals(playerPos)) {
            switch (EntityUtils.GetFacing()) {
                case East:
                    for (int i = 0; i < 7; ++i) {
                        cubeBlocks.add(playerPos.east());
                        cubeBlocks.add(playerPos.east().up());
                        cubeBlocks.add(playerPos.east().up().up());
                        cubeBlocks.add(playerPos.east().north());
                        cubeBlocks.add(playerPos.east().north().up());
                        cubeBlocks.add(playerPos.east().north().up().up());
                        cubeBlocks.add(playerPos.east().south());
                        cubeBlocks.add(playerPos.east().south().up());
                        cubeBlocks.add(playerPos.east().south().up().up());

                        playerPos = new BlockPos(playerPos).east();
                    }
                    break;
                case North:
                    for (int i = 0; i < 7; ++i) {
                        cubeBlocks.add(playerPos.north());
                        cubeBlocks.add(playerPos.north().up());
                        cubeBlocks.add(playerPos.north().up().up());
                        cubeBlocks.add(playerPos.north().east());
                        cubeBlocks.add(playerPos.north().east().up());
                        cubeBlocks.add(playerPos.north().east().up().up());
                        cubeBlocks.add(playerPos.north().west());
                        cubeBlocks.add(playerPos.north().west().up());
                        cubeBlocks.add(playerPos.north().west().up().up());

                        playerPos = new BlockPos(playerPos).north();
                    }
                    break;
                case South:
                    for (int i = 0; i < 7; ++i) {
                        cubeBlocks.add(playerPos.south());
                        cubeBlocks.add(playerPos.south().up());
                        cubeBlocks.add(playerPos.south().up().up());
                        cubeBlocks.add(playerPos.south().west());
                        cubeBlocks.add(playerPos.south().west().up());
                        cubeBlocks.add(playerPos.south().west().up().up());
                        cubeBlocks.add(playerPos.south().east());
                        cubeBlocks.add(playerPos.south().east().up());
                        cubeBlocks.add(playerPos.south().east().up().up());

                        playerPos = new BlockPos(playerPos).south();
                    }
                    break;
                case West:
                    for (int i = 0; i < 7; ++i) {
                        cubeBlocks.add(playerPos.west());
                        cubeBlocks.add(playerPos.west().up());
                        cubeBlocks.add(playerPos.west().up().up());
                        cubeBlocks.add(playerPos.west().south());
                        cubeBlocks.add(playerPos.west().south().up());
                        cubeBlocks.add(playerPos.west().south().up().up());
                        cubeBlocks.add(playerPos.west().north());
                        cubeBlocks.add(playerPos.west().north().up());
                        cubeBlocks.add(playerPos.west().north().up().up());


                        playerPos = new BlockPos(playerPos).west();
                    }
                    break;
            }
        }
        return cubeBlocks;
    }


    public List<BlockPos> get2x3() {
        List<BlockPos> cubeBlocks = new ArrayList<>();
        BlockPos playerPos = new BlockPos(Math.floor(mc.player.getX()), Math.floor(mc.player.getY()), Math.floor(mc.player.getZ()));
        if (lastPlayerPos == null || !lastPlayerPos.equals(playerPos)) {
            switch (EntityUtils.GetFacing()) {
                case East:
                    for (int i = 0; i < 4; ++i) {
                        cubeBlocks.add(playerPos.east());
                        cubeBlocks.add(playerPos.east().up());
                        cubeBlocks.add(playerPos.east().up().up());
                        cubeBlocks.add(playerPos.east().north());
                        cubeBlocks.add(playerPos.east().north().up());
                        cubeBlocks.add(playerPos.east().north().up().up());
                        playerPos = new BlockPos(playerPos).east();
                    }
                    break;
                case North:
                    for (int i = 0; i < 4; ++i) {
                        cubeBlocks.add(playerPos.north());
                        cubeBlocks.add(playerPos.north().up());
                        cubeBlocks.add(playerPos.north().up().up());
                        cubeBlocks.add(playerPos.north().east());
                        cubeBlocks.add(playerPos.north().east().up());
                        cubeBlocks.add(playerPos.north().east().up().up());
                        playerPos = new BlockPos(playerPos).north();
                    }
                    break;
                case South:
                    for (int i = 0; i < 4; ++i) {
                        cubeBlocks.add(playerPos.south());
                        cubeBlocks.add(playerPos.south().up());
                        cubeBlocks.add(playerPos.south().up().up());
                        cubeBlocks.add(playerPos.south().west());
                        cubeBlocks.add(playerPos.south().west().up());
                        cubeBlocks.add(playerPos.south().west().up().up());
                        playerPos = new BlockPos(playerPos).south();
                    }
                    break;
                case West:
                    for (int i = 0; i < 4; ++i) {
                        cubeBlocks.add(playerPos.west());
                        cubeBlocks.add(playerPos.west().up());
                        cubeBlocks.add(playerPos.west().up().up());
                        cubeBlocks.add(playerPos.west().south());
                        cubeBlocks.add(playerPos.west().south().up());
                        cubeBlocks.add(playerPos.west().south().up().up());
                        playerPos = new BlockPos(playerPos).west();
                    }
                    break;
            }
        }
        return cubeBlocks;
    }

}

================================================
FILE: src/main/java/chiquita/mineclient/module/modules/OffAxisAlarm.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventTick;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.utils.EntityUtils;
import chiquita.mineclient.utils.Logger;
import chiquita.mineclient.utils.Timer;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.client.sound.PositionedSoundInstance;
import net.minecraft.sound.SoundEvents;
import org.lwjgl.glfw.GLFW;

public class OffAxisAlarm extends Module {
    public OffAxisAlarm() {
        super("OffAxisAlarm", Category.world, false, GLFW.GLFW_KEY_Y);
    }

    Timer chatTimer = new Timer();
    Timer timer = new Timer();

    @EventHandler
    private Listener<EventTick> eventTickListener = new Listener<>(event -> {
        if (timer.passed(1000)) {
            switch (EntityUtils.determineHighway()) {
                case XP:
                    if (!(mc.player.getZ() > 0 && mc.player.getZ() < 1)) {
                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));
                        if (chatTimer.passed(5000)) {
                            Logger.chatMessage("You're off axis!");
                            chatTimer.reset();
                        }
                        timer.reset();
                    }
                    break;
                case XN:
                    if (!(mc.player.getZ() < 0 && mc.player.getZ() > -1)) {
                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));
                        if (chatTimer.passed(5000)) {
                            Logger.chatMessage("You're off axis!");
                            chatTimer.reset();
                        }
                        timer.reset();
                    }
                    break;
                case ZP:
                    if (!(mc.player.getX() < 0 && mc.player.getX() > -1)) {
                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));
                        if (chatTimer.passed(5000)) {
                            Logger.chatMessage("You're off axis!");
                            chatTimer.reset();
                        }
                        timer.reset();
                    }
                    break;
                case ZN:
                    if (!(mc.player.getX() > 0 && mc.player.getX() < 1)) {
                        mc.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.ENTITY_ENDERMAN_DEATH, 1.0F));
                        if (chatTimer.passed(5000)) {
                            Logger.chatMessage("You're off axis!");
                            chatTimer.reset();
                        }
                        timer.reset();
                    }
                    break;
            }
        }
    });
}

================================================
FILE: src/main/java/chiquita/mineclient/module/modules/Yaw.java
================================================
package chiquita.mineclient.module.modules;

import chiquita.mineclient.event.EventTick;
import chiquita.mineclient.module.Module;
import chiquita.mineclient.settings.Value;
import chiquita.mineclient.utils.EntityUtils;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
import net.minecraft.client.util.InputUtil;
import org.lwjgl.glfw.GLFW;

import java.util.Arrays;
import java.util.List;

public class Yaw extends Module {

    private boolean lDown = false;
    private boolean rDown = false;

    public final Value<Boolean> autoAlign = new Value<>("AutoAlign", new String[]{"Yaw"}, "Automatically determines highway and snaps yaw", true);
    public final Value<Boolean> useYaw = new Value<>("UseYaw", new String[]{"UseYaw"}, "Snaps yaw based on stuff and stuff", false);
    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);

    public List<Value> values = Arrays.asList(
            autoAlign,
            useYaw,
            yaw
    );

    public Yaw() {
        super("Yaw", Category.player, true, GLFW.GLFW_KEY_Y);
        super.settings = values;
    }

    @EventHandler
    private Listener<EventTick> eventTickListener = new Listener<>(event -> {
        /* yes looks like a good way to do it to me */
        if (useYaw.getValue() && mc.currentScreen == null) {
            int ymode = yaw.getValue() - 1;

            if (InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT) && !lDown) {
                mc.player.yaw -= ymode == 0 ? 45 : ymode == 1 ? 30 : ymode == 2 ? 15 : 90;
                lDown = true;
            } else if (!InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT)) {
                lDown = false;
            }

            if (InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_RIGHT) && !rDown) {
                mc.player.yaw += ymode == 0 ? 45 : ymode == 1 ? 30 : ymode == 2 ? 15 : 90;
                rDown = true;
            } else if (!InputUtil.isKeyPressed(mc.getWindow().getHandle(), GLFW.GLFW_KEY_RIGHT)) {
                rDown = false;
            }
            snap();
        }
        else if (autoAlign.getValue()) {
            switch (EntityUtils.determineHighway()) {
                case XP: mc.player.yaw = -90; break;
                case XPZP: mc.player.yaw = -45; break;
                case XPZN: mc.player.yaw = -135; break;
                case XN: mc.player.yaw = 90; break;
                case XNZP: mc.player.yaw = 45; break;
                case XNZN: mc.player.yaw = 135; break;
                case ZP: mc.player.yaw = 0; break;
                case ZN: mc.player.yaw = 180; break;
            }
        }

    });

    public void snap() {
        // quic maff
        if (useYaw.getValue()) {
            int mode = yaw.getValue() - 1;
            int interval = mode == 0 ? 45 : mode == 1 ? 30 : mode == 2 ? 15 : 90;
            int rot = (int) mc.player.yaw + (Math.floorMod((int) mc.player.yaw, interval) < interval / 2 ?
                    -Math.floorMod((int) mc.player.yaw, interval) : interval - Math.floorMod((int) mc.player.yaw, interval));

            mc.player.yaw = rot;
        }
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/settings/Value.java
================================================
package chiquita.mineclient.settings;

import chiquita.mineclient.module.Module;

public class Value<T>
{

    private String name;
    private String[] alias;
    private T[] modes;
    private String desc;
    private Module mod;
    public ValueListeners listener;

    private T value;

    private T min;
    private T max;
    private T inc;
    private int decimals;

    public Value(String name, String[] alias, String desc)
    {
        this.name = name;
        this.alias = alias;
        this.desc = desc;
    }

    public Value(String name, String[] alias, String desc, T value)
    {
        this(name, alias, desc);
        this.value = value;
    }

    public Value(String name, String[] alias, String desc, T value, T min, T max, T inc, int decimals)
    {
        this(name, alias, desc, value);
        this.min = min;
        this.max = max;
        this.inc = inc;
        this.decimals = decimals;
    }

    public Value(String name, String[] alias, String desc, T[] modes) {
        this(name, alias, desc);
        this.modes = modes;
    }

    public <T> T clamp(T value, T min, T max)
    {
        return ((Comparable) value).compareTo(min) < 0 ? min : (((Comparable) value).compareTo(max) > 0 ? max : value);
    }

    public T getValue()
    {
        return this.value;
    }

    public int getDecimals() {
        return this.decimals;
    }

    public void setValue(T value)
    {
        if (min != null && max != null) {
            final Number val = (Number) value;
            final Number min = (Number) this.min;
            final Number max = (Number) this.max;
            this.value = (T) this.clamp(val, min, max);
        }
        else {
            this.value = value;
        }

        if (mod != null)
            mod.signalValueChange(this);
        if (listener != null)
            listener.onValueChange(this);
    }

    public String getNextEnumValue(boolean reverse)
    {
        final Enum currentEnum = (Enum) this.getValue();

        int i = 0;

        for (; i < this.value.getClass().getEnumConstants().length; i++)
        {
            final Enum e = (Enum) this.value.getClass().getEnumConstants()[i];
            if (e.name().equalsIgnoreCase(currentEnum.name()))
            {
                break;
            }
        }

        return this.value.getClass()
                .getEnumConstants()[(reverse ? (i != 0 ? i - 1 : value.getClass().getEnumConstants().length - 1)
                : i + 1) % value.getClass().getEnumConstants().length].toString();
    }

    public int getEnum(String input)
    {
        for (int i = 0; i < this.value.getClass().getEnumConstants().length; i++)
        {
            final Enum e = (Enum) this.value.getClass().getEnumConstants()[i];
            if (e.name().equalsIgnoreCase(input))
            {
                return i;
            }
        }
        return -1;
    }

    public Enum getEnumReal(String input)
    {
        for (int i = 0; i < this.value.getClass().getEnumConstants().length; i++)
        {
            final Enum e = (Enum) this.value.getClass().getEnumConstants()[i];
            if (e.name().equalsIgnoreCase(input))
            {
                return e;
            }
        }
        return null;
    }

    public void setEnumValue(String value)
    {
        for (Enum e : ((Enum) this.value).getClass().getEnumConstants())
        {
            if (e.name().equalsIgnoreCase(value))
            {
                setValue((T)e);
                break;
            }
        }

        if (mod != null)
            mod.signalEnumChange();
    }

    public T getMin()
    {
        return min;
    }

    public void setMin(T min)
    {
        this.min = min;
    }

    public T getMax()
    {
        return max;
    }

    public void setMax(T max)
    {
        this.max = max;
    }

    public T getInc()
    {
        return inc;
    }

    public void setInc(T inc)
    {
        this.inc = inc;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String[] getAlias()
    {
        return alias;
    }

    public void setAlias(String[] alias)
    {
        this.alias = alias;
    }

    public T[] getList() {
        return modes;
    }

    public String getDesc()
    {
        return desc;
    }

    public void setDesc(String desc)
    {
        this.desc = desc;
    }

    public void SetListener(ValueListeners valueListeners)
    {
        listener = valueListeners;
    }

    public void initializeMod(Module mod)
    {
        this.mod = mod;
    }

    public void setForcedValue(T value)
    {
        if (min != null && max != null)
        {
            final Number val = (Number) value;
            final Number min = (Number) this.min;
            final Number max = (Number) this.max;
            this.value = (T) val;
            // this.value = (T) this.clamp(val, min, max);
        }
        else
        {
            this.value = value;
        }
    }
}


================================================
FILE: src/main/java/chiquita/mineclient/settings/ValueListeners.java
================================================
package chiquita.mineclient.settings;

public interface ValueListeners
{
    public void onValueChange(final Value value);
}


================================================
FILE: src/main/java/chiquita/mineclient/utils/EntityUtils.java
================================================
package chiquita.mineclient.utils;

import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.mob.AmbientEntity;
import net.minecraft.entity.mob.WaterCreatureEntity;
import net.minecraft.entity.passive.GolemEntity;
import net.minecraft.entity.passive.PassiveEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.Pair;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.*;
import net.minecraft.world.World;

import java.util.Arrays;
import java.util.List;

public class EntityUtils {

    static MinecraftClient mc = MinecraftClient.getInstance();

    public static final List<Block> NONSOLID_BLOCKS = Arrays.asList(
            Blocks.AIR, Blocks.LAVA, Blocks.WATER, Blocks.GRASS,
            Blocks.VINE, Blocks.SEAGRASS, Blocks.TALL_SEAGRASS,
            Blocks.SNOW, Blocks.TALL_GRASS, Blocks.FIRE, Blocks.VOID_AIR);

    public static final List<Block> RIGHTCLICKABLE_BLOCKS = Arrays.asList(
            Blocks.CHEST, Blocks.TRAPPED_CHEST, Blocks.ENDER_CHEST,
            Blocks.WHITE_SHULKER_BOX, Blocks.ORANGE_SHULKER_BOX, Blocks.MAGENTA_SHULKER_BOX,
            Blocks.LIGHT_BLUE_SHULKER_BOX, Blocks.YELLOW_SHULKER_BOX, Blocks.LIME_SHULKER_BOX,
            Blocks.PINK_SHULKER_BOX, Blocks.GRAY_SHULKER_BOX, Blocks.LIGHT_GRAY_SHULKER_BOX,
            Blocks.CYAN_SHULKER_BOX, Blocks.PURPLE_SHULKER_BOX, Blocks.BLUE_SHULKER_BOX,
            Blocks.BROWN_SHULKER_BOX, Blocks.GREEN_SHULKER_BOX, Blocks.RED_SHULKER_BOX,
            Blocks.BLACK_SHULKER_BOX, Blocks.ANVIL,
            Blocks.OAK_BUTTON, Blocks.ACACIA_BUTTON, Blocks.BIRCH_BUTTON, Blocks.DARK_OAK_BUTTON,
            Blocks.JUNGLE_BUTTON, Blocks.SPRUCE_BUTTON, Blocks.STONE_BUTTON, Blocks.COMPARATOR,
            Blocks.REPEATER, Blocks.OAK_FENCE_GATE, Blocks.SPRUCE_FENCE_GATE, Blocks.BIRCH_FENCE_GATE,
            Blocks.JUNGLE_FENCE_GATE, Blocks.DARK_OAK_FENCE_GATE, Blocks.ACACIA_FENCE_GATE,
            Blocks.BREWING_STAND, Blocks.DISPENSER, Blocks.DROPPER,
            Blocks.LEVER, Blocks.NOTE_BLOCK, Blocks.JUKEBOX,
            Blocks.BEACON, Blocks.BLACK_BED, Blocks.BLUE_BED, Blocks.BROWN_BED, Blocks.CYAN_BED, Blocks.GRAY_BED,
            Blocks.GREEN_BED, Blocks.LIGHT_BLUE_BED, Blocks.LIGHT_GRAY_BED, Blocks.LIME_BED, Blocks.MAGENTA_BED,
            Blocks.ORANGE_BED, Blocks.PINK_BED, Blocks.PURPLE_BED, Blocks.RED_BED, Blocks.WHITE_BED,
            Blocks.YELLOW_BED, Blocks.FURNACE, Blocks.OAK_DOOR, Blocks.SPRUCE_DOOR,
            Blocks.BIRCH_DOOR, Blocks.JUNGLE_DOOR, Blocks.ACACIA_DOOR,
            Blocks.DARK_OAK_DOOR, Blocks.CAKE, Blocks.ENCHANTING_TABLE,
            Blocks.DRAGON_EGG, Blocks.HOPPER, Blocks.REPEATING_COMMAND_BLOCK,
            Blocks.COMMAND_BLOCK, Blocks.CHAIN_COMMAND_BLOCK, Blocks.CRAFTING_TABLE,
            Blocks.ACACIA_TRAPDOOR, Blocks.BIRCH_TRAPDOOR, Blocks.DARK_OAK_TRAPDOOR, Blocks.JUNGLE_TRAPDOOR,
            Blocks.OAK_TRAPDOOR, Blocks.SPRUCE_TRAPDOOR, Blocks.CAKE, Blocks.ACACIA_SIGN, Blocks.ACACIA_WALL_SIGN,
            Blocks.BIRCH_SIGN, Blocks.BIRCH_WALL_SIGN, Blocks.DARK_OAK_SIGN, Blocks.DARK_OAK_WALL_SIGN,
            Blocks.JUNGLE_SIGN, Blocks.JUNGLE_WALL_SIGN, Blocks.OAK_SIGN, Blocks.OAK_WALL_SIGN,
            Blocks.SPRUCE_SIGN, Blocks.SPRUCE_WALL_SIGN);

    public static boolean isBlockEmpty(BlockPos pos) {
        if (!NONSOLID_BLOCKS.contains(mc.world.getBlockState(pos).getBlock()))
            return false;

        Box box = new Box(pos);
        for (Entity e : mc.world.getEntities()) {
            if (e instanceof LivingEntity && box.intersects(e.getBoundingBox()))
                return false;
        }

        return true;
    }


    public static boolean placeBlock(BlockPos pos, int slot, boolean rotate, boolean rotateBack) {
        if (pos.getY() < 0 || pos.getY() > 255 || !isBlockEmpty(pos))
            return false;

        if (slot != mc.player.inventory.selectedSlot && slot >= 0 && slot <= 8)
            mc.player.inventory.selectedSlot = slot;

        for (Direction d : Direction.values()) {
            if ((d == Direction.DOWN && pos.getY() == 0) || (d == Direction.UP && pos.getY() == 255))
                continue;

            Block neighborBlock = mc.world.getBlockState(pos.offset(d)).getBlock();

            Vec3d vec = new Vec3d(pos.getX() + 0.5 + d.getOffsetX() * 0.5,
                    pos.getY() + 0.5 + d.getOffsetY() * 0.5,
                    pos.getZ() + 0.5 + d.getOffsetZ() * 0.5);

            if (NONSOLID_BLOCKS.contains(neighborBlock)
                    || mc.player.getPos().add(0, mc.player.getEyeHeight(mc.player.getPose()), 0).distanceTo(vec) > 4.55)
                continue;

            float[] rot = new float[] { mc.player.yaw, mc.player.pitch };

            if (rotate)
                facePosPacket(vec.x, vec.y, vec.z);
            if (RIGHTCLICKABLE_BLOCKS.contains(neighborBlock))
                mc.player.networkHandler.sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.PRESS_SHIFT_KEY));

            mc.interactionManager.interactBlock(
                    mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(Vec3d.of(pos), d.getOpposite(), pos.offset(d), false));

            if (RIGHTCLICKABLE_BLOCKS.contains(neighborBlock))
                mc.player.networkHandler.sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.RELEASE_SHIFT_KEY));
            if (rotateBack)
                mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookOnly(rot[0], rot[1], mc.player.isOnGround()));
            return true;
        }
        return false;
    }

    public enum FacingDirection
    {
        North,
        South,
        East,
        West,
        SouthEast,
        SouthWest,
        NorthWest,
        NorthEast,
    }

    public static FacingDirection GetFacing()
    {
        switch (MathHelper.floor((double) (mc.player.yaw * 8.0F / 360.0F) + 0.5D) & 7)
        {
            case 0:
            case 1:
                return FacingDirection.South;
            case 2:
            case 3:
                return FacingDirection.West;
            case 4:
            case 5:
                return FacingDirection.North;
            case 6:
            case 7:
                return FacingDirection.East;
            case 8:
        }
        return FacingDirection.North;
    }

    public enum highways {
        XP, XN, ZP, ZN, XPZP, XNZP, XPZN, XNZN
    }

    public static highways determineHighway() {
        MinecraftClient mc = MinecraftClient.getInstance();
        PlayerEntity player = mc.player;
        highways highwayNum = highways.XP;
        if (player.getX() >= 100) {
            if (player.getZ() >= -5 && player.getZ() <= 5) {
                //+X highway
                highwayNum = highways.XP;
            }
            else if (player.getZ() - player.getX() >= -50 && player.getZ() - player.getX() <= 50) {
                //+X+Z highway
                highwayNum = highways.XPZP;
            }
            else if (player.getZ() + player.getX() >= -50 && player.getZ() + player.getX() <= 50) {
                //+X-Z highway
                highwayNum = highways.XPZN;
            }
        }
        else if (player.getX() <= -100) {
            if (player.getZ() >= -5 && player.getZ() <= 5) {
                //-X highway
                highwayNum = highways.XN;
            }
            else if (player.getX() + player.getZ() >= -50 && player.getX() + player.getZ() <= 50) {
                //-X+Z highway
                highwayNum = highways.XNZP;
            }
            else if (player.getZ() <= player.getX() + 100 && player.getZ() >= player.getX() - 100) {
                //-X-Z highway
                highwayNum = highways.XNZN;
            }
        }
        else if (player.getZ() >= 100) {
            if (player.getX() >= -5 && player.getX() <= 5) {
                //+Z highway
                highwayNum = highways.ZP;
            }
        }
        else if (player.getZ() <= -100) {
            if (player.getX() >= -5 && player.getX() <= 5) {
                //-Z highway
                highwayNum = highways.ZN;
            }
        }
        return highwayNum;
    }

    public static boolean isAnimal(Entity e) {
        return e instanceof PassiveEntity || e instanceof AmbientEntity || e instanceof WaterCreatureEntity || e instanceof GolemEntity;
    }

    public static void facePosAuto(double x, double y, double z, boolean sr) {
        if (sr) {
            facePosPacket(x, y, z);
        }
        else {
            facePos(x, y, z);
        }
    }

    public static void facePosPacket(double x, double y, double z) {
        double diffX = x - mc.player.getX();
        double diffY = y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));
        double diffZ = z - mc.player.getZ();
        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);
        float yaw = (float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90F;
        float pitch = (float) -Math.toDegrees(Math.atan2(diffY, diffXZ));
        mc.player.networkHandler.sendPacket(
                new PlayerMoveC2SPacket.LookOnly(
                        mc.player.yaw + MathHelper.wrapDegrees(yaw - mc.player.yaw),
                        mc.player.pitch + MathHelper.wrapDegrees(pitch - mc.player.pitch), mc.player.isOnGround()));
    }

    public static int getPitchNeeded(double x, double y, double z) {
        double diffX = x - mc.player.getX();
        double diffY = y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));
        double diffZ = z - mc.player.getZ();
        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);
        float pitch = (float) -Math.toDegrees(Math.atan2(diffY, diffXZ));
        return (int) (mc.player.pitch + MathHelper.wrapDegrees(pitch - mc.player.pitch));
    }

    public static int getYawNeeded(double x, double z) {
        double diffX = x - mc.player.getX();
        double diffZ = z - mc.player.getZ();
        float yaw = (float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90F;
        return (int) (mc.player.yaw + MathHelper.wrapDegrees(yaw - mc.player.yaw));
    }

    public static void facePos(double x, double y, double z) {
        double diffX = x - mc.player.getX();
        double diffY = y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));
        double diffZ = z - mc.player.getZ();

        double diffXZ = Math.sqrt(diffX * diffX + diffZ * diffZ);

        float yaw = (float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90F;
        float pitch = (float) -Math.toDegrees(Math.atan2(diffY, diffXZ));

        mc.player.yaw += MathHelper.wrapDegrees(yaw - mc.player.yaw);
        mc.player.pitch += MathHelper.wrapDegrees(pitch - mc.player.pitch);
    }

    public static Vec3d prevPos() {
        return new Vec3d(mc.player.prevX, mc.player.prevY, mc.player.prevZ);
    }

    public static Vec3d getInterpPos(float tickDelta) {
        Vec3d prev = prevPos();
        return addVec3d(prev, minusVec3d(mc.player.getPos(), prev).multiply(tickDelta));
    }

    public static Vec3d minusVec3d(Vec3d one, Vec3d two) {
        return addVec3d(one, two.negate());
    }

    public static Vec3d addVec3d(Vec3d one, Vec3d two) {
        return new Vec3d(one.x + two.x, one.y + two.y, one.z + two.z);
    }

    public static Vec3d addVec3d(Vec3d one, double blah) {
        return new Vec3d(one.x + blah, one.y + blah, one.z + blah);
    }

    public static Vec3d vec3dUp(Vec3d one, double blah) {
        return new Vec3d(one.x, one.y + blah, one.z);
    }

    public static Vec3d divVec3d(Vec3d one, double blah) {
        return new Vec3d(one.x / blah, one.y / blah, one.z / blah);
    }

    public static Pair<BlockPos, Direction> getIrreplaceableNeighbor(BlockPos blockPos, World world) {
        if (blockPos == null) return null;
        for (Direction side : Direction.values()) {
            BlockPos neighbor = blockPos.offset(side);
            if (world.getBlockState(neighbor) != null) {
                if (world.getBlockState(neighbor).getMaterial() != null) {
                    if (world.getBlockState(neighbor).getMaterial().isReplaceable()) return new Pair<>(neighbor, side.getOpposite());
                }
            }
        }
        return null;
    }

    public static Vec3d asVec(BlockPos blockPos) {
        return new Vec3d((double) blockPos.getX(), (double) blockPos.getY(), (double) blockPos.getZ());
    }

    public static Vec3d asVec(Vec3i vec3i) {
        return new Vec3d((double) vec3i.getX(), (double) vec3i.getY(), (double) vec3i.getZ());
    }

    public static Vec3d getInterpolatedAmount(Entity entity, double x, double y, double z) {
        return entity.getPos().subtract(entity.prevX, entity.prevY, entity.prevZ).multiply(x, y, z);
    }
    public static Vec3d getInterpolatedAmount(Entity entity, double ticks) {
        return getInterpolatedAmount(entity, ticks, ticks, ticks);
    }
    public static BlockPos toBlockPos(Vec3d vec3d) {
        return new BlockPos(vec3d.x, vec3d.y, vec3d.z);
    }
}

================================================
FILE: src/main/java/chiquita/mineclient/utils/Logger.java
================================================
package chiquita.mineclient.utils;

import net.minecraft.client.MinecraftClient;
import net.minecraft.text.LiteralText;
import net.minecraft.util.Formatting;

import javax.imageio.ImageIO;
import java.awt.*;
import java.io.IOException;

public class Logger {
    public static void chatMessage(String s) {
        try {
            MinecraftClient.getInstance().inGameHud.getChatHud()
                    .addMessage(new LiteralText(Text(Formatting.DARK_RED) + "" + s));
        } catch (Exception e) {
            System.out.println("[MineClient] INFO: " + s);
        }
    }

    private static String Text(Formatting color) {
        return color + "[MineClient] \u00A7f";
    }

}


================================================
FILE: src/main/java/chiquita/mineclient/utils/Timer.java
================================================
package chiquita.mineclient.utils;

public final class Timer
{
    private long time;

    public Timer()
    {
        time = -1;
    }

    public boolean passed(double ms)
    {
        return System.currentTimeMillis() - this.time >= ms;
    }

    public void reset()
    {
        this.time = System.currentTimeMillis();
    }

    public void resetTimeSkipTo(long p_MS)
    {
        this.time = System.currentTimeMillis() + p_MS;
    }

    public long getTime()
    {
        return time;
    }

    public void setTime(long time)
    {
        this.time = time;
    }
}

================================================
FILE: src/main/resources/fabric.mod.json
================================================
{
  "schemaVersion": 1,
  "id": "mineclient",
  "version": "${version}",
  "name": "MineClient",
  "description": "Simple highway mining client",
  "authors": ["ChiquitaV2#3814"],
  "contact": {},
  "license": "MIT",
  "environment": "*",
  "entrypoints": {
    "main": [
      "chiquita.mineclient.Mineclient"
    ]
  },
  "mixins": [
    "mineclient.mixins.json"
  ]
}


================================================
FILE: src/main/resources/mineclient.mixins.json
================================================
{
  "required": true,
  "minVersion": "0.8",
  "package": "chiquita.mineclient.mixin",
  "compatibilityLevel": "JAVA_8",
  "mixins": [
  ],
  "client": [
    "MixinKeyboard",
    "MixinClientPlayerEntity",
    "IKeyBinding"
  ],
  "injectors": {
    "defaultRequire": 0
  }
}
Download .txt
gitextract_j6uquiz7/

├── .gitignore
├── LICENSE
├── README.md
├── build.gradle
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src/
    └── main/
        ├── java/
        │   └── chiquita/
        │       └── mineclient/
        │           ├── Mineclient.java
        │           ├── event/
        │           │   ├── Event.java
        │           │   ├── EventMove.java
        │           │   ├── EventTick.java
        │           │   └── KeyPressEvent.java
        │           ├── mixin/
        │           │   ├── IKeyBinding.java
        │           │   ├── MixinClientPlayerEntity.java
        │           │   └── MixinKeyboard.java
        │           ├── module/
        │           │   ├── Module.java
        │           │   ├── ModuleManager.java
        │           │   └── modules/
        │           │       ├── AutoEat.java
        │           │       ├── AutoSwitcher.java
        │           │       ├── AutoTunnel.java
        │           │       ├── AutoWalk.java
        │           │       ├── HotbarCache.java
        │           │       ├── Nuker.java
        │           │       ├── OffAxisAlarm.java
        │           │       └── Yaw.java
        │           ├── settings/
        │           │   ├── Value.java
        │           │   └── ValueListeners.java
        │           └── utils/
        │               ├── EntityUtils.java
        │               ├── Logger.java
        │               └── Timer.java
        └── resources/
            ├── fabric.mod.json
            └── mineclient.mixins.json
Download .txt
SYMBOL INDEX (146 symbols across 23 files)

FILE: src/main/java/chiquita/mineclient/Mineclient.java
  class Mineclient (line 8) | public class Mineclient implements ModInitializer {
    method onInitialize (line 15) | @Override
    method getModuleManager (line 19) | public static ModuleManager getModuleManager() {

FILE: src/main/java/chiquita/mineclient/event/Event.java
  class Event (line 5) | public class Event extends Cancellable {
    type Era (line 9) | public enum Era {
    method Event (line 14) | public Event(Era Era) {
    method Event (line 18) | public Event() {
    method getEra (line 22) | public Era getEra() {

FILE: src/main/java/chiquita/mineclient/event/EventMove.java
  class EventMove (line 6) | public class EventMove {
    method EventMove (line 10) | public EventMove(MovementType p_Type, Vec3d vec3d_1)

FILE: src/main/java/chiquita/mineclient/event/EventTick.java
  class EventTick (line 3) | public class EventTick extends Event {

FILE: src/main/java/chiquita/mineclient/event/KeyPressEvent.java
  class KeyPressEvent (line 3) | public class KeyPressEvent extends Event {
    method KeyPressEvent (line 7) | public KeyPressEvent(int keyCode, int action)

FILE: src/main/java/chiquita/mineclient/mixin/IKeyBinding.java
  type IKeyBinding (line 8) | @Mixin(KeyBinding.class)
    method getBoundKey (line 11) | @Accessor
    method setPressed (line 13) | @Accessor

FILE: src/main/java/chiquita/mineclient/mixin/MixinClientPlayerEntity.java
  class MixinClientPlayerEntity (line 17) | @Mixin(ClientPlayerEntity.class)
    method MixinClientPlayerEntity (line 20) | public MixinClientPlayerEntity(ClientWorld world, GameProfile profile) {
    method move (line 24) | @Inject(at = @At("HEAD"), method = "move", cancellable = true)
    method tick (line 30) | @Inject(at = @At("RETURN"), method = "tick()V", cancellable = true)

FILE: src/main/java/chiquita/mineclient/mixin/MixinKeyboard.java
  class MixinKeyboard (line 11) | @Mixin(Keyboard.class)
    method onOnKey (line 14) | @Inject(at = @At("HEAD"), method = "onKey(JIIII)V")

FILE: src/main/java/chiquita/mineclient/module/Module.java
  class Module (line 10) | public class Module implements Listenable {
    method Module (line 23) | public Module(String displayName, Category category, boolean doesItHav...
    method toggle (line 30) | public void toggle() {
    type Category (line 36) | public enum Category {
    method setToggled (line 40) | public void setToggled(boolean toggled) {
    method isToggled (line 46) | public boolean isToggled() {
    method onEnable (line 50) | public void onEnable() {
    method onDisable (line 54) | public void onDisable() {
    method getCategory (line 63) | public Category getCategory() {
    method signalValueChange (line 66) | public void signalValueChange(Value value) {
    method signalEnumChange (line 71) | public void signalEnumChange() {
    method getName (line 75) | public String getName() {
    method getSettings (line 79) | public List<Value> getSettings()
    method getBind (line 83) | public int getBind() {
    method toggleNoSave (line 87) | public void toggleNoSave()
    method setBind (line 94) | public void setBind(String bindString) {
    method setBind (line 99) | public void setBind(int bindInt) {
    method onToggle (line 103) | public void onToggle() {}

FILE: src/main/java/chiquita/mineclient/module/ModuleManager.java
  class ModuleManager (line 18) | public class ModuleManager extends Object implements Listenable {
    method init (line 21) | public static void init() {
    method getModules (line 33) | public static List<Module> getModules() {
    method getModule (line 37) | public static Module getModule(Class module) {
    method add (line 45) | public static void add(Module mod) {
    method getModuleList (line 68) | public static final List<Module> getModuleList(Module.Category categor...
    method get (line 80) | public static ModuleManager get() {
    method getModuleByName (line 84) | public static Module getModuleByName(String name) {

FILE: src/main/java/chiquita/mineclient/module/modules/AutoEat.java
  class AutoEat (line 18) | public class AutoEat extends Module {
    method AutoEat (line 30) | public AutoEat() {
    method isValid (line 37) | private boolean isValid(ItemStack stack, int food) {
    method isEating (line 118) | public boolean isEating() {

FILE: src/main/java/chiquita/mineclient/module/modules/AutoSwitcher.java
  class AutoSwitcher (line 17) | public class AutoSwitcher extends Module {
    method AutoSwitcher (line 20) | public AutoSwitcher() {

FILE: src/main/java/chiquita/mineclient/module/modules/AutoTunnel.java
  class AutoTunnel (line 23) | public class AutoTunnel extends Module
    method AutoTunnel (line 28) | public AutoTunnel()
    method PauseAutoWalk (line 150) | public boolean PauseAutoWalk()

FILE: src/main/java/chiquita/mineclient/module/modules/AutoWalk.java
  class AutoWalk (line 16) | public class AutoWalk extends Module {
    method AutoWalk (line 28) | public AutoWalk() {
    method onDisable (line 86) | public void onDisable() {

FILE: src/main/java/chiquita/mineclient/module/modules/HotbarCache.java
  class HotbarCache (line 20) | public class HotbarCache extends Module
    method HotbarCache (line 29) | public HotbarCache()
    method onEnable (line 40) | @Override
    method toggleNoSave (line 55) | @Override
    method switchSlotIfNeed (line 86) | private boolean switchSlotIfNeed(int targetSlot) {
    method refillSlotIfNeed (line 112) | private boolean refillSlotIfNeed(int targetSlot) {
    method canItemBeMergedWith (line 144) | private boolean canItemBeMergedWith(ItemStack source, ItemStack target) {
    method getItemSlot (line 148) | public static int getItemSlot(Item input) {

FILE: src/main/java/chiquita/mineclient/module/modules/Nuker.java
  class Nuker (line 23) | public class Nuker extends Module {
    method Nuker (line 28) | public Nuker() {
    method getBlocks (line 34) | private List<BlockPos> getBlocks() {
    method canSeeBlock (line 46) | public boolean canSeeBlock(BlockPos pos) {
    method getCube (line 102) | public List<BlockPos> getCube() {
    method get2x3 (line 174) | public List<BlockPos> get2x3() {

FILE: src/main/java/chiquita/mineclient/module/modules/OffAxisAlarm.java
  class OffAxisAlarm (line 14) | public class OffAxisAlarm extends Module {
    method OffAxisAlarm (line 15) | public OffAxisAlarm() {

FILE: src/main/java/chiquita/mineclient/module/modules/Yaw.java
  class Yaw (line 15) | public class Yaw extends Module {
    method Yaw (line 30) | public Yaw() {
    method snap (line 71) | public void snap() {

FILE: src/main/java/chiquita/mineclient/settings/Value.java
  class Value (line 5) | public class Value<T>
    method Value (line 22) | public Value(String name, String[] alias, String desc)
    method Value (line 29) | public Value(String name, String[] alias, String desc, T value)
    method Value (line 35) | public Value(String name, String[] alias, String desc, T value, T min,...
    method Value (line 44) | public Value(String name, String[] alias, String desc, T[] modes) {
    method clamp (line 49) | public <T> T clamp(T value, T min, T max)
    method getValue (line 54) | public T getValue()
    method getDecimals (line 59) | public int getDecimals() {
    method setValue (line 63) | public void setValue(T value)
    method getNextEnumValue (line 81) | public String getNextEnumValue(boolean reverse)
    method getEnum (line 101) | public int getEnum(String input)
    method getEnumReal (line 114) | public Enum getEnumReal(String input)
    method setEnumValue (line 127) | public void setEnumValue(String value)
    method getMin (line 142) | public T getMin()
    method setMin (line 147) | public void setMin(T min)
    method getMax (line 152) | public T getMax()
    method setMax (line 157) | public void setMax(T max)
    method getInc (line 162) | public T getInc()
    method setInc (line 167) | public void setInc(T inc)
    method getName (line 172) | public String getName()
    method setName (line 177) | public void setName(String name)
    method getAlias (line 182) | public String[] getAlias()
    method setAlias (line 187) | public void setAlias(String[] alias)
    method getList (line 192) | public T[] getList() {
    method getDesc (line 196) | public String getDesc()
    method setDesc (line 201) | public void setDesc(String desc)
    method SetListener (line 206) | public void SetListener(ValueListeners valueListeners)
    method initializeMod (line 211) | public void initializeMod(Module mod)
    method setForcedValue (line 216) | public void setForcedValue(T value)

FILE: src/main/java/chiquita/mineclient/settings/ValueListeners.java
  type ValueListeners (line 3) | public interface ValueListeners
    method onValueChange (line 5) | public void onValueChange(final Value value);

FILE: src/main/java/chiquita/mineclient/utils/EntityUtils.java
  class EntityUtils (line 24) | public class EntityUtils {
    method isBlockEmpty (line 61) | public static boolean isBlockEmpty(BlockPos pos) {
    method placeBlock (line 75) | public static boolean placeBlock(BlockPos pos, int slot, boolean rotat...
    type FacingDirection (line 115) | public enum FacingDirection
    method GetFacing (line 127) | public static FacingDirection GetFacing()
    type highways (line 148) | public enum highways {
    method determineHighway (line 152) | public static highways determineHighway() {
    method isAnimal (line 199) | public static boolean isAnimal(Entity e) {
    method facePosAuto (line 203) | public static void facePosAuto(double x, double y, double z, boolean s...
    method facePosPacket (line 212) | public static void facePosPacket(double x, double y, double z) {
    method getPitchNeeded (line 225) | public static int getPitchNeeded(double x, double y, double z) {
    method getYawNeeded (line 234) | public static int getYawNeeded(double x, double z) {
    method facePos (line 241) | public static void facePos(double x, double y, double z) {
    method prevPos (line 255) | public static Vec3d prevPos() {
    method getInterpPos (line 259) | public static Vec3d getInterpPos(float tickDelta) {
    method minusVec3d (line 264) | public static Vec3d minusVec3d(Vec3d one, Vec3d two) {
    method addVec3d (line 268) | public static Vec3d addVec3d(Vec3d one, Vec3d two) {
    method addVec3d (line 272) | public static Vec3d addVec3d(Vec3d one, double blah) {
    method vec3dUp (line 276) | public static Vec3d vec3dUp(Vec3d one, double blah) {
    method divVec3d (line 280) | public static Vec3d divVec3d(Vec3d one, double blah) {
    method getIrreplaceableNeighbor (line 284) | public static Pair<BlockPos, Direction> getIrreplaceableNeighbor(Block...
    method asVec (line 297) | public static Vec3d asVec(BlockPos blockPos) {
    method asVec (line 301) | public static Vec3d asVec(Vec3i vec3i) {
    method getInterpolatedAmount (line 305) | public static Vec3d getInterpolatedAmount(Entity entity, double x, dou...
    method getInterpolatedAmount (line 308) | public static Vec3d getInterpolatedAmount(Entity entity, double ticks) {
    method toBlockPos (line 311) | public static BlockPos toBlockPos(Vec3d vec3d) {

FILE: src/main/java/chiquita/mineclient/utils/Logger.java
  class Logger (line 11) | public class Logger {
    method chatMessage (line 12) | public static void chatMessage(String s) {
    method Text (line 21) | private static String Text(Formatting color) {

FILE: src/main/java/chiquita/mineclient/utils/Timer.java
  class Timer (line 3) | public final class Timer
    method Timer (line 7) | public Timer()
    method passed (line 12) | public boolean passed(double ms)
    method reset (line 17) | public void reset()
    method resetTimeSkipTo (line 22) | public void resetTimeSkipTo(long p_MS)
    method getTime (line 27) | public long getTime()
    method setTime (line 32) | public void setTime(long time)
Condensed preview — 35 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (90K chars).
[
  {
    "path": ".gitignore",
    "chars": 1637,
    "preview": "# 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 plug"
  },
  {
    "path": "LICENSE",
    "chars": 1067,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2021 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
  },
  {
    "path": "README.md",
    "chars": 476,
    "preview": "# MineClient 1.16.4 \n[![discord](https://img.shields.io/badge/Discord-h8EQyuYTK7-9080c2)](https://discord.gg/h8EQyuYTK7)"
  },
  {
    "path": "build.gradle",
    "chars": 2621,
    "preview": "plugins {\n    id 'fabric-loom' version '0.6-SNAPSHOT'\n    id 'maven-publish'\n}\nallprojects {\n    repositories {\n        "
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 202,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "gradle.properties",
    "chars": 316,
    "preview": "# Done to increase the memory available to gradle.\norg.gradle.jvmargs=-Xmx1G\n# Fabric Properties\n# check these on https:"
  },
  {
    "path": "gradlew",
    "chars": 5770,
    "preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "gradlew.bat",
    "chars": 2954,
    "preview": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \""
  },
  {
    "path": "settings.gradle",
    "chars": 195,
    "preview": "pluginManagement {\n    repositories {\n        jcenter()\n        maven {\n            name = 'Fabric'\n            url = 'h"
  },
  {
    "path": "src/main/java/chiquita/mineclient/Mineclient.java",
    "chars": 661,
    "preview": "package chiquita.mineclient;\n\nimport chiquita.mineclient.module.ModuleManager;\nimport me.zero.alpine.bus.EventBus;\nimpor"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/Event.java",
    "chars": 348,
    "preview": "package chiquita.mineclient.event;\n\nimport me.zero.alpine.event.type.Cancellable;\n\npublic class Event extends Cancellabl"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/EventMove.java",
    "chars": 325,
    "preview": "package chiquita.mineclient.event;\n\nimport net.minecraft.entity.MovementType;\nimport net.minecraft.util.math.Vec3d;\n\npub"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/EventTick.java",
    "chars": 76,
    "preview": "package chiquita.mineclient.event;\n\npublic class EventTick extends Event {\n}"
  },
  {
    "path": "src/main/java/chiquita/mineclient/event/KeyPressEvent.java",
    "chars": 266,
    "preview": "package chiquita.mineclient.event;\n\npublic class KeyPressEvent extends Event {\n    public final int keyCode;\n    public "
  },
  {
    "path": "src/main/java/chiquita/mineclient/mixin/IKeyBinding.java",
    "chars": 378,
    "preview": "package chiquita.mineclient.mixin;\n\nimport net.minecraft.client.options.KeyBinding;\nimport net.minecraft.client.util.Inp"
  },
  {
    "path": "src/main/java/chiquita/mineclient/mixin/MixinClientPlayerEntity.java",
    "chars": 1417,
    "preview": "package chiquita.mineclient.mixin;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.event.EventMove;\ni"
  },
  {
    "path": "src/main/java/chiquita/mineclient/mixin/MixinKeyboard.java",
    "chars": 743,
    "preview": "package chiquita.mineclient.mixin;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.event.KeyPressEven"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/Module.java",
    "chars": 2230,
    "preview": "package chiquita.mineclient.module;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.settings.Value;\ni"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/ModuleManager.java",
    "chars": 2977,
    "preview": "package chiquita.mineclient.module;\n\nimport chiquita.mineclient.Mineclient;\nimport chiquita.mineclient.event.KeyPressEve"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoEat.java",
    "chars": 5160,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.mixi"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoSwitcher.java",
    "chars": 1783,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.modu"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoTunnel.java",
    "chars": 6152,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventMove;\nimport chiquita.mineclient.modu"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/AutoWalk.java",
    "chars": 3875,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.modu"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/HotbarCache.java",
    "chars": 5370,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.modu"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/Nuker.java",
    "chars": 10391,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.modu"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/OffAxisAlarm.java",
    "chars": 2935,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.modu"
  },
  {
    "path": "src/main/java/chiquita/mineclient/module/modules/Yaw.java",
    "chars": 3265,
    "preview": "package chiquita.mineclient.module.modules;\n\nimport chiquita.mineclient.event.EventTick;\nimport chiquita.mineclient.modu"
  },
  {
    "path": "src/main/java/chiquita/mineclient/settings/Value.java",
    "chars": 5053,
    "preview": "package chiquita.mineclient.settings;\n\nimport chiquita.mineclient.module.Module;\n\npublic class Value<T>\n{\n\n    private S"
  },
  {
    "path": "src/main/java/chiquita/mineclient/settings/ValueListeners.java",
    "chars": 125,
    "preview": "package chiquita.mineclient.settings;\n\npublic interface ValueListeners\n{\n    public void onValueChange(final Value value"
  },
  {
    "path": "src/main/java/chiquita/mineclient/utils/EntityUtils.java",
    "chars": 13406,
    "preview": "package chiquita.mineclient.utils;\n\nimport net.minecraft.block.Block;\nimport net.minecraft.block.Blocks;\nimport net.mine"
  },
  {
    "path": "src/main/java/chiquita/mineclient/utils/Logger.java",
    "chars": 686,
    "preview": "package chiquita.mineclient.utils;\n\nimport net.minecraft.client.MinecraftClient;\nimport net.minecraft.text.LiteralText;\n"
  },
  {
    "path": "src/main/java/chiquita/mineclient/utils/Timer.java",
    "chars": 579,
    "preview": "package chiquita.mineclient.utils;\n\npublic final class Timer\n{\n    private long time;\n\n    public Timer()\n    {\n        "
  },
  {
    "path": "src/main/resources/fabric.mod.json",
    "chars": 371,
    "preview": "{\n  \"schemaVersion\": 1,\n  \"id\": \"mineclient\",\n  \"version\": \"${version}\",\n  \"name\": \"MineClient\",\n  \"description\": \"Simpl"
  },
  {
    "path": "src/main/resources/mineclient.mixins.json",
    "chars": 276,
    "preview": "{\n  \"required\": true,\n  \"minVersion\": \"0.8\",\n  \"package\": \"chiquita.mineclient.mixin\",\n  \"compatibilityLevel\": \"JAVA_8\","
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the ChiquitaV2/MineClient GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 35 files (82.1 KB), approximately 20.8k tokens, and a symbol index with 146 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!