System.arraycopy(idCache, 0, tempCache, 0, lastTexture);
System.arraycopy(idCache, 0, tempCache, 0, idCache.length);
    protected void resetFirstLast() {      boolean foundFirst = false;      for (int x = 0; x < texture.size(); x++) {        if (texture.get(x) != null) {          if (!foundFirst) {            firstTexture = x;            foundFirst = true;          }          lastTexture = x;        }      }      if (idCache.length <= lastTexture) {          if(idCache.length == 0) {              idCache = new int[lastTexture+2];          } else {              int[] tempCache = new int[lastTexture+2];              System.arraycopy(idCache, 0, tempCache, 0, lastTexture);              idCache = tempCache;          }      }    }