rework gui highlighting for terminals

This commit is contained in:
PrototypeTrousers
2022-10-13 15:19:25 -03:00
parent 3dedb7eefb
commit d28cd798e9
4 changed files with 50 additions and 12 deletions
@@ -41,6 +41,7 @@ public class GuiFluidTank extends GuiCustomSlot implements ITooltip {
private final int slot;
private final int width;
private final int height;
private boolean darkened = false;
public GuiFluidTank(IAEFluidTank tank, int slot, int id, int x, int y, int w, int h) {
super(id, x, y);
@@ -50,6 +51,15 @@ public class GuiFluidTank extends GuiCustomSlot implements ITooltip {
this.height = h;
}
public GuiFluidTank(IAEFluidTank tank, int slot, int id, int x, int y, int w, int h, boolean darkened) {
super(id, x, y);
this.tank = tank;
this.slot = slot;
this.width = w;
this.height = h;
this.darkened = darkened;
}
@Override
public void drawContent(Minecraft mc, int mouseX, int mouseY, float partialTicks) {
final IAEFluidStack fs = this.getFluidStack();
@@ -66,6 +76,11 @@ public class GuiFluidTank extends GuiCustomSlot implements ITooltip {
float red = (fluid.getFluid().getColor() >> 16 & 255) / 255.0F;
float green = (fluid.getFluid().getColor() >> 8 & 255) / 255.0F;
float blue = (fluid.getFluid().getColor() & 255) / 255.0F;
if (darkened) {
red = red * 0.4F;
green = green * 0.4F;
blue = blue * 0.4F;
}
GlStateManager.color(red, green, blue);
TextureAtlasSprite sprite = mc.getTextureMapBlocks().getAtlasSprite(fluid.getFluid().getStill().toString());