Jump to content

Custom Mob/dimension query.


majesticmadman98

Recommended Posts

Hey, I've got 3 problems

  • First how do I rescale a mob in game I tried with GL11 the same way as a block but it didn't like it
  • Second how do I increase the mob hitbox
  • Third the offsets of the model in techne were in the correct places, but how to I make it so when a joint moves everything moves with it, so the shoulders in this case move with the upper and lower arms as well as the 3 fingers on the hand thanks

 

Model

 

package dma.models;

 

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.model.ModelRenderer;

import net.minecraft.entity.Entity;

import net.minecraft.util.MathHelper;

 

public class trex extends ModelBase

{

  //fields

    ModelRenderer Toe1;

    ModelRenderer Toe2;

    ModelRenderer Toe3;

    ModelRenderer FootBall1;

    ModelRenderer Foot1;

    ModelRenderer Footsider1;

    ModelRenderer Footsider2;

    ModelRenderer Ankle;

    ModelRenderer AnklePadr1;

    ModelRenderer AnkleSidePad1;

    ModelRenderer AnkleSidePad2;

    ModelRenderer lupperleg;

    ModelRenderer LowerBody;

    ModelRenderer Tail1;

    ModelRenderer Tail2;

    ModelRenderer Tail3;

    ModelRenderer LLegJoint;

    ModelRenderer rupperleg;

    ModelRenderer lforeleg;

    ModelRenderer RLegJoint;

    ModelRenderer rforeleg;

    ModelRenderer Ankle2;

    ModelRenderer AnkleSidePad3;

    ModelRenderer AnkleSidePad4;

    ModelRenderer AnklePadl1;

    ModelRenderer Foot2;

    ModelRenderer Footsidel1;

    ModelRenderer Footsidel2;

    ModelRenderer FootBall2;

    ModelRenderer Toe4;

    ModelRenderer Toe5;

    ModelRenderer Toe6;

    ModelRenderer neck;

    ModelRenderer Head;

    ModelRenderer Shoulder;

    ModelRenderer Upperarm;

    ModelRenderer lowerarm;

    ModelRenderer finger1;

    ModelRenderer finger2;

    ModelRenderer finger3;

    ModelRenderer Shoulder1;

    ModelRenderer Upperarm1;

    ModelRenderer lowerarm1;

    ModelRenderer finger4;

    ModelRenderer finger5;

    ModelRenderer finger6;

 

  public trex()

  {

    textureWidth = 512;

    textureHeight = 256;

   

      Toe1 = new ModelRenderer(this, 0, 0);

      Toe1.addBox(-1F, -1F, -5F, 2, 2, 5);

      Toe1.setRotationPoint(7F, 23F, -3F);

      Toe1.setTextureSize(512, 256);

      Toe1.mirror = true;

      setRotation(Toe1, 0F, 0F, 0F);

      Toe2 = new ModelRenderer(this, 0, 0);

      Toe2.addBox(-1F, -1F, -5F, 2, 2, 5);

      Toe2.setRotationPoint(4F, 23F, -3F);

      Toe2.setTextureSize(512, 256);

      Toe2.mirror = true;

      setRotation(Toe2, 0F, 0F, 0F);

      Toe3 = new ModelRenderer(this, 0, 0);

      Toe3.addBox(-1F, -1F, -5F, 2, 2, 5);

      Toe3.setRotationPoint(1F, 23F, -3F);

      Toe3.setTextureSize(512, 256);

      Toe3.mirror = true;

      setRotation(Toe3, 0F, 0F, 0F);

      FootBall1 = new ModelRenderer(this, 0, 7);

      FootBall1.addBox(-4F, -1F, -1F, 8, 2, 1);

      FootBall1.setRotationPoint(4F, 23F, -2F);

      FootBall1.setTextureSize(512, 256);

      FootBall1.mirror = true;

      setRotation(FootBall1, 0F, 0F, 0F);

      Foot1 = new ModelRenderer(this, 0, 10);

      Foot1.addBox(-4.5F, -1.5F, -10F, 9, 3, 10);

      Foot1.setRotationPoint(4F, 22.5F, 8F);

      Foot1.setTextureSize(512, 256);

      Foot1.mirror = true;

      setRotation(Foot1, 0F, 0F, 0F);

      Footsider1 = new ModelRenderer(this, 0, 23);

      Footsider1.addBox(-1F, -1.5F, -4.5F, 1, 3, 9);

      Footsider1.setRotationPoint(0F, 22.5F, 3F);

      Footsider1.setTextureSize(512, 256);

      Footsider1.mirror = true;

      setRotation(Footsider1, 0F, 0F, 0F);

      Footsider2 = new ModelRenderer(this, 0, 23);

      Footsider2.addBox(-1F, -1.5F, -4.5F, 1, 3, 9);

      Footsider2.setRotationPoint(8F, 22.5F, 3F);

      Footsider2.setTextureSize(512, 256);

      Footsider2.mirror = true;

      setRotation(Footsider2, 0F, 3.141593F, 0F);

      Ankle = new ModelRenderer(this, 0, 38);

      Ankle.addBox(-5.5F, 0F, -6F, 11, 6, 12);

      Ankle.setRotationPoint(4F, 18.1F, 11F);

      Ankle.setTextureSize(512, 256);

      Ankle.mirror = true;

      setRotation(Ankle, 0F, 0F, 0F);

      AnklePadr1 = new ModelRenderer(this, 0, 35);

      AnklePadr1.addBox(-4.5F, -1F, -1F, 9, 2, 1);

      AnklePadr1.setRotationPoint(4F, 20F, 5.5F);

      AnklePadr1.setTextureSize(512, 256);

      AnklePadr1.mirror = true;

      setRotation(AnklePadr1, 0F, 0F, 0F);

      AnkleSidePad1 = new ModelRenderer(this, 0, 56);

      AnkleSidePad1.addBox(-1F, -2.5F, -5.5F, 1, 5, 11);

      AnkleSidePad1.setRotationPoint(-1F, 21.5F, 11F);

      AnkleSidePad1.setTextureSize(512, 256);

      AnkleSidePad1.mirror = true;

      setRotation(AnkleSidePad1, 0F, 0F, 0F);

      AnkleSidePad2 = new ModelRenderer(this, 0, 56);

      AnkleSidePad2.addBox(-1F, -2.5F, -5.5F, 1, 5, 11);

      AnkleSidePad2.setRotationPoint(9F, 21.5F, 11F);

      AnkleSidePad2.setTextureSize(512, 256);

      AnkleSidePad2.mirror = true;

      setRotation(AnkleSidePad2, 0F, 3.141593F, 0F);

      lupperleg = new ModelRenderer(this, 51, 71);

      lupperleg.addBox(-5.5F, 0F, -5.5F, 11, 24, 14);

      lupperleg.setRotationPoint(4F, -25.8F, 9F);

      lupperleg.setTextureSize(512, 256);

      lupperleg.mirror = true;

      setRotation(lupperleg, -0.1570796F, 0F, 0F);

      LowerBody = new ModelRenderer(this, 168, 0);

      LowerBody.addBox(-17.5F, -12.5F, -3F, 35, 31, 84);

      LowerBody.setRotationPoint(-19F, -38.5F, -52F);

      LowerBody.setTextureSize(512, 256);

      LowerBody.mirror = true;

      setRotation(LowerBody, -0.1570796F, 0F, 0F);

      Tail1 = new ModelRenderer(this, 0, 111);

      Tail1.addBox(-15F, -14F, 0F, 30, 28, 28);

      Tail1.setRotationPoint(-19F, -24F, 27F);

      Tail1.setTextureSize(512, 256);

      Tail1.mirror = true;

      setRotation(Tail1, -0.122173F, 0F, 0F);

      Tail2 = new ModelRenderer(this, 0, 168);

      Tail2.addBox(-12.5F, -12.5F, 0F, 25, 25, 25);

      Tail2.setRotationPoint(-19F, -20.5F, 53F);

      Tail2.setTextureSize(512, 256);

      Tail2.mirror = true;

      setRotation(Tail2, -0.0349066F, 0F, 0F);

      Tail3 = new ModelRenderer(this, 0, 220);

      Tail3.addBox(-9F, -9F, 0F, 18, 18, 18);

      Tail3.setRotationPoint(-20F, -20F, 77F);

      Tail3.setTextureSize(512, 256);

      Tail3.mirror = true;

      setRotation(Tail3, 0F, 0F, 0F);

      LLegJoint = new ModelRenderer(this, 106, 74);

      LLegJoint.addBox(-12F, -5.5F, -6F, 12, 19, 16);

      LLegJoint.setRotationPoint(-36F, -31F, 9.7F);

      LLegJoint.setTextureSize(512, 256);

      LLegJoint.mirror = true;

      setRotation(LLegJoint, -0.1570796F, 0F, 0F);

      rupperleg = new ModelRenderer(this, 51, 71);

      rupperleg.addBox(-5.5F, 0F, -5.5F, 11, 24, 14);

      rupperleg.setRotationPoint(-42F, -25.8F, 9F);

      rupperleg.setTextureSize(512, 256);

      rupperleg.mirror = true;

      setRotation(rupperleg, -0.1570796F, 0F, 0F);

      lforeleg = new ModelRenderer(this, 0, 72);

      lforeleg.addBox(-5F, 0F, -6F, 10, 24, 12);

      lforeleg.setRotationPoint(4F, -4.1F, 5.8F);

      lforeleg.setTextureSize(512, 256);

      lforeleg.mirror = true;

      setRotation(lforeleg, 0.2268928F, 0F, 0F);

      RLegJoint = new ModelRenderer(this, 106, 74);

      RLegJoint.addBox(0F, -5.5F, -6F, 12, 19, 16);

      RLegJoint.setRotationPoint(-2F, -31F, 9.7F);

      RLegJoint.setTextureSize(512, 256);

      RLegJoint.mirror = true;

      setRotation(RLegJoint, -0.1570796F, 0F, 0F);

      rforeleg = new ModelRenderer(this, 0, 72);

      rforeleg.addBox(-5F, 0F, -6F, 10, 24, 12);

      rforeleg.setRotationPoint(-41.8F, -4.1F, 5.8F);

      rforeleg.setTextureSize(512, 256);

      rforeleg.mirror = true;

      setRotation(rforeleg, 0.2268928F, 0F, 0F);

      Ankle2 = new ModelRenderer(this, 0, 38);

      Ankle2.addBox(-5.5F, 0F, -6F, 11, 6, 12);

      Ankle2.setRotationPoint(-41.8F, 18.1F, 11F);

      Ankle2.setTextureSize(512, 256);

      Ankle2.mirror = true;

      setRotation(Ankle2, 0F, 0F, 0F);

      AnkleSidePad3 = new ModelRenderer(this, 0, 56);

      AnkleSidePad3.addBox(-1F, -2.5F, -5.5F, 1, 5, 11);

      AnkleSidePad3.setRotationPoint(-47F, 21.5F, 11F);

      AnkleSidePad3.setTextureSize(512, 256);

      AnkleSidePad3.mirror = true;

      setRotation(AnkleSidePad3, 0F, 0F, 0F);

      AnkleSidePad4 = new ModelRenderer(this, 0, 56);

      AnkleSidePad4.addBox(0F, -2.5F, -5.5F, 1, 5, 11);

      AnkleSidePad4.setRotationPoint(-37F, 21.5F, 11F);

      AnkleSidePad4.setTextureSize(512, 256);

      AnkleSidePad4.mirror = true;

      setRotation(AnkleSidePad4, 0F, 0F, 0F);

      AnklePadl1 = new ModelRenderer(this, 0, 35);

      AnklePadl1.addBox(-4.5F, -1F, -1F, 9, 2, 1);

      AnklePadl1.setRotationPoint(-42F, 20F, 5.5F);

      AnklePadl1.setTextureSize(512, 256);

      AnklePadl1.mirror = true;

      setRotation(AnklePadl1, 0F, 0F, 0F);

      Foot2 = new ModelRenderer(this, 0, 10);

      Foot2.addBox(-4.5F, -1.5F, -10F, 9, 3, 10);

      Foot2.setRotationPoint(-42F, 22.5F, 8F);

      Foot2.setTextureSize(512, 256);

      Foot2.mirror = true;

      setRotation(Foot2, 0F, 0F, 0F);

      Footsidel1 = new ModelRenderer(this, 0, 23);

      Footsidel1.addBox(-1F, -1.5F, -4.5F, 1, 3, 9);

      Footsidel1.setRotationPoint(-46F, 22.5F, 3F);

      Footsidel1.setTextureSize(512, 256);

      Footsidel1.mirror = true;

      setRotation(Footsidel1, 0F, 0F, 0F);

      Footsidel2 = new ModelRenderer(this, 0, 23);

      Footsidel2.addBox(0F, -1.5F, -4.5F, 1, 3, 9);

      Footsidel2.setRotationPoint(-38F, 22.5F, 3F);

      Footsidel2.setTextureSize(512, 256);

      Footsidel2.mirror = true;

      setRotation(Footsidel2, 0F, 0F, 0F);

      FootBall2 = new ModelRenderer(this, 0, 7);

      FootBall2.addBox(-4F, -1F, -1F, 8, 2, 1);

      FootBall2.setRotationPoint(-42F, 23F, -2F);

      FootBall2.setTextureSize(512, 256);

      FootBall2.mirror = true;

      setRotation(FootBall2, 0F, 0F, 0F);

      Toe4 = new ModelRenderer(this, 0, 0);

      Toe4.addBox(-1F, -1F, -5F, 2, 2, 5);

      Toe4.setRotationPoint(-39F, 23F, -3F);

      Toe4.setTextureSize(512, 256);

      Toe4.mirror = true;

      setRotation(Toe4, 0F, 0F, 0F);

      Toe5 = new ModelRenderer(this, 0, 0);

      Toe5.addBox(-1F, -1F, -5F, 2, 2, 5);

      Toe5.setRotationPoint(-42F, 23F, -3F);

      Toe5.setTextureSize(512, 256);

      Toe5.mirror = true;

      setRotation(Toe5, 0F, 0F, 0F);

      Toe6 = new ModelRenderer(this, 0, 0);

      Toe6.addBox(-1F, -1F, -5F, 2, 2, 5);

      Toe6.setRotationPoint(-45F, 23F, -3F);

      Toe6.setTextureSize(512, 256);

      Toe6.mirror = true;

      setRotation(Toe6, 0F, 0F, 0F);

      neck = new ModelRenderer(this, 150, 180);

      neck.addBox(-15F, -15F, 0F, 30, 28, 7);

      neck.setRotationPoint(-19F, -35F, -61F);

      neck.setTextureSize(512, 256);

      neck.mirror = true;

      setRotation(neck, -0.122173F, 0F, 0F);

      Head = new ModelRenderer(this, 227, 180);

      Head.addBox(-15F, -15F, -35F, 31, 30, 35);

      Head.setRotationPoint(-19.5F, -36F, -59F);

      Head.setTextureSize(512, 256);

      Head.mirror = true;

      setRotation(Head, 0F, 0F, 0F);

      Shoulder = new ModelRenderer(this, 74, 220);

      Shoulder.addBox(0F, -5F, -5F, 7, 10, 10);

      Shoulder.setRotationPoint(-1.5F, -32F, -28F);

      Shoulder.setTextureSize(512, 256);

      Shoulder.mirror = true;

      setRotation(Shoulder, -0.0698132F, 0F, 0F);

      Upperarm = new ModelRenderer(this, 52, 0);

      Upperarm.addBox(-1F, 0F, -4.5F, 6, 11, 9);

      Upperarm.setRotationPoint(0F, -27F, -28F);

      Upperarm.setTextureSize(512, 256);

      Upperarm.mirror = true;

      setRotation(Upperarm, -0.0698132F, 0F, 0F);

      lowerarm = new ModelRenderer(this, 90, 0);

      lowerarm.addBox(-3F, 0F, -15F, 6, 9, 18);

      lowerarm.setRotationPoint(2F, -16F, -28F);

      lowerarm.setTextureSize(512, 256);

      lowerarm.mirror = true;

      setRotation(lowerarm, -0.0698132F, 0F, 0F);

      finger1 = new ModelRenderer(this, 0, 0);

      finger1.addBox(-1F, -1F, -5F, 2, 2, 5);

      finger1.setRotationPoint(3.9F, -10F, -43F);

      finger1.setTextureSize(512, 256);

      finger1.mirror = true;

      setRotation(finger1, -0.0698132F, 0F, 0F);

      finger2 = new ModelRenderer(this, 0, 0);

      finger2.addBox(-1F, -1F, -5F, 2, 2, 5);

      finger2.setRotationPoint(3.9F, -13F, -43F);

      finger2.setTextureSize(512, 256);

      finger2.mirror = true;

      setRotation(finger2, -0.0698132F, 0F, 0F);

      finger3 = new ModelRenderer(this, 0, 0);

      finger3.addBox(-1F, -1F, -5F, 2, 2, 5);

      finger3.setRotationPoint(3.9F, -15.9F, -43F);

      finger3.setTextureSize(512, 256);

      finger3.mirror = true;

      setRotation(finger3, -0.0698132F, 0F, 0F);

      Shoulder1 = new ModelRenderer(this, 74, 220);

      Shoulder1.addBox(-7F, -5F, -5F, 7, 10, 10);

      Shoulder1.setRotationPoint(-36.5F, -32F, -28F);

      Shoulder1.setTextureSize(512, 256);

      Shoulder1.mirror = true;

      setRotation(Shoulder1, -0.0698132F, 0F, 0F);

      Upperarm1 = new ModelRenderer(this, 52, 0);

      Upperarm1.addBox(-5F, 0F, -4.5F, 6, 11, 9);

      Upperarm1.setRotationPoint(-38F, -27F, -28F);

      Upperarm1.setTextureSize(512, 256);

      Upperarm1.mirror = true;

      setRotation(Upperarm1, -0.0698132F, 0F, 0F);

      lowerarm1 = new ModelRenderer(this, 90, 0);

      lowerarm1.addBox(-3F, 0F, -15F, 6, 9, 18);

      lowerarm1.setRotationPoint(-40F, -16F, -28F);

      lowerarm1.setTextureSize(512, 256);

      lowerarm1.mirror = true;

      setRotation(lowerarm1, -0.0698132F, 0F, 0F);

      finger4 = new ModelRenderer(this, 0, 0);

      finger4.addBox(-1F, -1F, -5F, 2, 2, 5);

      finger4.setRotationPoint(-41.9F, -10F, -43F);

      finger4.setTextureSize(512, 256);

      finger4.mirror = true;

      setRotation(finger4, -0.0698132F, 0F, 0F);

      finger5 = new ModelRenderer(this, 0, 0);

      finger5.addBox(-1F, -1F, -5F, 2, 2, 5);

      finger5.setRotationPoint(-41.9F, -13F, -43F);

      finger5.setTextureSize(512, 256);

      finger5.mirror = true;

      setRotation(finger5, -0.0698132F, 0F, 0F);

      finger6 = new ModelRenderer(this, 0, 0);

      finger6.addBox(-1F, -1F, -5F, 2, 2, 5);

      finger6.setRotationPoint(-41.9F, -16F, -43F);

      finger6.setTextureSize(512, 256);

      finger6.mirror = true;

      setRotation(finger6, -0.0698132F, 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, entity);

    Toe1.render(f5);

    Toe2.render(f5);

    Toe3.render(f5);

    FootBall1.render(f5);

    Foot1.render(f5);

    Footsider1.render(f5);

    Footsider2.render(f5);

    Ankle.render(f5);

    AnklePadr1.render(f5);

    AnkleSidePad1.render(f5);

    AnkleSidePad2.render(f5);

    lupperleg.render(f5);

    LowerBody.render(f5);

    Tail1.render(f5);

    Tail2.render(f5);

    Tail3.render(f5);

    LLegJoint.render(f5);

    rupperleg.render(f5);

    lforeleg.render(f5);

    RLegJoint.render(f5);

    rforeleg.render(f5);

    Ankle2.render(f5);

    AnkleSidePad3.render(f5);

    AnkleSidePad4.render(f5);

    AnklePadl1.render(f5);

    Foot2.render(f5);

    Footsidel1.render(f5);

    Footsidel2.render(f5);

    FootBall2.render(f5);

    Toe4.render(f5);

    Toe5.render(f5);

    Toe6.render(f5);

    neck.render(f5);

    Head.render(f5);

    Shoulder.render(f5);

    Upperarm.render(f5);

    lowerarm.render(f5);

    finger1.render(f5);

    finger2.render(f5);

    finger3.render(f5);

    Shoulder1.render(f5);

    Upperarm1.render(f5);

    lowerarm1.render(f5);

    finger4.render(f5);

    finger5.render(f5);

    finger6.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, Entity entity)

  {

    super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

   

    this.neck.rotateAngleY = f3 / (180F / (float)Math.PI);

    this.neck.rotateAngleX = f4 / (180F / (float)Math.PI);

    this.Shoulder1.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F;

    this.Shoulder.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;

    this.Shoulder1.rotateAngleZ = 0.0F;

    this.Shoulder.rotateAngleZ = 0.0F;

    this.LLegJoint.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;

    this.RLegJoint.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.4F * f1;

    this.LLegJoint.rotateAngleY = 0.0F;

    this.RLegJoint.rotateAngleY = 0.0F;

  }

 

}

 

 

Render

package renderer;

 

import org.lwjgl.opengl.GL11;

 

import dma.Entity.EntityCameoPuppet;

import dma.Entity.EntityDavros;

import dma.Entity.EntityTrex;

import dma.main.main;

import dma.models.CameoPuppet;

import dma.models.Davros;

import dma.models.trex;

import net.minecraft.client.model.ModelBase;

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

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

import net.minecraft.entity.Entity;

import net.minecraft.entity.EntityLiving;

import net.minecraft.util.ResourceLocation;

 

public class RenderTrex extends RenderLiving {

 

private static final ResourceLocation texture = new ResourceLocation(main.MODID + ":" + "textures/models/" + "T-rex.png");

 

protected trex modelEntity;

 

public RenderTrex(ModelBase par1ModelBase, float par2) {

super(par1ModelBase, par2);

 

modelEntity = ((trex) mainModel);

 

}

 

public void renderTrex(EntityTrex entity, double x, double y, double z, float u, float v) {

super.doRender(entity, x, y, z, u, v);

 

}

public void doRenderLiving(EntityLiving entityLiving, double x, double y, double z, float u, float v) {

renderTrex((EntityTrex)entityLiving, x, y, z, u, v);

}

 

public void doRender(Entity entity, double x, double y, double z, float u, float v) {

renderTrex((EntityTrex)entity, x, y, z, u, v);

}

 

 

 

@Override

protected ResourceLocation getEntityTexture(Entity var1) {

return texture;

}

 

}

 

 

 

 

 

 

 

For building a dimension, I assume you must first create a biome and then build your dimension out of the biome or can you build the dimension as a biome per say, so it would register in the dimension what should be there?

 

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



×
×
  • Create New...

Important Information

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