Jump to content

Recommended Posts

Posted

How to make my mob bigger without rebuilding it in Techne? So, i tried to use that code in my RenderMob.class:

GL11.glPushMatrix();
float scale = 2.0F;
GL11.glScalef(scale, scale, scale);

That works, but my Minecraft gets damned up. I think that code sucks and i need something another. Here is the whole RenderMob.class file:

 

 

package halflifemod.client.renderer.entity;

 

 

import halflifemod.client.model.ModelGonome;

import halflifemod.client.model.ModelGuardZombie;

import halflifemod.client.model.ModelHeadcrabZombie;

import halflifemod.entity.monster.EntityGonome;

import halflifemod.entity.monster.EntityGuardZombie;

 

import org.lwjgl.opengl.GL11;

 

import net.minecraft.client.renderer.entity.RenderLiving;

import net.minecraft.entity.Entity;

import net.minecraft.entity.EntityLiving;

import net.minecraft.item.ItemStack;

import net.minecraftforge.client.IItemRenderer.ItemRenderType;

 

public class RenderGonome extends RenderLiving

{

protected ModelGonome model;

 

public RenderGonome(ModelGonome modelGonome, float f)

{

super(modelGonome, f);

model = ((ModelGonome)mainModel);

GL11.glPushMatrix();

float scale = 2.0F;

GL11.glScalef(scale, scale, scale);

 

 

}

 

public void renderGonome(EntityGonome entityGonome, double par2, double par4, double par6,

float par8, float par9)

{

super.doRenderLiving(entityGonome, par2, par4, par6, par8, par9);

}

 

public void doRenderLiving(EntityLiving entityliving, double par2, double par4, double par6,

float par8, float par9)

{

renderGonome((EntityGonome)entityliving, par2, par4, par6, par8, par9);

}

 

public void doRender(Entity entity, double par2, double par4, double par6,

float par8, float par9)

{

renderGonome((EntityGonome)entity, par2, par4, par6, par8, par9);

}

 

 

}

 

 

 

So, how i can make my mob bigger?

Posted

Increase in preRenderCallback method.

 

public class FCRenderLiving extends RenderLiving{

    public FCRenderLiving(ModelBase model, float shadowSize){
        super(model, shadowSize);
    }
    
    protected void preRenderCallback(EntityLivingBase entity, float f){
    	GL11.glScalef(2F, 2F, 2F);
    }
    
    protected ResourceLocation getEntityTexture(Entity entity){
    	return null;
    }
}

 

Posted

Increase in preRenderCallback method.

 

public class FCRenderLiving extends RenderLiving{

    public FCRenderLiving(ModelBase model, float shadowSize){
        super(model, shadowSize);
    }
    
    protected void preRenderCallback(EntityLivingBase entity, float f){
    	GL11.glScalef(2F, 2F, 2F);
    }
    
    protected ResourceLocation getEntityTexture(Entity entity){
    	return null;
    }
}

 

NVM. I looked to the Slime and worked it out. The Codes are almost the similar, so thanks alot.

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



×
×
  • Create New...

Important Information

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