Jump to content

Trying to create an Entity but the renderer doesn't work


Windokk

Recommended Posts

Your renderer doesn't do anything? Except call super which just has code to the draw the name tag if it has one.

https://github.com/Windokk/MilitaryElements/blob/07bc182d4d1edb30d088ae6a89cd1d448c5fdc6b/src/main/java/com/windokkstudio/militaryelements/render/JeepRenderer.java#L21

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Draw stuff.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

This is not a teaching forum.

Look at the vanilla entity renderer classes or find a mod that does something like what you want.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

1 hour ago, Windokk said:

How do i do it ? I mean, could you maybe share what the renderer should look like ?

 

First, try at least render you model in entity renderrer

private EntityModel<JeepEntity> model;
  
public JeepRenderer(EntityRendererProvider.Context context) {
        super(context);
        model = new JeepModel(context.bakeLayer(JeepModel.LAYER_LOCATION));
    }

@Override
    public void render(JeepEntity entity, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight)
    {
        poseStack.pushPose();
        VertexConsumer vertexConsumer = bufferSource.getBuffer(this.model.renderType(TEXTURE));
        model.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0f, 1.0f, 1.0f, 1.0f);
        poseStack.popPose();
        super.render(entity, entityYaw, partialTicks, poseStack, bufferSource, packedLight);
    }

 

Edited by Bonibom
Link to comment
Share on other sites

@Bonibom if you spoon feed the basics to the original poster they will never learn.

All that will happen is;

1) They will keep coming back for more and you will end up writing their mod for them

2) When they release their mod, they won't know what it does, and it will likely break other people's world. They will then come back here expecting us to fix their mod for them.

 

Not being a teaching forum is deliberate choice.

It forces people that post here to understand for themselves what they are doing. Instead of just copy/pasting code.

And without learning the basics, they probably won't understand any answers they are given anyway.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

22 minutes ago, Windokk said:

@warjort

Maybe instead of telling him not to help me, you could explain to me better than just telling me: just figure it out yourself

I'm not telling them not to help you.

I'm telling them that by doing all the work for you, they are not really helping you.

 

Also, can you imagine what would happen if we answered every question like yours?

All the volunteers would just leave, it would just be too much work answering the same old boring/trivial questions over and over again.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.