Java Models made in Tabula Not Working (Mcreator 2020.3)

Started by silent0cicadia on Sat, 07/25/2020 - 22:54

Topic category: Help with modding (Java Edition)

Last seen on 19:46, 19. Oct 2020
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Java Models made in Tabula Not Working (Mcreator 2020.3)
Mon, 07/27/2020 - 06:08 (edited)

A simuliar question was asked before:

https://mcreator.net/tracker/issue/60020

However the coding of the .java file I am trying to upload is diffrent from that one in that post. I am using Tabula for 1.15 to create the models and exporting them as java files. However when I try to upload any of them to Mcreator it says that that the model's name is not a valid java name and that I need the model class name. this is what the inside of the file looks like:

                                                                                                                                                             

package net.minecraft.src;

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;

/**
 * LongHorn - Either Mojang or a mod author (Taken From Memory)
 * Created using Tabula 8.0.0
 */
@OnlyIn(Dist.CLIENT)
public class Modellonghorn<T extends Entity> extends EntityModel<T> {
    public ModelRenderer body;
    public ModelRenderer backleftleg;
    public ModelRenderer frontleftleg;
    public ModelRenderer backrightleg;
    public ModelRenderer frontrightleg;
    public ModelRenderer head;
    public ModelRenderer tighthorntip;
    public ModelRenderer lefthorntip;
    public ModelRenderer lefthornbase;
    public ModelRenderer righthornbase;

    public Modellonghorn() {
        this.textureWidth = 80;
        this.textureHeight = 60;
        this.backleftleg = new ModelRenderer(this, 0, 35);
        this.backleftleg.mirror = true;
        this.backleftleg.setRotationPoint(4.0F, 12.0F, 7.0F);
        this.backleftleg.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, 0.0F, 0.0F, 0.0F);
        this.lefthornbase = new ModelRenderer(this, 26, 56);
        this.lefthornbase.mirror = true;
        this.lefthornbase.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.lefthornbase.addBox(4.0F, -3.7F, -3.2F, 8.0F, 2.0F, 2.1F, 0.0F, 0.0F, 0.0F);
        this.body = new ModelRenderer(this, 31, 22);
        this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
        this.body.addBox(-6.0F, -10.0F, -7.0F, 12.0F, 18.0F, 10.0F, 0.0F, 0.0F, 0.0F);
        this.body.addBox(-2.0F, 2.0F, -8.0F, 4.0F, 6.0F, 1.0F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(body, 1.5707963267948966F, 0.0F, 0.0F);
        this.backrightleg = new ModelRenderer(this, 0, 35);
        this.backrightleg.setRotationPoint(-4.0F, 12.0F, 7.0F);
        this.backrightleg.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, 0.0F, 0.0F, 0.0F);
        this.frontleftleg = new ModelRenderer(this, 0, 35);
        this.frontleftleg.mirror = true;
        this.frontleftleg.setRotationPoint(4.0F, 12.0F, -6.0F);
        this.frontleftleg.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, 0.0F, 0.0F, 0.0F);
        this.righthornbase = new ModelRenderer(this, 26, 56);
        this.righthornbase.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.righthornbase.addBox(-12.0F, -3.8F, -3.3F, 8.0F, 2.0F, 2.1F, 0.0F, 0.0F, 0.0F);
        this.lefthorntip = new ModelRenderer(this, 1, 56);
        this.lefthorntip.mirror = true;
        this.lefthorntip.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.lefthorntip.addBox(11.4F, -1.9F, 3.2F, 8.7F, 1.5F, 1.3F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(lefthorntip, 0.0F, 0.5082398928281348F, -0.1494001912944076F);
        this.head = new ModelRenderer(this, 0, 17);
        this.head.mirror = true;
        this.head.setRotationPoint(0.0F, 4.0F, -8.0F);
        this.head.addBox(-4.0F, -4.0F, -6.0F, 8.0F, 8.0F, 6.0F, 0.0F, 0.0F, 0.0F);
        this.frontrightleg = new ModelRenderer(this, 0, 35);
        this.frontrightleg.setRotationPoint(-4.0F, 12.0F, -6.0F);
        this.frontrightleg.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 4.0F, 0.0F, 0.0F, 0.0F);
        this.tighthorntip = new ModelRenderer(this, 1, 56);
        this.tighthorntip.setRotationPoint(0.0F, 0.0F, 0.0F);
        this.tighthorntip.addBox(-21.0F, -1.9F, 3.4F, 10.0F, 1.5F, 1.3F, 0.0F, 0.0F, 0.0F);
        this.setRotateAngle(tighthorntip, 0.0F, -0.5475098009980072F, 0.1563815016444822F);
        this.head.addChild(this.lefthornbase);
        this.head.addChild(this.righthornbase);
        this.head.addChild(this.lefthorntip);
        this.head.addChild(this.tighthorntip);
    }

    @Override
    public void render(MatrixStack matrixStackIn, IVertexBuilder bufferIn, int packedLightIn, int packedOverlayIn, float red, float green, float blue, float alpha) {
        ImmutableList.of(this.backleftleg, this.body, this.backrightleg, this.frontleftleg, this.head, this.frontrightleg).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;
    }
}

                                                                                                                                                             

I do not know where the exact model name is supposed to be. Where would it be and are there any other things that I need to do?

Edited by silent0cicadia on Mon, 07/27/2020 - 06:08
You could at least include…
Sun, 07/26/2020 - 07:57

You could at least include build log, and link it to pastebin for example

Last seen on 19:46, 19. Oct 2020
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Never mind, I figured out a…
Mon, 07/27/2020 - 04:35

Never mind, I figured out a way.

Blockbench is able to convert Tabula files into Java files. You just need to import the Tabula model then export it as a java one.

 

Last seen on 19:46, 19. Oct 2020
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I get the build log?…
Mon, 07/27/2020 - 06:10

How do I get the build log? I've never had issues before so I never really needed to ever try and look for it.

Last seen on 19:46, 19. Oct 2020
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Nevermind that, now…
Mon, 07/27/2020 - 06:11

Nevermind that, now Blockbench isn't doing anything.

Last seen on 17:22, 18. Jun 2021
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Bro we gotta use a tbl to bb…
Thu, 08/06/2020 - 02:16

Bro we gotta use a tbl to bb file type sadly becuase of how mcerator  is built for 1.15 models