- 318
- 12
Всем привет. Я накладываю текстуру на текстуру через определенное кол. тиков. Мне надо сделать что бы вторая текстура была прозрачной, и через секунду уже становилась видимой. Ну надо сделать что то типа, плавной прозрачности. Вот примерно так накладывается текстура на тектсуру сейчас (без прозрачности/плавности):
if(textureManager > 0) {
this.mc.getTextureManager().bindTexture(new ResourceLocation("xmod","textures/gui/main/bg1.png"));
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, (double)(0 + this.height), 0.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), (double)(0 + this.height), 0.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), 0.0D, 0.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
tessellator.draw();
}
if(textureManager > 120) {
this.mc.getTextureManager().bindTexture(new ResourceLocation("xmod","textures/gui/main/bg2.png"));
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, (double)(0 + this.height), 0.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), (double)(0 + this.height), 0.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), 0.0D, 0.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
tessellator.draw();
}
Спасибо.
if(textureManager > 0) {
this.mc.getTextureManager().bindTexture(new ResourceLocation("xmod","textures/gui/main/bg1.png"));
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, (double)(0 + this.height), 0.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), (double)(0 + this.height), 0.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), 0.0D, 0.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
tessellator.draw();
}
if(textureManager > 120) {
this.mc.getTextureManager().bindTexture(new ResourceLocation("xmod","textures/gui/main/bg2.png"));
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, (double)(0 + this.height), 0.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), (double)(0 + this.height), 0.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV((double)(0 + this.width), 0.0D, 0.0D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
tessellator.draw();
}
Спасибо.