Your model name is not a valid Java name! Tabula

Started by MammaJammmas on Sat, 08/22/2020 - 04:21

Topic category: Bugs and solutions

Last seen on 06:25, 4. Oct 2020
Joined May 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Your model name is not a valid Java name! Tabula
Sat, 08/22/2020 - 04:21

Hi i've exported a tabula java model and i've imported it into mcreator but it wont important, could you beable to explain this? here is the coding.

 

package my.first.mod.model;

import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.renderer.entity.model.EntityModel;
import net.minecraft.client.renderer.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

/**
 * CobbleMonster - Skap
 * Created using Tabula 8.0.0
 */
@OnlyIn(Dist.CLIENT)
public class CobbleMonster<T extends Entity> extends EntityModel<T> {
    public ModelRenderer Head;
    public ModelRenderer Body;
    public ModelRenderer Torso;
    public ModelRenderer RightArm;
    public ModelRenderer RightLeg;
    public ModelRenderer LeftLeg;
    public ModelRenderer LeftArm;
    public ModelRenderer RightArm2;
    public ModelRenderer LeftArm2;

    public CobbleMonster() {
        this.textureWidth = 64;
        this.textureHeight = 32;
        this.Head = new ModelRenderer(this, 0, 0);
        this.Head.setRotationPoint(-2.5F, 6.0F, -7.7F);
        this.Head.addBox(0.0F, 0.0F, 0.0F, 5.5F, 5.5F, 5.0F, 0.0F, 0.0F, 0.0F);
        this.Torso = new ModelRenderer(this, 44, 15);
        this.Torso.setRotationPoint(2.0F, 10.0F, 1.0F);
        this.Torso.addBox(0.0F, 0.0F, 0.0F, 7.0F, 3.0F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.LeftLeg = new ModelRenderer(this, 52, 21);
        this.LeftLeg.setRotationPoint(8.0F, 0.0F, 0.0F);
        this.LeftLeg.addBox(0.0F, 0.0F, 0.0F, 3.0F, 5.0F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.Body = new ModelRenderer(this, 32, 0);
        this.Body.setRotationPoint(-2.8F, 0.0F, 5.0F);
        this.Body.addBox(0.0F, 0.0F, 0.0F, 11.0F, 10.0F, 5.0F, 0.0F, 0.0F, 0.0F);
        this.RightLeg = new ModelRenderer(this, 32, 15);
        this.RightLeg.setRotationPoint(-2.0F, 3.0F, 0.0F);
        this.RightLeg.addBox(0.0F, 0.0F, 0.0F, 3.0F, 5.0F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.RightArm = new ModelRenderer(this, 0, 22);
        this.RightArm.setRotationPoint(-2.0F, 0.5F, 1.0F);
        this.RightArm.addBox(0.0F, 0.0F, 0.0F, 2.0F, 7.0F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.LeftArm2 = new ModelRenderer(this, 11, 14);
        this.LeftArm2.setRotationPoint(1.0F, 7.0F, 0.0F);
        this.LeftArm2.addBox(0.0F, 0.0F, 0.0F, 1.5F, 5.0F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.LeftArm = new ModelRenderer(this, 10, 22);
        this.LeftArm.setRotationPoint(13.0F, 0.0F, 0.0F);
        this.LeftArm.addBox(0.0F, 0.0F, 0.0F, 2.0F, 7.0F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.RightArm2 = new ModelRenderer(this, 0, 14);
        this.RightArm2.setRotationPoint(-0.5F, 7.0F, 0.0F);
        this.RightArm2.addBox(0.0F, 0.0F, 0.0F, 1.5F, 5.0F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.Body.addChild(this.Torso);
        this.RightLeg.addChild(this.LeftLeg);
        this.Head.addChild(this.Body);
        this.Torso.addChild(this.RightLeg);
        this.Body.addChild(this.RightArm);
        this.LeftArm.addChild(this.LeftArm2);
        this.RightArm.addChild(this.LeftArm);
        this.RightArm.addChild(this.RightArm2);
    }

    @Override
    public void render(MatrixStack matrixStackIn, IVertexBuilder bufferIn, int packedLightIn, int packedOverlayIn, float red, float green, float blue, float alpha) { 
        ImmutableList.of(this.Head).forEach((modelRenderer) -> { 
            modelRenderer.render(matrixStackIn, bufferIn, packedLightIn, packedOverlayIn, red, green, blue, alpha);
        });
    }

    @Override
    public void setRotationAngles(T entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {}

    /**
     * This is a helper function from Tabula to set the rotation of model parts
     */
    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}
 

Last seen on 17:11, 31. Oct 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Change public class…
Sat, 08/22/2020 - 07:51

Change

public class CobbleMonster<T extends Entity> extends EntityModel<T> {

to

public class CobbleMonster extends EntityModel {

This will be fixed in 2020.5.

Last seen on 17:51, 27. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I did this in my model and…
Tue, 10/20/2020 - 14:10

I did this in my model and... 

public void setRotationAngles(T entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
^
symbol: class T
location: class ModelGasterBlasterActive
1 error
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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#se…
BUILD FAILED in 14s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 35836 milliseconds
 

Last seen on 17:51, 27. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The model code looks like…
Tue, 10/20/2020 - 14:11

The model code looks like this 

 

package my.first.mod.model;

import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.renderer.entity.model.EntityModel;
import net.minecraft.client.renderer.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

/**
 * GasterBlasterActive - Gustavo_263
 * Created using Tabula 8.0.0
 */
@OnlyIn(Dist.CLIENT)
public class ModelGasterBlasterActive extends EntityModel {   public ModelRenderer part1;
    public ModelRenderer part2;
    public ModelRenderer part3;
    public ModelRenderer part4;
    public ModelRenderer part5;
    public ModelRenderer part6;
    public ModelRenderer part7;
    public ModelRenderer part8;
    public ModelRenderer part9;
    public ModelRenderer part10;
    public ModelRenderer part11;
    public ModelRenderer part12;
    public ModelRenderer part13;
    public ModelRenderer part14;
    public ModelRenderer part15;
    public ModelRenderer part16;
    public ModelRenderer part17;
    public ModelRenderer part18;
    public ModelRenderer part20;

    public ModelGasterBlasterActive() {
        this.textureWidth = 64;
        this.textureHeight = 64;
        this.part1 = new ModelRenderer(this, 9, 13);
        this.part1.setRotationPoint(-0.8F, 20.2F, -2.5F);
        this.part1.setTextureOffset(0, 18).addBox(0.0F, 0.0F, 0.0F, 2.0F, 1.0F, 5.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part1, 0.45535640450848164F, 0.0F, 0.0F);
        this.part7 = new ModelRenderer(this, 0, 0);
        this.part7.setRotationPoint(1.7F, 22.1F, -1.4F);
        this.part7.addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 4.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part7, 0.13491395151205682F, 0.13665927909957545F, 0.0F);
        this.part9 = new ModelRenderer(this, 0, 0);
        this.part9.setRotationPoint(2.8F, 19.7F, 2.4F);
        this.part9.addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2.0F, -0.1F, -0.1F, -0.1F);
        this.setRotateAngle(part9, -0.001745329278001762F, 0.0F, 0.0F);
        this.part14 = new ModelRenderer(this, 0, 0);
        this.part14.setRotationPoint(-2.7F, 19.6F, 3.6F);
        this.part14.addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2.0F, -0.2F, -0.2F, -0.2F);
        this.setRotateAngle(part14, -0.001745329278001762F, 0.0F, 0.0F);
        this.part18 = new ModelRenderer(this, 21, 0);
        this.part18.setRotationPoint(-2.4F, 18.4F, -0.1F);
        this.part18.setTextureOffset(0, 3).addBox(0.0F, 0.0F, 0.0F, 3.0F, 2.0F, 2.0F, -0.5F, -0.5F, -0.5F);
        this.part13 = new ModelRenderer(this, 0, 0);
        this.part13.setRotationPoint(-2.8F, 19.7F, 2.4F);
        this.part13.addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2.0F, -0.1F, -0.1F, -0.1F);
        this.part16 = new ModelRenderer(this, 0, 0);
        this.part16.setRotationPoint(-2.2F, 22.1F, -1.4F);
        this.part16.addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 4.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part16, 0.13491395151205682F, -0.13491395151205682F, 0.0F);
        this.part3 = new ModelRenderer(this, 0, 0);
        this.part3.setRotationPoint(1.1F, 21.1F, -2.1F);
        this.part3.addBox(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 5.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part3, 0.45535640450848164F, -0.45535640450848164F, 0.7740534966278743F);
        this.part10 = new ModelRenderer(this, 0, 0);
        this.part10.setRotationPoint(-1.4F, 21.8F, -1.5F);
        this.part10.addBox(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 5.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part10, 0.45535640450848164F, 0.45535640450848164F, -0.7740534966278743F);
        this.part17 = new ModelRenderer(this, 21, 0);
        this.part17.setRotationPoint(0.0F, 18.4F, -0.1F);
        this.part17.setTextureOffset(0, 3).addBox(0.0F, 0.0F, 0.0F, 3.0F, 2.0F, 2.0F, -0.5F, -0.5F, -0.5F);
        this.part11 = new ModelRenderer(this, 0, 0);
        this.part11.setRotationPoint(-2.1F, 21.3F, 0.4F);
        this.part11.addBox(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part11, 0.45535640450848164F, 0.45535640450848164F, -0.7740534966278743F);
        this.part20 = new ModelRenderer(this, 0, 0);
        this.part20.setRotationPoint(0.0F, 21.7F, -47.6F);
        this.part20.setTextureOffset(9, 36).addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 20.0F, 0.0F, 0.0F, 27.8F);
        this.part5 = new ModelRenderer(this, 0, 0);
        this.part5.setRotationPoint(2.5F, 20.7F, 1.1F);
        this.part5.addBox(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 2.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part5, 0.4536110685985846F, -0.45535640450848164F, 0.7740534966278743F);
        this.part2 = new ModelRenderer(this, 0, 0);
        this.part2.setRotationPoint(-0.1F, 18.0F, 2.2F);
        this.part2.addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F, 0.07F, 0.0F, 0.2F);
        this.setRotateAngle(part2, 0.4098033003787853F, 0.0F, 0.0F);
        this.part12 = new ModelRenderer(this, 0, 0);
        this.part12.setRotationPoint(-2.6F, 21.1F, 1.6F);
        this.part12.addBox(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 2.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part12, 0.45535640450848164F, 0.45535640450848164F, -0.7754497919874028F);
        this.part6 = new ModelRenderer(this, 0, 0);
        this.part6.setRotationPoint(2.4F, 20.6F, 1.9F);
        this.part6.addBox(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F, -0.2F, -0.2F, -0.2F);
        this.setRotateAngle(part6, -0.001745329278001762F, 0.0F, 0.0F);
        this.part4 = new ModelRenderer(this, 0, 0);
        this.part4.setRotationPoint(1.8F, 20.6F, -0.1F);
        this.part4.addBox(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 3.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(part4, 0.4536110685985846F, -0.45535640450848164F, 0.7740534966278743F);
        this.part8 = new ModelRenderer(this, 0, 0);
        this.part8.setRotationPoint(2.7F, 19.6F, 3.6F);
        this.part8.addBox(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2.0F, -0.2F, -0.2F, -0.2F);
        this.setRotateAngle(part8, -0.001745329278001762F, 0.0F, 0.0F);
        this.part15 = new ModelRenderer(this, 0, 0);
        this.part15.setRotationPoint(-2.5F, 20.4F, 1.9F);
        this.part15.addBox(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F, -0.2F, -0.2F, -0.2F);
    }

    @Override
    public void render(MatrixStack matrixStackIn, IVertexBuilder bufferIn, int packedLightIn, int packedOverlayIn, float red, float green, float blue, float alpha) { 
        ImmutableList.of(this.part1, this.part7, this.part9, this.part14, this.part18, this.part13, this.part16, this.part3, this.part10, this.part17, this.part11, this.part20, this.part5, this.part2, this.part12, this.part6, this.part4, this.part8, this.part15).forEach((modelRenderer) -> { 
            modelRenderer.render(matrixStackIn, bufferIn, packedLightIn, packedOverlayIn, red, green, blue, alpha);
        });
    }

    @Override
    public void setRotationAngles(T entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {}

    /**
     * This is a helper function from Tabula to set the rotation of model parts
     */
    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}
 

Last seen on 17:42, 30. Oct 2020
Joined May 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
At this point it is getting…
Tue, 10/20/2020 - 18:51

At this point it is getting to a ridiculous level. Over 50% of Klemen's comments are:

Read the publishing guidelines or Please use the search function

Last seen on 17:51, 27. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
MCreator 2020.4
Wed, 10/21/2020 - 11:28

MCreator 2020.4

Last seen on 17:51, 27. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
1.15.2
Wed, 10/21/2020 - 13:44

1.15.2

Last seen on 17:51, 27. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
the model aswell was made…
Wed, 10/21/2020 - 13:44

the model aswell was made for 1.15.2 and made in Tabula 1.15.2

Last seen on 17:11, 31. Oct 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Seems tabula makes generic…
Wed, 10/21/2020 - 14:03

Seems tabula makes generic models with generics (notice T in method signature). This is not really compatible with MCreator.

Blockbench is known to work well.

Last seen on 17:51, 27. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
ok
Wed, 10/21/2020 - 14:05

ok

Last seen on 17:51, 27. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Welp lets go waste more…
Wed, 10/21/2020 - 14:06

Welp lets go waste more hours to remake the same model...