2018-09-13 12:03:28 -04:00
|
|
|
package noppes.npcs.client.model;
|
|
|
|
|
|
2023-01-12 21:33:06 -05:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2018-09-13 12:03:28 -04:00
|
|
|
import net.minecraft.client.model.ModelBase;
|
|
|
|
|
import net.minecraft.client.model.ModelRenderer;
|
|
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
2025-03-12 20:12:01 -04:00
|
|
|
public class ModelNpcSlime extends ModelBase {
|
2018-09-13 12:03:28 -04:00
|
|
|
ModelRenderer outerBody;
|
|
|
|
|
ModelRenderer innerBody;
|
|
|
|
|
|
2025-03-12 20:12:01 -04:00
|
|
|
/**
|
|
|
|
|
* The slime's right eye
|
|
|
|
|
*/
|
2018-09-13 12:03:28 -04:00
|
|
|
ModelRenderer slimeRightEye;
|
|
|
|
|
|
2025-03-12 20:12:01 -04:00
|
|
|
/**
|
|
|
|
|
* The slime's left eye
|
|
|
|
|
*/
|
2018-09-13 12:03:28 -04:00
|
|
|
ModelRenderer slimeLeftEye;
|
|
|
|
|
|
2025-03-12 20:12:01 -04:00
|
|
|
/**
|
|
|
|
|
* The slime's mouth
|
|
|
|
|
*/
|
2018-09-13 12:03:28 -04:00
|
|
|
ModelRenderer slimeMouth;
|
|
|
|
|
|
2025-03-12 20:12:01 -04:00
|
|
|
public ModelNpcSlime(int par1) {
|
|
|
|
|
this.textureHeight = 64;
|
|
|
|
|
this.textureWidth = 64;
|
2018-09-13 12:03:28 -04:00
|
|
|
outerBody = new ModelRenderer(this, 0, 0);
|
|
|
|
|
this.outerBody = new ModelRenderer(this, 0, 0);
|
|
|
|
|
this.outerBody.addBox(-8.0F, 32.0F, -8.0F, 16, 16, 16);
|
|
|
|
|
//this.outerBody.addBox(-8.0F, 32.0F, -8.0F, 16, 16, 16);
|
|
|
|
|
|
2025-03-12 20:12:01 -04:00
|
|
|
if (par1 > 0) {
|
2018-09-13 12:03:28 -04:00
|
|
|
this.innerBody = new ModelRenderer(this, 0, 32);
|
|
|
|
|
this.innerBody.addBox(-3.0F, 17.0F, -3.0F, 6, 6, 6);
|
2025-03-12 20:12:01 -04:00
|
|
|
|
2018-09-13 12:03:28 -04:00
|
|
|
this.slimeRightEye = new ModelRenderer(this, 0, 0);
|
|
|
|
|
this.slimeRightEye.addBox(-3.25F, 18.0F, -3.5F, 2, 2, 2);
|
|
|
|
|
this.slimeLeftEye = new ModelRenderer(this, 0, 4);
|
|
|
|
|
this.slimeLeftEye.addBox(1.25F, 18.0F, -3.5F, 2, 2, 2);
|
|
|
|
|
this.slimeMouth = new ModelRenderer(this, 0, 8);
|
|
|
|
|
this.slimeMouth.addBox(0.0F, 21.0F, -3.5F, 1, 1, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets the models various rotation angles then renders the model.
|
|
|
|
|
*/
|
2025-03-12 20:12:01 -04:00
|
|
|
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
2018-09-13 12:03:28 -04:00
|
|
|
this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
2025-03-12 20:12:01 -04:00
|
|
|
if (innerBody != null)
|
|
|
|
|
this.innerBody.render(par7);
|
|
|
|
|
else {
|
|
|
|
|
GL11.glPushMatrix();
|
|
|
|
|
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
|
|
|
|
this.outerBody.render(par7);
|
|
|
|
|
GL11.glPopMatrix();
|
2018-09-13 12:03:28 -04:00
|
|
|
}
|
|
|
|
|
|
2025-03-12 20:12:01 -04:00
|
|
|
if (this.slimeRightEye != null) {
|
2018-09-13 12:03:28 -04:00
|
|
|
this.slimeRightEye.render(par7);
|
|
|
|
|
this.slimeLeftEye.render(par7);
|
|
|
|
|
this.slimeMouth.render(par7);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|