for (currentTexture = 0; currentTexture < hitTextures.size(); currentTexture++) {
int texture = defaultTexture;
// First pass (currentTexture == 0) is for the default terrain.png texture. Subsquent passes are for custom textures
// This design is to avoid unnessecary glBindTexture calls.
if (currentTexture > 0) {
Texture customTexture = CustomTextureManager.getTextureFromUrl(hitTexturesPlugins.get(currentTexture), hitTextures.get(currentTexture));
if (customTexture == null) {
customTexture = CustomTextureManager.getTextureFromPath(FileUtil.getAssetsDir().getPath()+"/block/spout.png");
}
if (customTexture != null) {
texture = customTexture.getTextureID();
TextureUtil.bindTexture(texture);
//game.renderEngine.bindTexture(texture);
if (texture <= 0) {
texture = defaultTexture;
}