My mob model won't work!

Started by Ellivers on

Topic category: Help with MCreator software

Last seen on 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My mob model won't work!

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 18:36, 5. Feb 2022
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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, 12. Mar 2018
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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, 12. Mar 2018
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

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

Btw why are all parts set to mirror?

Last seen on 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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, 12. Mar 2018
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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, 12. Mar 2018
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I want to animate the head
Thu, 08/10/2017 - 09:07

I want to animate the head and the legs. When I load the file into Mcreator there comes up a Model Creator Wizard. I selected the head and the legs but it still doesn't work.

I also want to change the hitbox of the mob.

Last seen on 13:12, 12. Mar 2018
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need to add the following to
Thu, 08/10/2017 - 11:52

Need to add the following to the java file before importing. You do not have to worry about the Wizard in MCreator. You do not have to assign anything. It is doen during import if assigned in the import file. It will not show that it is assigned but it will work without issue. I never got the wizard to work and this is my work around. I founf it easier to just make several techne export templates with different bodypart rotations. Just requires you to have a strick namming convention. But that is a good thing when doing several MOB's as you want to keep thing the same as it is way easier to code if you stick to namming things to a given manner.

So on the java file after the last statement:

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

Add (Change head,leftleg, and rightleg with what names you used in techne.)

this.head.rotateAngleY = f3 / (180F / (float)Math.PI);
this.head.rotateAngleX = f4 / (180F / (float)Math.PI);
this.leftleg.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1;
this.rightleg.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1;

I will link a working file for you to look at for comparison. it is simple and does not jump but all parts work. just got to change things to what you want.

https://www.dropbox.com/s/ub01bwomiz17p75/Frog.java?dl=0

Last seen on 00:49, 8. Jan 2018
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
did you use on first page
Thu, 08/10/2017 - 16:50

did you use on first page monster on second (insert whatever you want -here-) or thats with custom models anyway so thats how i fixed it

 

Last seen on 19:56, 11. Aug 2019
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Need to add the following to
Thu, 08/10/2017 - 18:26

Thanks @#8

Why are there two heads in the code?