Skip to content

Commit

Permalink
fix: item tooltips in list filters
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Aug 19, 2024
1 parent b3d8e5f commit 189fd04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;

import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -57,6 +58,12 @@ protected void init() {
this.addRenderableWidget(this.confirmButton);
}

@Override
public void render(@NotNull GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) {
super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick);
this.renderTooltip(pGuiGraphics, pMouseX, pMouseY);
}

@Override
protected void renderLabels(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) {
//prevent automatic rendering of container title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ protected void init() {
@Override
public void render(@NotNull GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) {
super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick);
this.renderTooltip(pGuiGraphics, pMouseX, pMouseY);

ItemStack stack = this.menu.ghostInventory.getStackInSlot(1);
PoseStack matrixStack = pGuiGraphics.pose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
import com.klikli_dev.theurgy.content.gui.Indicator;
import com.klikli_dev.theurgy.network.Networking;
import com.klikli_dev.theurgy.network.messages.MessageSetListFilterScreenOption;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
import java.util.List;
Expand Down

0 comments on commit 189fd04

Please sign in to comment.