diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-10-23 07:36:05 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-10-23 07:36:05 +1000 |
commit | 3826cbb1223a25a6d476486d9369d65a22090aec (patch) | |
tree | b176e3752ae9aeadb3bda54ab3757d4acc6f6ff9 /src/Java/gtPlusPlus/core/util/Utils.java | |
parent | b123b87177c907951f695d616c31f1d229412e60 (diff) | |
download | GT5-Unofficial-3826cbb1223a25a6d476486d9369d65a22090aec.tar.gz GT5-Unofficial-3826cbb1223a25a6d476486d9369d65a22090aec.tar.bz2 GT5-Unofficial-3826cbb1223a25a6d476486d9369d65a22090aec.zip |
% Massive Material Backend Changes. (Nothing noticeable to players)
+ Added Chemical Compounds to Dust stacks, so you know how to make/use them.
+ As an idea, added Deci and Centi dusts, each representing .10 and point .01 of a full dust. (Probably will remove these, or use them for unique crafting options)
% Moved Radiation data to Material class.
% Created a BaseItemComponent and made all machine components except ingots/dusts utilise it. (Saves boiler-plating 30 lines per class and also it's using OOP for it's real job)
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/Utils.java')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/Utils.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index bee5de98ea..cdfa556de9 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -426,7 +426,10 @@ public class Utils { } } - public static int rgbtoHexValue(int r, int g, int b){ + public static int rgbtoHexValue(int r, int g, int b){ + if (r > 255 || g > 255 || b > 255 || r < 0 || g < 0 || b < 0){ + return 0; + } Color c = new Color(r,g,b); String temp = Integer.toHexString( c.getRGB() & 0xFFFFFF ).toUpperCase(); |