Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

 

  • Author
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

  • Author

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

 

  • Author

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

 

  • Author

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.