Skip to content

Commit

Permalink
Fixed TerminalSolver crash
Browse files Browse the repository at this point in the history
  • Loading branch information
odtheking committed Dec 9, 2024
1 parent 375f220 commit a07e17d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 36 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ allprojects {
}

loom {
log4jConfigs.from(file("log4j2.xml"))
forge.pack200Provider.set(Pack200Adapter())
}

Expand Down
1 change: 0 additions & 1 deletion odin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies {
}

loom {
log4jConfigs.from(file("log4j2.xml"))
runConfigs {
getByName("client") {
programArgs("--tweakClass", "gg.essential.loader.stage0.EssentialSetupTweaker")
Expand Down
15 changes: 0 additions & 15 deletions odin/log4j2.xml

This file was deleted.

1 change: 0 additions & 1 deletion odinclient/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies {
}

loom {
log4jConfigs.from(file("log4j2.xml"))
runConfigs {
getByName("client") {
programArgs("--tweakClass", "gg.essential.loader.stage0.EssentialSetupTweaker")
Expand Down
15 changes: 0 additions & 15 deletions odinclient/log4j2.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package me.odinmain.features.impl.floor7.p3

import io.github.moulberry.notenoughupdates.NEUApi
import me.odinmain.events.impl.*
import me.odinmain.events.impl.GuiEvent
import me.odinmain.events.impl.TerminalEvent
import me.odinmain.features.Category
import me.odinmain.features.Module
import me.odinmain.features.impl.floor7.p3.termGUI.CustomTermGui
Expand All @@ -13,7 +14,10 @@ import me.odinmain.ui.clickgui.util.ColorUtil.withAlpha
import me.odinmain.ui.util.MouseUtils
import me.odinmain.utils.equalsOneOf
import me.odinmain.utils.postAndCatch
import me.odinmain.utils.render.*
import me.odinmain.utils.render.Color
import me.odinmain.utils.render.getMCTextWidth
import me.odinmain.utils.render.mcText
import me.odinmain.utils.render.translate
import me.odinmain.utils.skyblock.PlayerUtils
import me.odinmain.utils.skyblock.PlayerUtils.windowClick
import me.odinmain.utils.skyblock.modMessage
Expand All @@ -24,7 +28,9 @@ import net.minecraft.client.renderer.GlStateManager
import net.minecraft.entity.player.InventoryPlayer
import net.minecraft.inventory.ContainerChest
import net.minecraft.inventory.ContainerPlayer
import net.minecraft.item.*
import net.minecraft.item.EnumDyeColor
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
import net.minecraft.network.play.server.S2FPacketSetSlot
import net.minecraftforge.client.event.GuiScreenEvent
import net.minecraftforge.event.entity.player.ItemTooltipEvent
Expand Down Expand Up @@ -249,7 +255,7 @@ object TerminalSolver : Module(
@SubscribeEvent
fun onGuiKeyPress(event: GuiScreenEvent.KeyboardInputEvent.Pre) {
if (!enabled || currentTerm.type == TerminalTypes.NONE || (currentTerm.type == TerminalTypes.MELODY && cancelMelodySolver)) return
if (renderType == 3 && (Keyboard.isKeyDown(mc.gameSettings.keyBindDrop.keyCode) || Keyboard.getEventKey() in 2..10)) {
if (renderType == 3 && (Keyboard.isKeyDown(mc.gameSettings.keyBindDrop.keyCode) || (Keyboard.getEventKey() in 2..10 && Keyboard.getEventKey() < Keyboard.KEYBOARD_SIZE))) {
CustomTermGui.mouseClicked(MouseUtils.mouseX.toInt(), MouseUtils.mouseY.toInt(), if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && Keyboard.isKeyDown(mc.gameSettings.keyBindDrop.keyCode)) 1 else 0)
event.isCanceled = true
}
Expand Down

0 comments on commit a07e17d

Please sign in to comment.