Fix SchematicannonScreen tooltip handling

This commit is contained in:
Snownee 2020-12-11 18:36:29 +08:00
parent 727de5425f
commit 550e058ec5

View File

@ -327,15 +327,15 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
} }
if (hoveredSlot != null && !hoveredSlot.getHasStack()) { if (hoveredSlot != null && !hoveredSlot.getHasStack()) {
if (hoveredSlot.getSlotIndex() == 0) if (hoveredSlot.slotNumber == 0)
renderTooltip( renderTooltip(
TooltipHelper.cutString(Lang.translate(_slotSchematic), TextFormatting.GRAY, TextFormatting.BLUE), TooltipHelper.cutString(Lang.translate(_slotSchematic), TextFormatting.GRAY, TextFormatting.BLUE),
mouseX, mouseY); mouseX, mouseY);
if (hoveredSlot.getSlotIndex() == 2) if (hoveredSlot.slotNumber == 2)
renderTooltip( renderTooltip(
TooltipHelper.cutString(Lang.translate(_slotListPrinter), TextFormatting.GRAY, TextFormatting.BLUE), TooltipHelper.cutString(Lang.translate(_slotListPrinter), TextFormatting.GRAY, TextFormatting.BLUE),
mouseX, mouseY); mouseX, mouseY);
if (hoveredSlot.getSlotIndex() == 4) if (hoveredSlot.slotNumber == 4)
renderTooltip( renderTooltip(
TooltipHelper.cutString(Lang.translate(_slotGunpowder), TextFormatting.GRAY, TextFormatting.BLUE), TooltipHelper.cutString(Lang.translate(_slotGunpowder), TextFormatting.GRAY, TextFormatting.BLUE),
mouseX, mouseY); mouseX, mouseY);