From 98c964c6350b1cae9cee47d53e21026125893f05 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 5 Dec 2020 20:38:44 -0500 Subject: Block clicks during chronomatron remember the puzzle --- src/main/java/me/Danker/DankersSkyblockMod.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/me/Danker/DankersSkyblockMod.java') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 95f2099..2aa6425 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2883,6 +2883,8 @@ public class DankersSkyblockMod if (ToggleCommand.chronomatronToggled && inventoryName.startsWith("Chronomatron (")) { if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a") && (item == null || item.getItem() == Item.getItemFromBlock(Blocks.stained_glass) || item.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay))) { chronomatronMouseClicks++; + } else if(inventory.getStackInSlot(49).getDisplayName().startsWith("§aRemember the pattern!")) { + if(event.isCancelable()) event.setCanceled(true); } } -- cgit From 91127a0be9b7e6cb2bdc30994a4092026e8bbcae Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 5 Dec 2020 20:53:07 -0500 Subject: Block clicking the wrong sequence in chronomation --- src/main/java/me/Danker/DankersSkyblockMod.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/me/Danker/DankersSkyblockMod.java') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 2aa6425..4a8722f 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2882,9 +2882,14 @@ public class DankersSkyblockMod if (ToggleCommand.chronomatronToggled && inventoryName.startsWith("Chronomatron (")) { if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a") && (item == null || item.getItem() == Item.getItemFromBlock(Blocks.stained_glass) || item.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay))) { + if(!item.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + if(event.isCancelable()) event.setCanceled(true); + return; + } chronomatronMouseClicks++; } else if(inventory.getStackInSlot(49).getDisplayName().startsWith("§aRemember the pattern!")) { if(event.isCancelable()) event.setCanceled(true); + return; } } -- cgit From e2e3ce5f8b69323eecea630fb56ae34a3e82aa07 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 5 Dec 2020 20:57:42 -0500 Subject: Add manual override override blocking clicks on chronomatron if shift is held down. --- src/main/java/me/Danker/DankersSkyblockMod.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/me/Danker/DankersSkyblockMod.java') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 4a8722f..f609bc8 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -1,7 +1,6 @@ package me.Danker; import com.google.gson.JsonObject; -import com.mojang.realmsclient.util.RealmsUtil; import me.Danker.commands.*; import me.Danker.gui.*; import me.Danker.handlers.*; @@ -14,7 +13,6 @@ import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.inventory.GuiChest; -import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItemFrame; @@ -2883,7 +2881,7 @@ public class DankersSkyblockMod if (ToggleCommand.chronomatronToggled && inventoryName.startsWith("Chronomatron (")) { if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a") && (item == null || item.getItem() == Item.getItemFromBlock(Blocks.stained_glass) || item.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay))) { if(!item.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - if(event.isCancelable()) event.setCanceled(true); + if(event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && !Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) event.setCanceled(true); return; } chronomatronMouseClicks++; -- cgit