1
0
mirror of https://github.com/kami-blue/client synced 2025-02-23 00:36:48 +00:00

added elytraflight check to elytrareplace

This commit is contained in:
Bella 2020-04-12 09:06:31 -04:00
parent 903061276b
commit 15291b44ba
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3

View File

@ -8,6 +8,8 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.init.Items;
import net.minecraft.inventory.ClickType;
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
/**
* Created by Dewy on the 4th of April, 2020
*/
@ -15,6 +17,7 @@ import net.minecraft.inventory.ClickType;
@Module.Info(name = "ElytraReplace", description = "Automatically swap and replace your chestplate and elytra. Not an AFK tool, be warned.", category = Module.Category.MOVEMENT)
public class ElytraReplace extends Module {
private Setting<InventoryMode> inventoryMode = register(Settings.e("Inventoryable", InventoryMode.ON));
private Setting<Boolean> elytraFlightCheck = register(Settings.b("ElytraFlight Check", true));
private boolean currentlyMovingElytra = false;
private boolean currentlyMovingChestplate = false;
@ -87,7 +90,7 @@ public class ElytraReplace extends Module {
}
}
if (!onGround()) {
if (!onGround() && passElytraFlightCheck()) {
int slot = -420;
if (elytraCount == 0) {
@ -133,4 +136,10 @@ public class ElytraReplace extends Module {
private boolean onGround() {
return mc.player.onGround;
}
private boolean passElytraFlightCheck() {
if (elytraFlightCheck.getValue() && MODULE_MANAGER.isModuleEnabled(ElytraFlight.class)) {
return true;
} else return !elytraFlightCheck.getValue();
}
}