Jump to content

Entity rendering as a white box


Nomis

Recommended Posts

IO2iSoi.png

 

I'm trying to create a block renders as a techne model but this is what i get ^^^

 

I have no idea why this happens. Here is my src code:

 

Main Mod

 

@Mod(modid = FactoryCraft.MODID, name = FactoryCraft.NAME, version = FactoryCraft.VERSION)
public class FactoryCraft {
@SidedProxy(clientSide = "me.FactoryCraft.FactoryCraft.ClientProxy", serverSide = "me.FactoryCraft.FactoryCraft.CommonProxy")
public static CommonProxy proxy;

    public static final String MODID = "FactoryCraft";
    public static final String VERSION = "0.0.1a";
    public static final String NAME = "Factory Craft";
    
    public static Block woodMachineFrame = new WoodMachineFrame(1234, Material.wood).setBlockName("WoodMachineFrame").setBlockTextureName(FactoryCraft.MODID + ":planks");    
    @Instance(FactoryCraft.MODID)
    public static FactoryCraft instance;
    @EventHandler
    public void preInit(FMLPreInitializationEvent event) {
    	GameRegistry.registerBlock(woodMachineFrame, "WoodMachineFrame");
    	
    	Items.init();
    	Entities.init();
    }

 

 

ClientProxy

 

public class ClientProxy extends CommonProxy {
@Override
public void initRenderes() {
	RenderingRegistry.registerEntityRenderingHandler(EntityChimney.class, new RenderChimney());
}
}

 

 

The Entity

 

public class EntityChimney extends Entity {

public EntityChimney(World world) {
	super(world);
}

public EntityChimney(World world, double x, double y, double z) {
	super(world);

	posX = x;
	posY = y;
	posZ = z;
}

@Override
protected void entityInit() {
}

@Override
protected void readEntityFromNBT(NBTTagCompound var1) {
}

@Override
protected void writeEntityToNBT(NBTTagCompound var1) {	
}
}

 

 

The Model (The names are in danish... But it's made in techne)

 

public class ModelChimney extends ModelBase
{
  //fields
    ModelRenderer fladeF;
    ModelRenderer fladeR;
    ModelRenderer fladeL;
    ModelRenderer fladeB;
    ModelRenderer streg1;
    ModelRenderer streg2;
    ModelRenderer streg3;
    ModelRenderer streg4;
    ModelRenderer streg5;
    ModelRenderer streg6;
    ModelRenderer streg7;
    ModelRenderer streg8;
    ModelRenderer Shape9;
    ModelRenderer streg10;
    ModelRenderer streg11;
    ModelRenderer streg12;
  
  public ModelChimney()
  {
    textureWidth = 64;
    textureHeight = 32;
    
      fladeF = new ModelRenderer(this, 0, 0);
      fladeF.addBox(0F, 0F, 0F, 6, 16, 1);
      fladeF.setRotationPoint(-3F, 8F, -7F);
      fladeF.setTextureSize(64, 32);
      fladeF.mirror = true;
      setRotation(fladeF, 0F, 0F, 0F);
      fladeR = new ModelRenderer(this, 0, 0);
      fladeR.addBox(0F, 0F, 0F, 1, 16, 6);
      fladeR.setRotationPoint(-7F, 8F, -3F);
      fladeR.setTextureSize(64, 32);
      fladeR.mirror = true;
      setRotation(fladeR, 0F, 0F, 0F);
      fladeL = new ModelRenderer(this, 0, 0);
      fladeL.addBox(0F, 0F, 0F, 1, 16, 6);
      fladeL.setRotationPoint(6F, 8F, -3F);
      fladeL.setTextureSize(64, 32);
      fladeL.mirror = true;
      setRotation(fladeL, 0F, 0F, 0F);
      fladeB = new ModelRenderer(this, 0, 0);
      fladeB.addBox(0F, 0F, 0F, 6, 16, 1);
      fladeB.setRotationPoint(-3F, 8F, 6F);
      fladeB.setTextureSize(64, 32);
      fladeB.mirror = true;
      setRotation(fladeB, 0F, 0F, 0F);
      streg1 = new ModelRenderer(this, 0, 0);
      streg1.addBox(0F, 0F, 0F, 1, 16, 1);
      streg1.setRotationPoint(-6F, 8F, 3F);
      streg1.setTextureSize(64, 32);
      streg1.mirror = true;
      setRotation(streg1, 0F, 0F, 0F);
      streg2 = new ModelRenderer(this, 0, 0);
      streg2.addBox(0F, 0F, 0F, 1, 16, 1);
      streg2.setRotationPoint(-6F, 8F, -4F);
      streg2.setTextureSize(64, 32);
      streg2.mirror = true;
      setRotation(streg2, 0F, 0F, 0F);
      streg3 = new ModelRenderer(this, 0, 0);
      streg3.addBox(0F, 0F, 0F, 1, 16, 1);
      streg3.setRotationPoint(4F, 8F, -5F);
      streg3.setTextureSize(64, 32);
      streg3.mirror = true;
      setRotation(streg3, 0F, 0F, 0F);
      streg4 = new ModelRenderer(this, 0, 0);
      streg4.addBox(0F, 0F, 0F, 1, 16, 1);
      streg4.setRotationPoint(5F, 8F, -4F);
      streg4.setTextureSize(64, 32);
      streg4.mirror = true;
      setRotation(streg4, 0F, 0F, 0F);
      streg5 = new ModelRenderer(this, 0, 0);
      streg5.addBox(0F, 0F, 0F, 1, 16, 1);
      streg5.setRotationPoint(5F, 8F, 3F);
      streg5.setTextureSize(64, 32);
      streg5.mirror = true;
      setRotation(streg5, 0F, 0F, 0F);
      streg6 = new ModelRenderer(this, 0, 0);
      streg6.addBox(0F, 0F, 0F, 1, 16, 1);
      streg6.setRotationPoint(-5F, 8F, 4F);
      streg6.setTextureSize(64, 32);
      streg6.mirror = true;
      setRotation(streg6, 0F, 0F, 0F);
      streg7 = new ModelRenderer(this, 0, 0);
      streg7.addBox(0F, 0F, 0F, 1, 16, 1);
      streg7.setRotationPoint(3F, 8F, 5F);
      streg7.setTextureSize(64, 32);
      streg7.mirror = true;
      setRotation(streg7, 0F, 0F, 0F);
      streg8 = new ModelRenderer(this, 0, 0);
      streg8.addBox(0F, 0F, 0F, 1, 16, 1);
      streg8.setRotationPoint(-4F, 8F, 5F);
      streg8.setTextureSize(64, 32);
      streg8.mirror = true;
      setRotation(streg8, 0F, 0F, 0F);
      Shape9 = new ModelRenderer(this, 0, 0);
      Shape9.addBox(0F, 0F, 0F, 1, 16, 1);
      Shape9.setRotationPoint(4F, 8F, 4F);
      Shape9.setTextureSize(64, 32);
      Shape9.mirror = true;
      setRotation(Shape9, 0F, 0F, 0F);
      streg10 = new ModelRenderer(this, 0, 0);
      streg10.addBox(0F, 0F, 0F, 1, 16, 1);
      streg10.setRotationPoint(-5F, 8F, -5F);
      streg10.setTextureSize(64, 32);
      streg10.mirror = true;
      setRotation(streg10, 0F, 0F, 0F);
      streg11 = new ModelRenderer(this, 0, 0);
      streg11.addBox(0F, 0F, 0F, 1, 16, 1);
      streg11.setRotationPoint(3F, 8F, -6F);
      streg11.setTextureSize(64, 32);
      streg11.mirror = true;
      setRotation(streg11, 0F, 0F, 0F);
      streg12 = new ModelRenderer(this, 0, 0);
      streg12.addBox(0F, 0F, 0F, 1, 16, 1);
      streg12.setRotationPoint(-4F, 8F, -6F);
      streg12.setTextureSize(64, 32);
      streg12.mirror = true;
      setRotation(streg12, 0F, 0F, 0F);
  }
  
  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5);
    fladeF.render(f5);
    fladeR.render(f5);
    fladeL.render(f5);
    fladeB.render(f5);
    streg1.render(f5);
    streg2.render(f5);
    streg3.render(f5);
    streg4.render(f5);
    streg5.render(f5);
    streg6.render(f5);
    streg7.render(f5);
    streg8.render(f5);
    Shape9.render(f5);
    streg10.render(f5);
    streg11.render(f5);
    streg12.render(f5);
  }
  
  private void setRotation(ModelRenderer model, float x, float y, float z)
  {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
  }
  
  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
  {
    //super.setRotationAngles(f, f1, f2, f3, f4, f5);
  }

}

 

 

Render

 

public class RenderChimney extends Render {

private ModelChimney model;
private static final ResourceLocation texture = new ResourceLocation(FactoryCraft.MODID, ":Chimney.png");

public RenderChimney() {
	model = new ModelChimney();
	shadowSize = 0.5F;
}

@Override
public void doRender(Entity entity, double x, double y, double z, float yaw, float partialTickTime) {
	GL11.glPushMatrix();

	GL11.glTranslatef((float) x, (float) y, (float) z);
	GL11.glScalef(-1F, -1F, -1F);

	bindEntityTexture(entity);

	model.render(entity, 0F, 0F, 0F, 0F, 0F, 0.0625F);

	GL11.glPopMatrix();
}

@Override
protected ResourceLocation getEntityTexture(Entity var1) {
	return texture;
}

}

 

Author of the unreleased mod Factory Craft

I'm usually known as MnomisC

IGN MnomisC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • So i know for a fact this has been asked before but Render stuff troubles me a little and i didnt find any answer for recent version. I have a custom nausea effect. Currently i add both my nausea effect and the vanilla one for the effect. But the problem is that when I open the inventory, both are listed, while I'd only want mine to show up (both in the inv and on the GUI)   I've arrived to the GameRender (on joined/net/minecraft/client) and also found shaders on client-extra/assets/minecraft/shaders/post and client-extra/assets/minecraft/shaders/program but I'm lost. I understand that its like a regular screen, where I'd render stuff "over" the game depending on data on the server, but If someone could point to the right client and server classes that i can read to see how i can manage this or any tip would be apreciated
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
  • Topics

×
×
  • Create New...

Important Information

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