aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-19 18:02:18 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-19 18:02:18 +0100
commitd9f4ff0347639778b41b00b070e17df115ddbc0f (patch)
tree139f26635fd42d1db1eb745c1e82f830f27fd72c
parentda2e5ba012b8ac45a4181da2641a88462f184849 (diff)
downloadskyhanni-d9f4ff0347639778b41b00b070e17df115ddbc0f.tar.gz
skyhanni-d9f4ff0347639778b41b00b070e17df115ddbc0f.tar.bz2
skyhanni-d9f4ff0347639778b41b00b070e17df115ddbc0f.zip
Fixed icon lightning
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt21
2 files changed, 6 insertions, 26 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt
index 9130a3723..b342fb345 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt
@@ -15,18 +15,7 @@ class RenderGuiData {
fun onRenderOverlay(event: RenderGameOverlayEvent.Pre) {
if (event.type != RenderGameOverlayEvent.ElementType.HOTBAR) return
-// val currentScreen = Minecraft.getMinecraft().currentScreen
-// if (currentScreen != null) {
-// if (currentScreen is GuiInventory || currentScreen is GuiChest) return
-// }
-
- GlStateManager.pushMatrix()
- GlStateManager.translate(0f, 0f, -1f)
- GlStateManager.enableDepth()
-
GuiRenderEvent.GameOverlayRenderEvent().postAndCatch()
-
- GlStateManager.popMatrix()
}
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 388ea8a08..bd0ac8cb0 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -6,7 +6,6 @@ import io.github.moulberry.notenoughupdates.NotEnoughUpdates
import io.github.moulberry.notenoughupdates.recipes.CraftingRecipe
import io.github.moulberry.notenoughupdates.recipes.NeuRecipe
import io.github.moulberry.notenoughupdates.util.ItemResolutionQuery
-import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.client.Minecraft
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.client.renderer.RenderHelper
@@ -71,7 +70,6 @@ object NEUItems {
fun isVanillaItem(item: ItemStack) = manager.auctionManager.isVanillaItem(item.getInternalName())
fun ItemStack.renderOnScreen(x: Float, y: Float, scaleMultiplier: Double = 1.0) {
- GlStateManager.pushMatrix()
val isSkull = item === Items.skull
val baseScale = (if (isSkull) 0.8f else 0.6f)
@@ -88,23 +86,16 @@ object NEUItems {
translateY = y - diff
}
- GlStateManager.translate(translateX, translateY, 0f)
- GlStateManager.scale(finalScale, finalScale, 0.0)
- drawItemStack(this)
- GlStateManager.popMatrix()
- }
+ GlStateManager.pushMatrix();
- private fun drawItemStack(stack: ItemStack) {
- val itemRender = Minecraft.getMinecraft().renderItem
+ GlStateManager.translate(translateX, translateY, 1F)
+ GlStateManager.scale(finalScale, finalScale, 1.0)
- Utils.disableCustomDungColours = true
RenderHelper.enableGUIStandardItemLighting()
- Utils.hasEffectOverride = true
- itemRender.renderItemAndEffectIntoGUI(stack, 0, 0)
- itemRender.renderItemOverlayIntoGUI(Minecraft.getMinecraft().fontRendererObj, stack, 0, 0, null)
- Utils.hasEffectOverride = false
+ Minecraft.getMinecraft().renderItem.renderItemIntoGUI(this, 0, 0)
RenderHelper.disableStandardItemLighting()
- Utils.disableCustomDungColours = false
+
+ GlStateManager.popMatrix()
}
fun getMultiplier(rawId: String, tryCount: Int = 0): Pair<String, Int> {