diff options
Diffstat (limited to 'src/main/java/me/Danker/handlers')
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 15 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/PacketHandler.java | 31 |
2 files changed, 0 insertions, 46 deletions
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 04f4ccd..d3b7464 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -219,16 +219,12 @@ public class ConfigHandler { ToggleCommand.splitFishing = initBoolean("toggles", "SplitFishing", true); ToggleCommand.chatMaddoxToggled = initBoolean("toggles", "ChatMaddox", false); ToggleCommand.spiritBearAlerts = initBoolean("toggles", "SpiritBearAlerts", false); - ToggleCommand.aotdToggled = initBoolean("toggles", "AOTD", false); - ToggleCommand.lividDaggerToggled = initBoolean("toggles", "LividDagger", false); - ToggleCommand.shadowFuryToggled = initBoolean("toggles", "Shadow Fury", false); ToggleCommand.petColoursToggled = initBoolean("toggles", "PetColors", false); ToggleCommand.golemAlertToggled = initBoolean("toggles", "GolemAlerts", false); ToggleCommand.expertiseLoreToggled = initBoolean("toggles", "ExpertiseLore", false); ToggleCommand.skill50DisplayToggled = initBoolean("toggles", "Skill50Display", false); ToggleCommand.outlineTextToggled = initBoolean("toggles", "OutlineText", false); ToggleCommand.cakeTimerToggled = initBoolean("toggles", "CakeTimer", false); - ToggleCommand.specialHoeRightClick = initBoolean("toggles", "SpecialHoe", false); ToggleCommand.melodyTooltips = initBoolean("toggles", "MelodyTooltips", false); ToggleCommand.highlightSlayers = initBoolean("toggles", "HighlightSlayers", false); ToggleCommand.highlightArachne = initBoolean("toggles", "HighlightArachne", false); @@ -250,7 +246,6 @@ public class ConfigHandler { ToggleCommand.necronNotificationsToggled = initBoolean("toggles", "NecronNotifications", false); ToggleCommand.bonzoTimerToggled = initBoolean("toggles", "BonzoTimer", false); ToggleCommand.swapToPickBlockToggled = initBoolean("toggles", "PickBlock", false); - ToggleCommand.flowerWeaponsToggled = initBoolean("toggles", "FlowerWeapons", false); ToggleCommand.autoSkillTrackerToggled = initBoolean("toggles", "AutoSkillTracker", false); // Puzzle Solvers ToggleCommand.threeManToggled = initBoolean("toggles", "ThreeManPuzzle", false); @@ -265,8 +260,6 @@ public class ConfigHandler { ToggleCommand.startsWithToggled = initBoolean("toggles", "StartsWithTerminal", false); ToggleCommand.selectAllToggled = initBoolean("toggles", "SelectAllTerminal", false); ToggleCommand.clickInOrderToggled = initBoolean("toggles", "ClickInOrderTerminal", false); - ToggleCommand.blockWrongTerminalClicksToggled = initBoolean("toggles", "BlockWrongTerminalClicks", false); - ToggleCommand.itemFrameOnSeaLanternsToggled = initBoolean("toggles", "IgnoreItemFrameOnSeaLanterns", false); // Experiment Solvers ToggleCommand.ultrasequencerToggled = initBoolean("toggles", "UltraSequencer", false); ToggleCommand.chronomatronToggled = initBoolean("toggles", "Chronomatron", false); @@ -283,14 +276,6 @@ public class ConfigHandler { // API if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); - - // Block Wrong Slayer - if (!hasKey("toggles", "BlockSlayer")) writeStringConfig("toggles", "BlockSlayer", ""); - String onlySlayer = getString("toggles", "BlockSlayer"); - if (!onlySlayer.equals("")) { - BlockWrongSlayer.onlySlayerName = onlySlayer.substring(0, onlySlayer.lastIndexOf(" ")); - BlockWrongSlayer.onlySlayerNumber = onlySlayer.substring(onlySlayer.lastIndexOf(" ") + 1); - } // Wolf LootTracker.wolfSvens = initInt("wolf", "svens", 0); diff --git a/src/main/java/me/Danker/handlers/PacketHandler.java b/src/main/java/me/Danker/handlers/PacketHandler.java index da7900a..a4fd85e 100644 --- a/src/main/java/me/Danker/handlers/PacketHandler.java +++ b/src/main/java/me/Danker/handlers/PacketHandler.java @@ -2,19 +2,10 @@ package me.Danker.handlers; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelPromise; -import me.Danker.commands.ToggleCommand; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityItemFrame; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; import net.minecraft.network.Packet; -import net.minecraft.network.play.client.C02PacketUseEntity; import net.minecraft.network.play.server.S04PacketEntityEquipment; -import net.minecraft.util.BlockPos; import java.lang.reflect.Field; @@ -36,26 +27,4 @@ public class PacketHandler extends ChannelDuplexHandler { super.channelRead(ctx, msg); } - // Ignore item frames with arrows on sea lanterns - @Override - public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { - if (ToggleCommand.itemFrameOnSeaLanternsToggled && Utils.inDungeons && msg instanceof Packet && msg.getClass().getName().endsWith("C02PacketUseEntity")) { - Minecraft mc = Minecraft.getMinecraft(); - C02PacketUseEntity packet = (C02PacketUseEntity) msg; - Entity entityHit = packet.getEntityFromWorld(mc.theWorld); - if (entityHit instanceof EntityItemFrame) { - EntityItemFrame itemFrame = (EntityItemFrame) entityHit; - ItemStack item = itemFrame.getDisplayedItem(); - if (item != null && item.getItem() == Items.arrow) { - BlockPos blockPos = Utils.getBlockUnderItemFrame(itemFrame); - if (mc.theWorld.getBlockState(blockPos).getBlock() == Blocks.sea_lantern) { - return; - } - } - } - } - - super.write(ctx, msg, promise); - } - } |