My mob model won't work!

Started by Ellivers on Mon, 08/07/2017 - 18:09
Last seen on 15:09, 22. Nov 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
My mob model won't work!
Mon, 08/07/2017 - 18:09

I made a .java file with Techne and imported it to Mcreator. Here is what comes up in the console:

Executing gradle command: clean build
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. Med ensamr„tt.
C:\Pylo\MCreator175>cd forge
C:\Pylo\MCreator175\forge>SET "JAVA_HOME=C:\Pylo\MCreator175\jdk64\"
C:\Pylo\MCreator175\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator175\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator175\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" clean build 
This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril.
#################################################
         ForgeGradle 2.2-SNAPSHOT-d13a6c8        
  https://github.com/MinecraftForge/ForgeGradle  
#################################################
               Powered by MCP unknown               
             http://modcoderpack.com             
         by: Searge, ProfMobius, Fesh0r,         
         R4wk, ZeuX, IngisKahn, bspkrs           
#################################################
:clean
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\mcreator_frog.java:60: error: cannot find symbol
      RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new mcreator_frog.Model(), 0) {
                                                                                                                 ^
  symbol:   class Model
  location: class mcreator_frog
C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\mcreator_frog.java:238: error: method setRotationAngles in class ModelBase cannot be applied to given types;
         super.setRotationAngles(f, f1, f2, f3, f4, f5);
              ^
  required: float,float,float,float,float,float,Entity
  found: float,float,float,float,float,float
  reason: actual and formal argument lists differ in length
2 errors
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.696 secs
C:\Pylo\MCreator175\forge>
Task completed with return code 0 in 17729 milliseconds

Last seen on 01:01, 25. Nov 2017
Joined Jun 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
error: cannot find symbol    
Tue, 08/08/2017 - 03:17

error: cannot find symbol
      RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new mcreator_frog.Model(), 0) {

error: method setRotationAngles in class ModelBase cannot be applied to given types;
         super.setRotationAngles(f, f1, f2, f3, f4, f5);
              ^
  required: float,float,float,float,float,float,Entity
  found: float,float,float,float,float,float
  reason: actual and formal argument lists differ in length

There are 2 errors with your mob, so try fixing them.

Last seen on 15:09, 22. Nov 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:error: cannot find symbol    
Tue, 08/08/2017 - 17:05

@#1 But I have no idea what the errors are, thats why i'm asking for help.

Last seen on 13:12, 14. Sep 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
looks like you are missing
Tue, 08/08/2017 - 18:55

looks like you are missing entity after all the floats

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

Can you show me your java text

 

Last seen on 15:09, 22. Nov 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:looks like you are missing
Wed, 08/09/2017 - 10:48

@#2 Here it is:

package net.minecraft.src; //Exported java file //Keep in mind that you still need to fill in some blanks // - ZeuX   public class Frog extends ModelBase { public Frog() { Leg2 = new ModelRenderer(this, 0, 0); Leg2.addBox(0F, 0F, 0F, 1, 1, 6, 0F); Leg2.setRotationPoint(-3F, 23F, -2F); Leg2.rotateAngleX = 0F; Leg2.rotateAngleY = 0F; Leg2.rotateAngleZ = 0F; Leg2.mirror = false; Leg1 = new ModelRenderer(this, 0, 0); Leg1.addBox(0F, 0F, 0F, 1, 1, 6, 0F); Leg1.setRotationPoint(2F, 23F, -2F); Leg1.rotateAngleX = 0F; Leg1.rotateAngleY = 0F; Leg1.rotateAngleZ = 0F; Leg1.mirror = true; Body = new ModelRenderer(this, 0, 0); Body.addBox(0F, 0F, 0F, 4, 2, 5, 0F); Body.setRotationPoint(-2F, 21F, -1F); Body.rotateAngleX = 0F; Body.rotateAngleY = 0F; Body.rotateAngleZ = 0F; Body.mirror = false; Head = new ModelRenderer(this, 0, 0); Head.addBox(0F, 0F, 0F, 2, 2, 3, 0F); Head.setRotationPoint(-1F, 19F, -3F); Head.rotateAngleX = 0F; Head.rotateAngleY = 0F; Head.rotateAngleZ = 0F; Head.mirror = false; }   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); Leg2.render(f5); Leg1.render(f5); Body.render(f5); Head.render(f5); }   public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5); }   //fields public ModelRenderer Leg2; public ModelRenderer Leg1; public ModelRenderer Body; public ModelRenderer Head; }
Last seen on 13:12, 14. Sep 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
This is your entire java
Wed, 08/09/2017 - 14:13

This is your entire java exported by techne? Just a quick look it looks like your textures are set incorrectly as you have them all set to have no offset. Your leg mirror settings do not look correct.

If this is your export template from technet I think it has been modified as it does not look to be the normal output I see. What template version does it say yours is.

Just to go over how the java output goes with the Techne data input. I will use your Leg2 to discribe.

Leg2 = new ModelRenderer(this, 0, 0);This is your Texture offset. You usualy do not want all your textures to be in the same place so you change this. It chenges the upper right corner texture map.

Leg2.addBox(0F, 0F, 0F, 1, 1, 6, 0F);First three digits are the offset of the box. With out offset animations do not work correctly. Think of it as a pivot point.the next three digits are the Dimensions. The size of the box. No need for a forth digit(seventh in this one).

Leg2.setRotationPoint(-3F, 23F, -2F);This is the Position you want the box and takes into account any offset you have applied.

Leg2.rotateAngleX = 0F;These three boxes are your rotation angles and are the last three sets of numbers right above Mirror texture and are the angle in 3D space you want the box to be. How you want it tilted.
Leg2.rotateAngleY = 0F;
Leg2.rotateAngleZ = 0F;

I have added your data and applied an offset so that you could have the legs and head animate during import if you wanted. just have to add the java statements to it.If you want it I can add it.

// Date: 8/9/2017 9:52:34 AM

// Template version 1.1

// Java generated by Techne

// Keep in mind that you still need to fill in some blanks

// - ZeuX

 

 

package net.minecraft.src;

 

public class ModelFrog extends ModelBase
{
 
     //fields
   
     ModelRenderer Head;
   
     ModelRenderer Body;
   
     ModelRenderer Leg1;
   
     ModelRenderer Leg2;

 
  public ModelFrog()
  {

         textureWidth = 64;

         textureHeight = 32;

   
     Head = new ModelRenderer(this, 27, 18);

         Head.addBox(-1F, -2F, -3F, 2, 2, 3);

         Head.setRotationPoint(0F, 21F, 0F);

         Head.setTextureSize(64, 32);

         Head.mirror = true;

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

         Body = new ModelRenderer(this, 22, 10);

         Body.addBox(-2F, -1F, -2.5F, 4, 2, 5);

         Body.setRotationPoint(0F, 22F, 1F);

         Body.setTextureSize(64, 32);

         Body.mirror = true;

         setRotation(Body, 0F, 0F, 0F);

         Leg1 = new ModelRenderer(this, 6, 10);

         Leg1.addBox(0F, 0F, -3.5F, 1, 1, 6);

         Leg1.setRotationPoint(2F, 23F, 1.5F);

         Leg1.setTextureSize(64, 32);

         Leg1.mirror = true;

         setRotation(Leg1, 0F, 0F, 0F);

         Leg2 = new ModelRenderer(this, 6, 10);

         Leg2.addBox(-1F, 0F, -3.5F, 1, 1, 6);

         Leg2.setRotationPoint(-2F, 23F, 1.5F);

         Leg2.setTextureSize(64, 32);

         Leg2.mirror = true;

         setRotation(Leg2, 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, entity);

         Head.render(f5);

         Body.render(f5);

         Leg1.render(f5);

         Leg2.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);

  }

 

}

Last seen on 15:09, 22. Nov 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:This is your entire java
Wed, 08/09/2017 - 17:13

@#3 Yes it worked, but some things are not working correctly. Like the texture and the hitbox. And sorry, I don't know what the java statements are. Could you please do it for me?

Last seen on 15:09, 22. Nov 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Btw why are all parts set to
Wed, 08/09/2017 - 17:20

Btw why are all parts set to mirror?

Last seen on 15:09, 22. Nov 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Ok fixed by my own. Turned
Wed, 08/09/2017 - 18:20

Ok fixed by my own. Turned out I exported the wrong file from Techne this whole time :).

Thank you so much @GandyManCan for your help!

Now it's just one more problem, fixing the animation for my mob. It's body parts don't move at all.

Last seen on 13:12, 14. Sep 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
The mirror was me just doing
Wed, 08/09/2017 - 18:40

The mirror was me just doing it really quick. It is what ever you need it to be. The texture file can be generated in MCSkin3d. You just need an XML file. If you need one I have added it below. just add it to your Models directory in MCskin3d. I also added the techne file and a quick skin,

https://www.dropbox.com/s/0ldirvf67s51iut/Frog.png?dl=0

https://www.dropbox.com/s/6q0c17hh70u3y0n/Frog.tcn?dl=0

https://www.dropbox.com/s/24sgm5pbmuql3vo/Frog.xml?dl=0

 

Last seen on 13:12, 14. Sep 2017
Joined Aug 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:Ok fixed by my own. Turned
Wed, 08/09/2017 - 18:46

@#5

What do you need to animate. I have found a nice Solution that works really well and saves time in MCreator. Tell me what you are trying to do and I think I might be able to help you.