Package se.llbit.chunky.resources

Examples of se.llbit.chunky.resources.Texture


          case Block.TALLGRASS_ID:
          case Block.LEAVES_ID:
          case Block.LEAVES2_ID:
          case Block.VINES_ID:
          {
            Texture tex = Block.get(block).getIcon();
            for (int i = 0; i < 16; ++i) {
              for (int j = 0; j < 16; ++j) {
                float[] rgb = tex.getColor(j, i);
                if (rgb[3] != 0) {
                  rbuff.setRGB(xp0 + j, yp0 + i, getBiomeColor(rgb, block, biomes[x*Chunk.Z_MAX+z]));
                } else {
                  rbuff.setRGB(xp0 + j, yp0 + i, 0xFFFFFFFF);
                }
View Full Code Here


  }

  @Override
  protected boolean load(InputStream imageStream) throws IOException {
    BufferedImage image = ImageIO.read(imageStream);
    Sun.texture = new Texture(image);
    return true;
  }
View Full Code Here

TOP

Related Classes of se.llbit.chunky.resources.Texture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.