Skip to content

Commit

Permalink
Release 1.6.6
Browse files Browse the repository at this point in the history
Minion Aura
  • Loading branch information
JackTYM committed Jun 11, 2022
1 parent bbd1b04 commit 1b656a9
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id "net.minecraftforge.gradle.forge" version "6f53277"
}

version = "1.6.5-release"
version = "1.6.6-release"
group = "me.jacktym.aiom"

compileJava.options.encoding = 'UTF-8'
Expand Down
2 changes: 1 addition & 1 deletion currentVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.5
1.6.6
2 changes: 1 addition & 1 deletion src/main/java/me/jacktym/aiomacro/NGGlobal.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public class NGGlobal {

public static final String MOD_ID = "AIOM";
public static final String MOD_NAME = "All-In-One Macro";
public static final String VERSION = "Release v1.6.5";
public static final String VERSION = "Release v1.6.6";

public static final String NG_CLIENT_PROXY = "me.jacktym.aiomacro.proxy.ClientProxy";
public static final String NG_COMMON_PROXY = "me.jacktym.aiomacro.proxy.CommonProxy";
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/me/jacktym/aiomacro/macros/MacroHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public static void toggleMacro() {
SetPlayerLook.toggled = true;
} else if (AIOMVigilanceConfig.macroType == 3) {
Main.mcPlayer.sendChatMessage("/bz");
} else if (AIOMVigilanceConfig.macroType == 6) {
MinionAura.recentClickedEntity = null;
MinionAura.minionsToClaim.clear();
MinionAura.claimedMinions.clear();
}
Main.sendMarkedChatMessage("Macro Enabled!");
} else if (isMacroOn) {
Expand Down
47 changes: 43 additions & 4 deletions src/main/java/me/jacktym/aiomacro/macros/MinionAura.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@
import me.jacktym.aiomacro.Main;
import me.jacktym.aiomacro.config.AIOMVigilanceConfig;
import me.jacktym.aiomacro.util.Utils;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;

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

public class MinionAura {

public static List<Entity> claimedMinions = new ArrayList<>();
public static List<Entity> minionsToClaim = new ArrayList<>();
public static Entity recentClickedEntity;

@SubscribeEvent
public void tickEvent(TickEvent.ClientTickEvent event) {
if (Main.mcWorld != null && Main.mcPlayer != null && AIOMVigilanceConfig.macroType == 6 && MacroHandler.isMacroOn) {
Expand All @@ -21,12 +30,42 @@ public void tickEvent(TickEvent.ClientTickEvent event) {
if (!entityList.isEmpty()) {
for (Entity entity : entityList) {
if (entity instanceof EntityArmorStand) {
System.out.println(Utils.stripColor(entity.getDisplayName().getUnformattedText()));
ItemStack chestStack = ((EntityArmorStand) entity).getCurrentArmor(4);
ItemStack chestStack = ((EntityArmorStand) entity).getCurrentArmor(1);

if (chestStack != null) {
System.out.println(chestStack.getItem().toString());
//NBTTagCompound nbtTagCompound = chestStack.getSubCompound("SkullOwner", false);
if (chestStack.getDisplayName().equals("Leather Pants") && !minionsToClaim.contains(entity) && !claimedMinions.contains(entity)) {
minionsToClaim.add(entity);
}
}
}
}
}

for (Entity entity : minionsToClaim) {
if (Main.mc.currentScreen == null) {
Utils.useEntity(entity);
recentClickedEntity = entity;
}
}
}
}

@SubscribeEvent
public void guiScreenEvent(GuiScreenEvent event) {
if (event.gui instanceof GuiChest && AIOMVigilanceConfig.macroType == 6 && MacroHandler.isMacroOn && recentClickedEntity != null) {
IInventory chest = ((ContainerChest) (((GuiChest) event.gui).inventorySlots)).getLowerChestInventory();

String chestName = chest.getDisplayName().getUnformattedText();

if (chestName.contains("Minion")) {
if (chest.getStackInSlot(48) != null && chest.getStackInSlot(48).getDisplayName() != null) {
if (Utils.stripColor(chest.getStackInSlot(48).getDisplayName()).equals("Collect All")) {
Main.mc.playerController.windowClick(Main.mcPlayer.openContainer.windowId, 48, 0, 0, Main.mcPlayer);
if (chest.getStackInSlot(21) == null) {
Main.mcPlayer.closeScreen();
minionsToClaim.remove(recentClickedEntity);
claimedMinions.add(recentClickedEntity);
recentClickedEntity = null;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "aiom",
"name": "All-In-One Macro",
"description": "An all-in-one macro for Hypixel Skyblock!",
"version": "1.6.5-release",
"version": "1.6.6-release",
"mcversion": "1.8.9",
"url": "",
"updateUrl": "",
Expand Down

0 comments on commit 1b656a9

Please sign in to comment.