Thank you i finally discover how to do that:
package Models;
import org.lwjgl.opengl.GL11;
import com.minecraftargentina.basemod.BaseMod;
import com.minecraftargentina.basemod.Blocks.TileEntityArbolPlataform;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
import Models.ArbolBaseModel;
//Renderizado 3D importando ".obj" from Blender.
public class RenderArbolPlataform extends TileEntitySpecialRenderer{
private IModelCustom ArbolPlataformModel; //El model
private ResourceLocation ArbolPlataformTexture; //La textura
private ResourceLocation ArbolPlataform; //Nombre
public RenderArbolPlataform(){
//Resource by Name
ArbolPlataform = new ResourceLocation(BaseMod.modid + ":" + "textures/model/Tronco.obj");
//Model From Name
ArbolPlataformModel = AdvancedModelLoader.loadModel(ArbolPlataform);
//Texture Resource
ArbolPlataformTexture = new ResourceLocation(BaseMod.modid + ":" + "textures/model/canopy_side.png");
}
public void renderModelAt(TileEntity tileEntity, double x, double y, double z, float f){
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F,(float) y + 1.5F,(float) z + 0.5F);
bindTexture(ArbolPlataformTexture);
GL11.glRotatef(180, 0.0F, 0.0F, 1F);
GL11.glPushMatrix();
ArbolPlataformModel.renderAll();
GL11.glPopMatrix();
GL11.glPopMatrix();
}
@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
renderModelAt((TileEntityArbolPlataform)tileentity, x, y, z, f);
}
}
But now i dont know why im having this issue look:
http://s24.postimg.org/wj4bdaypd/tronco_error.jpg[/img]
Also when i made the block with blender i textured the block with 2 diferente textures: 1 for the top and 1 for the side..
When i export to "Tronco.obj" this file also appears:
Named: Tronco.mtl
# Blender MTL File: 'untitled.blend'
# Material Count: 2
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd D:\Blender Assets\Assets\textures\blocks\canopy_top.png
newmtl None_canopy_side.png
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd D:\Blender Assets\Assets\textures\blocks\canopy_side.png
help