gt22

Untitled

Jul 25th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. @Override
  2.     public int getColor(FluidStack stack)
  3.     {
  4.         Random r = new Random();
  5.         if(redplus)
  6.         {
  7.             if(r.nextBoolean())
  8.             red++;
  9.         }
  10.         else
  11.         {
  12.             if(r.nextBoolean())
  13.             red--;
  14.         }
  15.         if(greenplus)
  16.         {
  17.             if(r.nextBoolean())
  18.             green++;
  19.         }
  20.         else
  21.         {
  22.             if(r.nextBoolean())
  23.             green--;
  24.         }
  25.         if(blueplus)
  26.         {
  27.             if(r.nextBoolean())
  28.             blue++;
  29.         }
  30.         else
  31.         {
  32.             if(r.nextBoolean())
  33.             blue--;
  34.         }
  35.         if(red == 0)
  36.         {
  37.             redplus = true;
  38.         }
  39.         else if (red == 255)
  40.         {
  41.             redplus = false;
  42.         }
  43.         if(green == 0)
  44.         {
  45.             greenplus = true;
  46.         }
  47.         else if (green == 255)
  48.         {
  49.             greenplus = false;
  50.         }
  51.         if(blue == 0)
  52.         {
  53.             blueplus = true;
  54.         }
  55.         else if (blue == 255)
  56.         {
  57.             blueplus = false;
  58.         }
  59.         return new Color(red, green, blue).getRGB();
  60.     }
Advertisement
Add Comment
Please, Sign In to add comment