diff options
author | Sychic <47618543+Sychic@users.noreply.github.com> | 2021-01-24 20:51:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-24 20:51:43 -0500 |
commit | 4dc1637bc48cb615729eb675b0c9a1cbcddb4e1e (patch) | |
tree | a978b7edbaaa121278d83e96504f00e9c97c9f86 /src/main/java/me | |
parent | 1d7a5d903a91c87291b5b13d275465e6d00fc13f (diff) | |
parent | 9838bc712ff8c4614a658b1bde4dae913f03541f (diff) | |
download | SkyblockMod-4dc1637bc48cb615729eb675b0c9a1cbcddb4e1e.tar.gz SkyblockMod-4dc1637bc48cb615729eb675b0c9a1cbcddb4e1e.tar.bz2 SkyblockMod-4dc1637bc48cb615729eb675b0c9a1cbcddb4e1e.zip |
Merge branch 'development' into Reparty
Diffstat (limited to 'src/main/java/me')
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 8 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/RepartyCommand.java | 38 |
2 files changed, 19 insertions, 27 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 019ffe6..53b42af 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -64,7 +64,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; import org.apache.commons.lang3.time.StopWatch; -import org.apache.logging.log4j.Logger; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; @@ -81,7 +80,6 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; public static final String VERSION = "1.8.5-beta8"; - public static Logger DSMLogger; static double checkItemsNow = 0; static double itemsChecked = 0; public static Map<String, String> t6Enchants = new HashMap<>(); @@ -111,9 +109,8 @@ public class DankersSkyblockMod { public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); public static final ResourceLocation BONZO_ICON = new ResourceLocation("dsm", "icons/bonzo.png"); - public static final ResourceLocation LOGO = new ResourceLocation("dsm", "icons/dsm.png"); - static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", "The reward isn't in any of our chests", "Both of them are telling the truth."}; static Map<String, String[]> triviaSolutions = new HashMap<>(); @@ -289,7 +286,6 @@ public class DankersSkyblockMod { @EventHandler public void preInit(final FMLPreInitializationEvent event) { - DSMLogger = event.getModLog(); ClientCommandHandler.instance.registerCommand(new ToggleCommand()); ClientCommandHandler.instance.registerCommand(new SetkeyCommand()); ClientCommandHandler.instance.registerCommand(new GetkeyCommand()); @@ -787,7 +783,7 @@ public class DankersSkyblockMod { return; } } - + if (ToggleCommand.oruoToggled && Utils.inDungeons) { if (message.contains("What SkyBlock year is it?")) { double currentTime = System.currentTimeMillis() /1000L; diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index d436f90..4dc730a 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -1,9 +1,9 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; +import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.gui.GuiNewChat; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; @@ -13,7 +13,6 @@ import net.minecraft.util.*; import net.minecraft.util.ChatComponentText; import net.minecraftforge.client.event.*; import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.ObfuscationReflectionHelper; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -97,23 +96,21 @@ public class RepartyCommand extends CommandBase implements ICommand { repartyFailList.clear(); // MULTI THREAD DRIFTING - partyThread = new Thread(() -> { + new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - - + try { - player.sendChatMessage("/pl"); - gettingParty = true; - while (gettingParty) { - Thread.sleep(10); - } - if (party.size() == 0) return; + Thread.sleep(210); + player.sendChatMessage("/p list"); + System.out.println("Grabbing the party members..."); + Thread.sleep(550); + if (RepartyCommand.party.size() == 0) return; + player.sendChatMessage("/p disband"); disbanding = true; while (disbanding) { Thread.sleep(10); } -// player.sendChatMessage("/p " + String.join(" ", party)); String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, RepartyCommand.party); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + @@ -128,22 +125,21 @@ public class RepartyCommand extends CommandBase implements ICommand { } Thread.sleep(100); } -// inviting = true; while (inviting) { Thread.sleep(10); } - if (repartyFailList.size() > 0) { - String repartyFails = String.join("\n- " + EnumChatFormatting.RED, repartyFailList); + + if (RepartyCommand.repartyFailList.size() > 0) { + Thread.sleep(300); + String failedMembers = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, RepartyCommand.repartyFailList); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Failed to invite:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.RED + repartyFails + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); + DankersSkyblockMod.ERROR_COLOUR + "Unable to Invite:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.GOLD + failedMembers + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); } } catch (InterruptedException e) { e.printStackTrace(); } - }); - - partyThread.start(); + }).start(); } }
\ No newline at end of file |