Skip to content

Commit

Permalink
Merge pull request Anvil-Dev#309 from wdfaESfaef/bugfix
Browse files Browse the repository at this point in the history
修复盖板提示信息崩溃的问题
  • Loading branch information
Gu-ZT authored Apr 18, 2024
2 parents b2e8e52 + 4c69e5b commit fb2f889
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ protected void renderTooltip(@NotNull GuiGraphics guiGraphics, int x, int y) {

protected void renderSlotTooltip(@NotNull GuiGraphics guiGraphics, int x, int y) {
if (this.hoveredSlot == null) return;
if (!(this.hoveredSlot instanceof ItemDepositorySlot)) return;
if (!((ItemDepositorySlot) this.hoveredSlot).isFilter()) return;
if (!this.isFilterEnabled()) return;
if (!this.isSlotDisabled(this.hoveredSlot.getContainerSlot())) return;
guiGraphics.renderTooltip(this.font, Component.literal("screen.anvilcraft.slot.disable.tooltip"), x, y);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ protected void renderTooltip(@NotNull GuiGraphics guiGraphics, int x, int y) {

protected void renderSlotTooltip(@NotNull GuiGraphics guiGraphics, int x, int y) {
if (this.hoveredSlot == null) return;
if (!(this.hoveredSlot instanceof ItemDepositorySlot)) return;
if (!((ItemDepositorySlot) this.hoveredSlot).isFilter()) return;
if (!this.isFilterEnabled()) return;
if (!this.isSlotDisabled(this.hoveredSlot.getContainerSlot())) return;
guiGraphics.renderTooltip(this.font, Component.literal("screen.anvilcraft.slot.disable.tooltip"), x, y);
Expand Down

0 comments on commit fb2f889

Please sign in to comment.