Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I have been having a slight issue with my techne model. All my other ones work, but not this one. It causes a random crash and the report leads me to the model class. I'll give you guys the model class so you can hopefully tell me what's wrong with it :D

 

Class:

package com.tmg.tmggunsmod;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class ModelTMGZombie6Demolisher extends ModelBase
{
  //fields
    ModelRenderer head;
    ModelRenderer body;
    ModelRenderer Shape1;
    ModelRenderer Shape2;
    ModelRenderer Shape3;
    ModelRenderer Shape4;
    ModelRenderer Shape5;
    ModelRenderer Shape7;
    ModelRenderer Shape8;
    ModelRenderer Shape9;
    ModelRenderer Shape11;
    ModelRenderer Shape12;
    ModelRenderer Shape15;
    ModelRenderer Shape13;
    ModelRenderer Shape14;
    ModelRenderer Shape10;
    ModelRenderer Shape6;
  
  public ModelTMGZombie6Demolisher()
  {
    textureWidth = 128;
    textureHeight = 64;
    
      head = new ModelRenderer(this, 0, 0);
      head.addBox(-4F, -8F, -4F, 8, 8, ;
      head.setRotationPoint(0F, -21F, -4F);
      head.setTextureSize(128, 64);
      head.mirror = true;
      setRotation(head, 0F, 0F, 0F);
      body = new ModelRenderer(this, 16, 38);
      body.addBox(-8F, 0F, -2F, 16, 18, ;
      body.setRotationPoint(0F, -24F, -2F);
      body.setTextureSize(128, 64);
      body.mirror = true;
      setRotation(body, 0F, 0F, 0F);
      Shape1 = new ModelRenderer(this, 32, 0);
      Shape1.addBox(0F, 0F, 0F, 1, 2, 2);
      Shape1.setRotationPoint(-6F, -15F, -1F);
      Shape1.setTextureSize(128, 64);
      Shape1.mirror = true;
      setRotation(Shape1, 0F, 0F, 0F);
      Shape2 = new ModelRenderer(this, 32, 0);
      Shape2.addBox(0F, 0F, 0F, 1, 2, 2);
      Shape2.setRotationPoint(5F, -15F, -1F);
      Shape2.setTextureSize(128, 64);
      Shape2.mirror = true;
      setRotation(Shape2, 0F, 0F, 0F);
      Shape3 = new ModelRenderer(this, 50, 0);
      Shape3.addBox(0F, 0F, 0F, 12, 6, 6);
      Shape3.setRotationPoint(-6F, -6F, -3F);
      Shape3.setTextureSize(128, 64);
      Shape3.mirror = true;
      setRotation(Shape3, 0F, 0F, 0F);
      Shape4 = new ModelRenderer(this, 80, 16);
      Shape4.addBox(-3F, 0F, -3F, 6, 24, 6);
      Shape4.setRotationPoint(-3F, 0F, 0F);
      Shape4.setTextureSize(128, 64);
      Shape4.mirror = true;
      setRotation(Shape4, 0F, 0.1396263F, 0.0349066F);
      Shape5.mirror = true;
      Shape5 = new ModelRenderer(this, 80, 16);
      Shape5.addBox(-3F, 0F, -3F, 6, 24, 6);
      Shape5.setRotationPoint(3F, 0F, 0F);
      Shape5.setTextureSize(128, 64);
      Shape5.mirror = true;
      setRotation(Shape5, 0F, -0.1396263F, -0.0349066F);
      Shape5.mirror = false;
      Shape7 = new ModelRenderer(this, 16, 22);
      Shape7.addBox(-2F, -3F, -3F, 6, 36, 6);
      Shape7.setRotationPoint(8F, -23F, 0F);
      Shape7.setTextureSize(128, 64);
      Shape7.mirror = true;
      setRotation(Shape7, -0.1396263F, -0.1396263F, -0.0698132F);
      Shape8 = new ModelRenderer(this, 96, 0);
      Shape8.addBox(-6F, -5F, -3F, 8, 8, ;
      Shape8.setRotationPoint(-5F, -25F, 2F);
      Shape8.setTextureSize(128, 64);
      Shape8.mirror = true;
      setRotation(Shape8, -0.1919862F, 0.1047198F, -0.2792527F);
      Shape9 = new ModelRenderer(this, 96, 0);
      Shape9.addBox(0F, -6F, -3F, 8, 8, ;
      Shape9.setRotationPoint(5F, -23F, 0F);
      Shape9.setTextureSize(128, 64);
      Shape9.mirror = true;
      setRotation(Shape9, -0.1919862F, -0.1047198F, 0.2792527F);
      Shape11 = new ModelRenderer(this, 96, 0);
      Shape11.addBox(-7F, -1F, 0F, 8, 8, ;
      Shape11.setRotationPoint(2F, -27F, 2F);
      Shape11.setTextureSize(128, 64);
      Shape11.mirror = true;
      setRotation(Shape11, -0.0698132F, -0.1919862F, -0.0349066F);
      Shape12 = new ModelRenderer(this, 96, 0);
      Shape12.addBox(0F, 0F, 0F, 8, 8, ;
      Shape12.setRotationPoint(-13F, -22F, -1F);
      Shape12.setTextureSize(128, 64);
      Shape12.mirror = true;
      setRotation(Shape12, 0.2268928F, -0.296706F, 0.0698132F);
      Shape15 = new ModelRenderer(this, 96, 0);
      Shape15.addBox(0F, -8F, 0F, 8, 8, ;
      Shape15.setRotationPoint(-2F, -3F, 0F);
      Shape15.setTextureSize(128, 64);
      Shape15.mirror = true;
      setRotation(Shape15, 0.0698132F, -0.0872665F, -0.0523599F);
      Shape13 = new ModelRenderer(this, 96, 0);
      Shape13.addBox(0F, 0F, 0F, 8, 8, ;
      Shape13.setRotationPoint(7F, -21F, 0F);
      Shape13.setTextureSize(128, 64);
      Shape13.mirror = true;
      setRotation(Shape13, 0.1047198F, 0.1396263F, 0.1047198F);
      Shape14 = new ModelRenderer(this, 96, 0);
      Shape14.addBox(0F, 0F, 0F, 8, 8, ;
      Shape14.setRotationPoint(-6F, -17F, 0F);
      Shape14.setTextureSize(128, 64);
      Shape14.mirror = true;
      setRotation(Shape14, -0.0698132F, -0.0872665F, -0.1745329F);
      Shape10 = new ModelRenderer(this, 96, 0);
      Shape10.addBox(0F, 0F, 0F, 8, 8, ;
      Shape10.setRotationPoint(0F, -22F, 2F);
      Shape10.setTextureSize(128, 64);
      Shape10.mirror = true;
      setRotation(Shape10, 0.1745329F, -0.3141593F, 0F);
      Shape6 = new ModelRenderer(this, 16, 22);
      Shape6.addBox(-4F, -3F, -3F, 6, 36, 6);
      Shape6.setRotationPoint(-8F, -23F, 0F);
      Shape6.setTextureSize(128, 64);
      Shape6.mirror = true;
      setRotation(Shape6, -0.1396263F, 0.1396263F, 0.0698132F);
  }
  
  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);
    head.render(f5);
    body.render(f5);
    Shape1.render(f5);
    Shape2.render(f5);
    Shape3.render(f5);
    Shape4.render(f5);
    Shape5.render(f5);
    Shape7.render(f5);
    Shape8.render(f5);
    Shape9.render(f5);
    Shape11.render(f5);
    Shape12.render(f5);
    Shape15.render(f5);
    Shape13.render(f5);
    Shape14.render(f5);
    Shape10.render(f5);
    Shape6.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);
  }

}

Any ideas? I apologise if this is messy.

 

      Shape5.mirror = true;
      Shape5 = new ModelRenderer(this, 80, 16);

 

Techne does this a lot.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

      Shape5.mirror = true;
      Shape5 = new ModelRenderer(this, 80, 16);

 

Techne does this a lot.

 

Basically delete the Shape5.mirror = true; line, and it should work. It's pretty much trying to define a boolean on a null variable.

Romejanic

 

Creator of Witch Hats, Explosive Chickens and Battlefield!

If you're going to be using models a lot, I would suggest adding Tabula by Ichun to your develpoment workspace. It's almost exactly the same as techne except that it's updated, the exported code works for 1.7 and there's some other features. It also runs in your mc client so there's no need to have another program open

      Shape5.mirror = true;
      Shape5 = new ModelRenderer(this, 80, 16);

 

Techne does this a lot.

 

Basically delete the Shape5.mirror = true; line, and it should work. It's pretty much trying to define a boolean on a null variable.

Don't delete
Shape5.mirror = true;

, just reverse the two lines.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.