- 344
- 1
- 47
Вообщем, переделал немного рендер
package expm.decor.blocks.tileentity;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import expm.GL.GLModel;
public class RendererAutobus extends TileEntitySpecialRenderer
{
private static ResourceLocation tex = new ResourceLocation("/assets/expm/models/test.png");
public GLModel model = new GLModel("/assets/expm/models/statue/statue.obj");
public Minecraft mc = Minecraft.getMinecraft();
public void renderTileEntity(TileStatueNui tileEntity, double d1, double d2, double d3, float f)
{
int metadata = tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
int rotationAngle = metadata*90;
GL11.glPushMatrix();
GL11.glTranslatef((float)d1 + 0.537F, (float)d2 + 0.0F, (float)d3 + 0.502F);
GL11.glRotatef(0F, 1F, 0F, 0F);
GL11.glRotatef((float)rotationAngle, 0F, 1F, 0F);
GL11.glScalef(1F, 1F, 1F);
mc.renderEngine.bindTexture(tex);
model.render();
GL11.glPopMatrix();
}
public void renderTileEntityAt(TileEntity tileEntity, double d1, double d2, double d3, float f)
{this.renderTileEntity((TileStatueNui)tileEntity, d1, d2, d3, f);}}
Однако теперь текстура просто не дается.
То-есть я сделал текстурку полностью черной, но
Как и было без текстуры, так и осталось
package expm.decor.blocks.tileentity;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import expm.GL.GLModel;
public class RendererAutobus extends TileEntitySpecialRenderer
{
private static ResourceLocation tex = new ResourceLocation("/assets/expm/models/test.png");
public GLModel model = new GLModel("/assets/expm/models/statue/statue.obj");
public Minecraft mc = Minecraft.getMinecraft();
public void renderTileEntity(TileStatueNui tileEntity, double d1, double d2, double d3, float f)
{
int metadata = tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
int rotationAngle = metadata*90;
GL11.glPushMatrix();
GL11.glTranslatef((float)d1 + 0.537F, (float)d2 + 0.0F, (float)d3 + 0.502F);
GL11.glRotatef(0F, 1F, 0F, 0F);
GL11.glRotatef((float)rotationAngle, 0F, 1F, 0F);
GL11.glScalef(1F, 1F, 1F);
mc.renderEngine.bindTexture(tex);
model.render();
GL11.glPopMatrix();
}
public void renderTileEntityAt(TileEntity tileEntity, double d1, double d2, double d3, float f)
{this.renderTileEntity((TileStatueNui)tileEntity, d1, d2, d3, f);}}
Однако теперь текстура просто не дается.
То-есть я сделал текстурку полностью черной, но
Как и было без текстуры, так и осталось