- 48
- 0
Не могу не как поставить текстуру на модель блока. Вот код рендера и скрин. Кто скажет в чем проблема? пишу на IDEA перейшол вчера много чего ещо не понял.
Код:
package assets.realLife.src;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
/**
* Created by USER on 21.03.2016.
*/
public class RenderTileEntityTumba extends TileEntitySpecialRenderer {
public static final ModelBlockTumba model = new ModelBlockTumba();
public static final ResourceLocation texture = new ResourceLocation(RealLife.MODID, "textures/blocks/Tumbochka_Textura.png");
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {
render((TileEntityTechne)tile, x, y, z, f);
}
private void render(TileEntityTechne tile, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
bindTexture(texture);
model.render();
GL11.glPopMatrix();
}
}