diff --git a/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/IFilterScreen.java b/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/IFilterScreen.java index 6ae554f9b..949522be1 100644 --- a/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/IFilterScreen.java +++ b/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/IFilterScreen.java @@ -6,6 +6,7 @@ import dev.dubhe.anvilcraft.inventory.IFilterMenu; import dev.dubhe.anvilcraft.network.MachineEnableFilterPacket; +import dev.dubhe.anvilcraft.util.RenderHelper; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -147,7 +148,7 @@ default void renderDisabledSlot(@NotNull GuiGraphics guiGraphics, @NotNull Slot default void renderFilterItem(@NotNull GuiGraphics guiGraphics, @NotNull Slot slot, @NotNull ItemStack stack) { int i = slot.x; int j = slot.y; - guiGraphics.renderFakeItem(stack, i, j); + RenderHelper.renderItemWithTransparency(stack, guiGraphics.pose(), i, j, 0.52f); guiGraphics.fill(i, j, i + 16, j + 16, 0x80ffaaaa); } diff --git a/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/ItemCollectorScreen.java b/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/ItemCollectorScreen.java index aebeb722a..1e747574b 100644 --- a/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/ItemCollectorScreen.java +++ b/src/main/java/dev/dubhe/anvilcraft/client/gui/screen/ItemCollectorScreen.java @@ -125,6 +125,13 @@ protected void renderSlotTooltip(@NotNull GuiGraphics guiGraphics, int x, int y) guiGraphics.renderTooltip(this.font, Component.translatable("screen.anvilcraft.slot.disable.tooltip"), x, y); } + @Override + @NotNull + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + super.render(guiGraphics, mouseX, mouseY, partialTick); + this.renderTooltip(guiGraphics, mouseX, mouseY); + } + @Override public ItemCollectorMenu getFilterMenu() { return this.menu; diff --git a/src/main/java/dev/dubhe/anvilcraft/integration/jei/util/BlockTagDisplayHelper.java b/src/main/java/dev/dubhe/anvilcraft/integration/jei/util/BlockTagDisplayHelper.java index 94c7ae7b9..717f9e80f 100644 --- a/src/main/java/dev/dubhe/anvilcraft/integration/jei/util/BlockTagDisplayHelper.java +++ b/src/main/java/dev/dubhe/anvilcraft/integration/jei/util/BlockTagDisplayHelper.java @@ -32,6 +32,7 @@ public static Optional getDisplay(TagKey tag){ /** * 根据方块配方输入,获取需要展示的工具提示 + * * @param input 方块标签或方块的配方输入 * @return 展示方块对应的工具提示。若为方块标签,还会展示具体的标签名 */