Рендор модели блока

Версия Minecraft
1.7.10
54
17
Всем привет! Есть проблема сделал один блок но когда делаю второй блок и рендер второго блока то первый становится таким же как второй!!! Помогите решить данную загадку
 
1,111
47
420
Крч тема такая. Рендер для всех тайлов один. То есть ты аргументом в регистрацию подаешь экземпляр, который будет рендерить все привязанные к нему тайлы. Учитываю это ты не должен хранить какую либо ункальную инфу о блоке в рендере, а ты сто проц это делаешь.
 
54
17
У меня идет так
Java:
ClientRegistry.bindTileEntitySpecialRenderer(te, new RenderBlockBase(model, texture1));

А потом
Код:
public class RenderBlockBase extends TileEntitySpecialRenderer {

    public static BaseModelBlock model = null;
    public static ResourceLocation texture = null;

    public RenderBlockBase(BaseModelBlock model, ResourceLocation texture) {
        this.model = model;
        this.texture = texture;
    }

    @Override
    public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {
        render((TEBlock)tile, x, y, z, f);
    }

    private void render(TEBlock tileEntity, double x, double y, double z, float f) {
        GL11.glPushMatrix();
        GL11.glTranslated(x, y, z);
        GL11.glTranslatef(0.5F, 1.5F, 0.5F);

        int rotation = 0;
        if(tileEntity != null) {
            rotation = tileEntity.getFacing();
        }

        if(rotation == 0){
            GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(rotation, 0.0F, 90.0F, 0.0F);
        } else {
            GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(rotation * 90, 0.0F, 1.0F, 0.0F);
        }

        bindTexture(this.texture);
        this.model.render();
        GL11.glPopMatrix();
    }

}
 
1,111
47
420
У меня идет так
Java:
ClientRegistry.bindTileEntitySpecialRenderer(te, new RenderBlockBase(model, texture1));

А потом
Код:
public class RenderBlockBase extends TileEntitySpecialRenderer {

    public static BaseModelBlock model = null;
    public static ResourceLocation texture = null;

    public RenderBlockBase(BaseModelBlock model, ResourceLocation texture) {
        this.model = model;
        this.texture = texture;
    }

    @Override
    public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {
        render((TEBlock)tile, x, y, z, f);
    }

    private void render(TEBlock tileEntity, double x, double y, double z, float f) {
        GL11.glPushMatrix();
        GL11.glTranslated(x, y, z);
        GL11.glTranslatef(0.5F, 1.5F, 0.5F);

        int rotation = 0;
        if(tileEntity != null) {
            rotation = tileEntity.getFacing();
        }

        if(rotation == 0){
            GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(rotation, 0.0F, 90.0F, 0.0F);
        } else {
            GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(rotation * 90, 0.0F, 1.0F, 0.0F);
        }

        bindTexture(this.texture);
        this.model.render();
        GL11.glPopMatrix();
    }

}
Тут вроде норм все. А ты случаем не регаешь этот рендер для каждого нового тайла?
 
Сверху