diff options
| author | shedaniel <daniel@shedaniel.me> | 2024-09-24 11:46:21 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2024-09-24 11:46:21 +0800 |
| commit | b932bd3224cc66c5503b4d759bf1ae7bea70eb7c (patch) | |
| tree | 187d3c165f71ea3310e09f9c738cc52047453254 /runtime/src/main | |
| parent | 0f3e25a5c940f88f2abfa1f860be113a8a3d0c3d (diff) | |
| download | RoughlyEnoughItems-b932bd3224cc66c5503b4d759bf1ae7bea70eb7c.tar.gz RoughlyEnoughItems-b932bd3224cc66c5503b4d759bf1ae7bea70eb7c.tar.bz2 RoughlyEnoughItems-b932bd3224cc66c5503b4d759bf1ae7bea70eb7c.zip | |
Fix inventory highlighter for 1.20
Diffstat (limited to 'runtime/src/main')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/EntryHighlighter.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/EntryHighlighter.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/EntryHighlighter.java index 2b4aa0ba7..be711e98c 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/EntryHighlighter.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/EntryHighlighter.java @@ -31,6 +31,7 @@ import me.shedaniel.rei.impl.client.gui.widget.entrylist.EntryListSearchManager; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.client.renderer.RenderType; import net.minecraft.world.inventory.Slot; public class EntryHighlighter { @@ -46,10 +47,7 @@ public class EntryHighlighter { int x = containerScreen.leftPos, y = containerScreen.topPos; for (Slot slot : containerScreen.getMenu().slots) { if (!slot.hasItem() || !EntryListSearchManager.INSTANCE.matches(EntryStacks.of(slot.getItem()))) { - graphics.pose().pushPose(); - graphics.pose().translate(0, 0, 500f); - graphics.fillGradient(x + slot.x, y + slot.y, x + slot.x + 16, y + slot.y + 16, dimColor, dimColor); - graphics.pose().popPose(); + graphics.fillGradient(RenderType.guiOverlay(), x + slot.x, y + slot.y, x + slot.x + 16, y + slot.y + 16, dimColor, dimColor, 0); } else { graphics.pose().pushPose(); graphics.pose().translate(0, 0, 200f); |
