Jump to content

peti446

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by peti446

  1. 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 :S look:

     

    width=180 height=102http://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

     

    :D help :D

  2. Hello everyone! Not long ago I started to create custom models for my mod and come to the conclusion that I needed to use some better than Techne program for best results!

     

    Then appeared Blender, a program recommended by a friend who studied graphic design! And also I saw on the internet after many mention it is a very good program that could be used to model in minecraft!

     

    My problem is: How to export the model to render it correctly in minecraft?.

     

    I know there are several ways, one of which is BlendToMinecraft (since it creates json outdated and serve no more.) otherwise it is exporting to. "objt" but here comes the second question .. What do I do with him. "obj"?

     

    Well I've seen some mods that use APIs but I have not gotten any work since as I said I'm fairly new to modeling custom theme.

     

    Would need someone to be the good Samaritan and help me either making a tutorial on how serious step to add a ". Objt" as model and operate in minecraft. Or if anyone knows of some code that can be used for example also would serve me very much!

     

    From already thank you very much to all and hope someone can give me a hand with this!

  3. Hi,

    I want to get for example if in the inventory form the player there are a flower for example a Poppy but when i use Items.ItemName  i dont find the flower name and anything like flower o res_flower. So how can i get the all the flowers?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.