Skip to content

Commit

Permalink
Fixed color transparency for smart helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
darichey committed Mar 9, 2016
1 parent 971c07c commit 94df554
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94df554

Please sign in to comment.