diff options
author | nea <nea@nea.moe> | 2023-05-05 01:35:04 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-05-05 01:35:04 +0200 |
commit | 229f724ef4a0a4cbc426f31e27f9a57e9b1307c9 (patch) | |
tree | 4c30bb9be6127aeef4136ea4c60fa7cec4ec7ac0 /src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntryRenderer.kt | |
parent | dc4866fe01abf7b33829bbfcd9d266c381c6c6af (diff) | |
download | firmament-229f724ef4a0a4cbc426f31e27f9a57e9b1307c9.tar.gz firmament-229f724ef4a0a4cbc426f31e27f9a57e9b1307c9.tar.bz2 firmament-229f724ef4a0a4cbc426f31e27f9a57e9b1307c9.zip |
Fix clipping
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntryRenderer.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntryRenderer.kt | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntryRenderer.kt b/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntryRenderer.kt index e794039..111aaf7 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntryRenderer.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUItemEntryRenderer.kt @@ -6,9 +6,8 @@ import me.shedaniel.rei.api.client.entry.renderer.EntryRenderer import me.shedaniel.rei.api.client.gui.widgets.Tooltip import me.shedaniel.rei.api.client.gui.widgets.TooltipContext import me.shedaniel.rei.api.common.entry.EntryStack -import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes -import moe.nea.notenoughupdates.rei.NEUReiPlugin.Companion.asItemEntry import net.minecraft.client.util.math.MatrixStack +import moe.nea.notenoughupdates.rei.NEUReiPlugin.Companion.asItemEntry object NEUItemEntryRenderer : EntryRenderer<NEUItem> { override fun render( @@ -19,16 +18,14 @@ object NEUItemEntryRenderer : EntryRenderer<NEUItem> { mouseY: Int, delta: Float ) { - VanillaEntryTypes.ITEM.definition.renderer - .render( - entry.asItemEntry(), - matrices, bounds, mouseX, mouseY, delta - ) + matrices.push() + matrices.translate(0F, 0F, 100F) + entry.asItemEntry().render(matrices, bounds, mouseX, mouseY, delta) + matrices.pop() } override fun getTooltip(entry: EntryStack<NEUItem>, tooltipContext: TooltipContext): Tooltip? { - return VanillaEntryTypes.ITEM.definition.renderer - .getTooltip(entry.asItemEntry(), tooltipContext) + return entry.asItemEntry().getTooltip(tooltipContext, false) } } |