Jump to content

Changing how an entity renders extending a vanilla entity 1.19.2


Goosums

Recommended Posts

Hey guys, I created a custom entity that is supposed to be almost a carbon copy of a sheep. Same behaviors and all that. The only difference is I am trying to change the size of the fur layer. My first thought was to create all the classes related to the entity as children of the respective sheep classes, which has worked after learning my way around them. The issue is now that I am moving onto creating the unique aspects of the creature, I can not seem to get the fur layer to render at different sizes as I would like.

I assumed that this would be done in my ExtraWoolySheepFurModel class in the createFurLayer method here: https://github.com/Goosums/WoollyWonders/blob/master/src/main/java/goosum/goosum/woollywonders/client/model/layer/ExtraWoollySheepFurModel.java

I toyed around with the various numbers in this method to no avail. I thought maybe this was something that should be done with the renderer for the fur layer, but when extending the SheepFurLayer class which is a child of RenderLayer, I had issues overriding the render method due to my entity not being a valid parameter in many places because it should be extending things like Entity, EntityType, or EntityModel which it seems like should not be an issue because the Sheep classes are descended from those classes. If anyone could help me with this, it would be greatly appreciated. I have been learning forge modding mostly from just reading the vanilla classes and some reading documentation, so if there are some things that seem very out of place, let me know, I might not be seeing the full picture in some spots. Here is the full Github Repo:

https://github.com/Goosums/WoollyWonders

Link to comment
Share on other sites

This is a basic java question that normally doesn't get answered here. Except to say buy a book on learning java or use java support forum.

 

But since this is your first post:

https://github.com/Goosums/WoollyWonders/blob/0fd272972785bd883fa5779d988c59d09996cdda/src/main/java/goosum/goosum/woollywonders/client/renderer/layer/ExtraWoollySheepFurLayer.java#L25

That model field does not override the final model field in SheepFurLayer.

You cannot override fields like you can methods. Even if you could the vanilla field is final.

Therefore SheepFurLayer.render() will not reference your model, it will use its own - the vanilla model.

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.