From 94df5547a4f6e56002134f643d775b9e41489143 Mon Sep 17 00:00:00 2001 From: grandmind Date: Tue, 8 Mar 2016 21:54:45 -0600 Subject: [PATCH] Fixed color transparency for smart helmet --- .../austinv11/peripheralsplusplus/lua/LuaObjectHUD.java | 8 ++++---- .../smarthelmet/DrawRectangleCommand.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/austinv11/peripheralsplusplus/lua/LuaObjectHUD.java b/src/main/java/com/austinv11/peripheralsplusplus/lua/LuaObjectHUD.java index 81d5dc8f..e799bad1 100644 --- a/src/main/java/com/austinv11/peripheralsplusplus/lua/LuaObjectHUD.java +++ b/src/main/java/com/austinv11/peripheralsplusplus/lua/LuaObjectHUD.java @@ -144,9 +144,9 @@ public Object[] callMethod(ILuaContext context, int method, Object[] arguments) c.y1 = (int)(double)(Double)arguments[1]; c.x2 = (int)(double)(Double)arguments[2]; c.y2 = (int)(double)(Double)arguments[3]; - c.color = new Color((int)(double)(Double)arguments[4]); + c.color = new Color((int)(double)(Double)arguments[4], true); if (arguments.length > 5) - c.color2 = new Color((int)(double)(Double)arguments[5]); + c.color2 = new Color((int)(double)(Double)arguments[5], true); renderStack.add(c); break; case 5: @@ -165,7 +165,7 @@ public Object[] callMethod(ILuaContext context, int method, Object[] arguments) c_.y1 = (int)(double)(Double)arguments[1]; c_.x2 = (int)(double)(Double)arguments[2] + 1; c_.y2 = c_.y1+1; - c_.color = new Color((int)(double)(Double)arguments[3]); + c_.color = new Color((int)(double)(Double)arguments[3], true); renderStack.add(c_); break; case 6: @@ -184,7 +184,7 @@ public Object[] callMethod(ILuaContext context, int method, Object[] arguments) c1.y1 = (int)(double)(Double)arguments[1] + 1; c1.x2 = c1.x1 + 1; c1.y2 = (int)(double)(Double)arguments[2]; - c1.color = new Color((int)(double)(Double)arguments[3]); + c1.color = new Color((int)(double)(Double)arguments[3], true); renderStack.add(c1); break; case 7: diff --git a/src/main/java/com/austinv11/peripheralsplusplus/smarthelmet/DrawRectangleCommand.java b/src/main/java/com/austinv11/peripheralsplusplus/smarthelmet/DrawRectangleCommand.java index f5a6dba9..07d942f1 100644 --- a/src/main/java/com/austinv11/peripheralsplusplus/smarthelmet/DrawRectangleCommand.java +++ b/src/main/java/com/austinv11/peripheralsplusplus/smarthelmet/DrawRectangleCommand.java @@ -33,9 +33,9 @@ public void readFromNBT(NBTTagCompound tagCompound) { x2 = tagCompound.getInteger("x2"); y1 = tagCompound.getInteger("y1"); y2 = tagCompound.getInteger("y2"); - color = new Color(tagCompound.getInteger("rgb")); + color = new Color(tagCompound.getInteger("rgb"), true); if (tagCompound.hasKey("rgb2")) - color2 = new Color(tagCompound.getInteger("rgb2")); + color2 = new Color(tagCompound.getInteger("rgb2"), true); } @Override