Skip to content

Commit

Permalink
fix with_hue/saturation/brightness
Browse files Browse the repository at this point in the history
good ol' java having undocumented extra data in returned values
  • Loading branch information
mcmonkey4eva committed Jul 2, 2020
1 parent b8aaaee commit 3fb6672
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Expand Up @@ -61,7 +61,6 @@ public boolean couldMatch(ScriptPath path) {

@Override
public boolean matches(ScriptPath path) {

String iCheck = path.eventArgLowerAt(2);
if (!iCheck.equals("item") && !tryItem(item, iCheck)) {
return false;
Expand Down
Expand Up @@ -401,7 +401,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) {
}

public static ColorTag fromHSB(int[] hsv) {
int rgb = java.awt.Color.HSBtoRGB(hsv[0] / 255f, hsv[1] / 255f, hsv[2] / 255f);
int rgb = java.awt.Color.HSBtoRGB(hsv[0] / 255f, hsv[1] / 255f, hsv[2] / 255f) & 0x00ffffff;
return new ColorTag(Color.fromRGB(rgb));
}

Expand Down

0 comments on commit 3fb6672

Please sign in to comment.