Display tooltip for machine on controller
This commit is contained in:
@@ -137,7 +137,7 @@ public abstract class GuiBase extends GuiContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawItem(int x, int y, ItemStack stack) {
|
public void drawItem(int x, int y, ItemStack stack) {
|
||||||
drawItem(x, y, stack, false, null);
|
drawItem(x, y, stack, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawItem(int x, int y, ItemStack stack, boolean withOverlay) {
|
public void drawItem(int x, int y, ItemStack stack, boolean withOverlay) {
|
||||||
@@ -185,7 +185,9 @@ public abstract class GuiBase extends GuiContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void drawTooltip(int x, int y, ItemStack stack) {
|
public void drawTooltip(int x, int y, ItemStack stack) {
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
renderToolTip(stack, x, y);
|
renderToolTip(stack, x, y);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawTexture(int x, int y, int textureX, int textureY, int width, int height) {
|
public void drawTexture(int x, int y, int textureX, int textureY, int width, int height) {
|
||||||
|
|||||||
@@ -70,6 +70,10 @@ public class GuiController extends GuiBase {
|
|||||||
|
|
||||||
ItemStack machineStack = new ItemStack(machineBlock, 1, machineBlock.getMetaFromState(machineState));
|
ItemStack machineStack = new ItemStack(machineBlock, 1, machineBlock.getMetaFromState(machineState));
|
||||||
|
|
||||||
|
if (inBounds(x, y, 16, 16, mouseX, mouseY)) {
|
||||||
|
drawTooltip(mouseX, mouseY, machineStack);
|
||||||
|
}
|
||||||
|
|
||||||
drawItem(x, y, machineStack);
|
drawItem(x, y, machineStack);
|
||||||
drawString(x + 21, y + 5, t("misc.refinedstorage:energy_usage_minimal", machine.getEnergyUsage()));
|
drawString(x + 21, y + 5, t("misc.refinedstorage:energy_usage_minimal", machine.getEnergyUsage()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user