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();
}
}
Тут вроде норм все. А ты случаем не регаешь этот рендер для каждого нового тайла?У меня идет так
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(); } }
Меняю параметры тайтл, модел, и текстура!И то что у тебя все одинаково это норма при таком коде.