Custom entities are invisible

Published by CR1MS4NE on Wed, 06/03/2020 - 13:30
Status
Resolved
Type
Product/platform
MCreator/macOS
Priority
Normal
Issue description

I made a custom entity, and it has both a model and a texture, but it’s completely indivisible ingame. All that appears is its shadow.

Issue comments

When possible, attach your MCreator workspace (or even better a minimal example workspace required to reproduce the bug), game logs (full logs, do not crop them, in text format, not screenshots of logs) from the Console tab or terminal and steps to reproduce the bug in your workspace. If logs are long, use service such as Pastebin to host the log and provide the link to the log from the ticket. Please specify which mod elements to check in your workspace too, if applicable.
 

There is no file now attached.

Previous zip physically did not have any file mentioning Gummy Worm, I did a recursive search in files. Strange.

Every part/cube needs too be in a group, just so you know. (Not sure if thats the problem tho)

a lot of people is having this bug for some reason.

In 99% cases this is caused by invalid texture or JSON configuration because the way MC is written, it just gives up on parts of rendering system when things like this happen. Logs tell more than you could think and just checking them usually tells the root of this problem 

 

OP: Consider uploading the workspace to a service like mega, mediafire, dropbox, ... and link it here.

Code of your model:

// Made with Blockbench 3.5.2
// Exported for Minecraft version 1.14
// Paste this class into your mod and generate all required imports

public static class Modelcustom_model extends EntityModel {

	public Modelcustom_model() {
		textureWidth = 32;
		textureHeight = 32;

	}

	@Override
	public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

	}

	public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
		modelRenderer.rotateAngleX = x;
		modelRenderer.rotateAngleY = y;
		modelRenderer.rotateAngleZ = z;
	}

	public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) {
		super.setRotationAngles(f, f1, f2, f3, f4, f5, e);
	}
}

There is not a single part defined in model code so there is nothing to render.

Make sure to use proper model.

@Override
	public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {

	}

This part for instance has empty body

Is everything in a group? Because this has happened to me, and I fixed it by putting everything in a group.

Putting it in a group gave this error message:

Executing 
    Gradle task: build

Build 
    info: MCreator 2020.3.22116, forge-1.14.4, 64-bit, 8192 MB, Mac OS X, JVM 
    1.8.0_252, JAVA_HOME: 
    /Applications/MCreator.app/Contents/MacOS/jdk/Contents/Home/jre


    Configure project :

New 
    Dep: 
    net.minecraftforge:forge:1.14.4-28.2.16_mapped_snapshot_20190719-1.14.3


    Task :compileJava FAILED

/Users/user/MCreatorWorkspaces/scarybutcoolstuff/src/main/java/net/mcreator/theconfection/entity/GummyWormEntity.java:243: 
    error: cannot find symbol 
 
         public void render(MatrixStack matrixStack, IVertexBuilder buffer, 
    int packedLight, int packedOverlay, float red, float green, float blue,

 
                            ^

 
     symbol:   class MatrixStack

 
     location: class Modelcustom_model

/Users/user/MCreatorWorkspaces/scarybutcoolstuff/src/main/java/net/mcreator/theconfection/entity/GummyWormEntity.java:243: 
    error: cannot find symbol 
 
         public void render(MatrixStack matrixStack, IVertexBuilder buffer, 
    int packedLight, int packedOverlay, float red, float green, float blue,

 
                                                     ^

 
     symbol:   class IVertexBuilder

 
     location: class Modelcustom_model


    errors

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.9/userguide/command_line_interface.html#sec:c…

BUILD 
    FAILED in 4s


    actionable task: 1 executed

BUILD 
    FAILED

Task 
    completed in 7441 milliseconds



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.