diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-12-05 21:12:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-05 21:12:14 -0500 |
commit | 9522571686c1c3eaf6cacfee7f7f14336224d635 (patch) | |
tree | 061dafac5c5e140f88d3113fa83c788f21ca30c6 | |
parent | eb87255d5a52e512aa8a26a2f4d9257eed935a02 (diff) | |
parent | e2e3ce5f8b69323eecea630fb56ae34a3e82aa07 (diff) | |
download | SkyblockMod-9522571686c1c3eaf6cacfee7f7f14336224d635.tar.gz SkyblockMod-9522571686c1c3eaf6cacfee7f7f14336224d635.tar.bz2 SkyblockMod-9522571686c1c3eaf6cacfee7f7f14336224d635.zip |
Merge pull request #37 from My-Name-Is-Jeff/development
Feature: Auto-Block incorrect chronomatron puzzle solution
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 95f2099..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; @@ -2882,7 +2880,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() && !Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && !Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) event.setCanceled(true); + return; + } chronomatronMouseClicks++; + } else if(inventory.getStackInSlot(49).getDisplayName().startsWith("§aRemember the pattern!")) { + if(event.isCancelable()) event.setCanceled(true); + return; } } |