Jump to content

Recommended Posts

Posted

Hey, so I started codding a mod just a few days ago and I'm not so sure why my code does not work. I have followed tutorials but it still does not work. 

My two problems are at my ClienteEventBusSubscriber.class and my Main class (which is KeanuMod.class).

The first one keeps asking me for IRenderFactory, but everything I try to do does not work.

And the Main class says something about need LivingEntity, but I do not know the difference in this and CreatureEntity (which is the one i extended in my entity class).

Also, there is a class named CyberKeanuFactory, which is just a failed attempt of mine to make an IRenderFactory.

I'm not an expert on this, so I very much appreciate your kindness. Thank you for reading.

 

 

 

 

This is my code in github : https://github.com/GigiTeddy/KeanuTest

This is the tutorial i followed

 

Posted
12 hours ago, TheGreyGhost said:

hi

 

This tutorial has two examples of entity registration that you might find helpful

https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe81_entity_projectile

 

-tgg

Hey again, i followed what you sent me and one of my two problems is now gone.
I copied his registration event in the main class and it probably worked (I cannot play it still to test it out but the red error is gone now)

But i still cannot correct my "ClientEventBusSubscriber" which is yours "StartupClientOnly" class.

I copied your IRe nder factory for the boomerang but i still get this error (Screenshot_3.png)

I might have got it wrong but idk. I will keep on trying to find a solution but appreciate any help here. Thanks. 

 

Screenshot_3.png

Posted

Ok, so I tried something, I added this into ClientEventBusSubscriber.class:

 

private static EntityType<CyberKeanu> cyberKeanuEntityType;

 

And so I got no errors doing :

 

RenderingRegistry.registerEntityRenderingHandler(ClientEventBusSubscriber.cyberKeanuEntityType, new CyberKeanuRenderFactory());

 

*But the

 

Posted

Ok, so I tried something, I added this into ClientEventBusSubscriber.class:

 

    private static EntityType<CyberKeanu> cyberKeanuEntityType;

 

And so I got no errors doing :

 

    RenderingRegistry.registerEntityRenderingHandler(ClientEventBusSubscriber.cyberKeanuEntityType, new CyberKeanuRenderFactory());

 

*But the game crashed when I started*

This is the lastest log of this crash : https://www.dropbox.com/s/9mene0urd6pt2t4/latest.log?dl=0

And this is the debug log of this crash : https://www.dropbox.com/s/exr4td5tkzoczsj/debug.log?dl=0

 

Posted

Ok, i was having somoe trouble with git bash but i finally did upload the correct folder to git hub. Now it has all entities folder https://github.com/GigiTeddy/keanu5/tree/master/src/main/java/me/TeddyTheGamer/KeanuMod

 

I added just o reference in ClientEventBusSubscriber.class that cyberKeanuEntityType is EntityType<CyberKeanu>. I was just trying to correct the error somehow.

 

If you could please take another look at my code I would be grateful. 

And if you have any link to a 1.16.4 entity tutorial that would helpme  with this problem, please link it down.

Thank you.

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.

Announcements



×
×
  • Create New...

Important Information

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