aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt21
1 files changed, 6 insertions, 15 deletions
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> {