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 guys,

 

I have an entity class and two subclasses from it.

But it seems that they are not registered correctly as they are rendering the same although two different renderers have been registered but they still render as the main class.

 

enbecko

  • Author

int id = EntityRegistry.findGlobalUniqueEntityId();
       EntityRegistry.registerModEntity(EntityTrain.class, "train", id, this, 80, 1, true);
       EntityRegistry.registerGlobalEntityID(EntityTrain.class, "train", id);

       int id3 = EntityRegistry.findGlobalUniqueEntityId();
       EntityRegistry.registerModEntity(EntityMainTrain.class, "mainTrain", id3, this, 80, 1, true);
       EntityRegistry.registerGlobalEntityID(EntityMainTrain.class, "mainTrain", id3);

       int id2 = EntityRegistry.findGlobalUniqueEntityId();
       EntityRegistry.registerModEntity(EntitySubTrain.class, "subTrain", id2, this, 80, 1, true);
       EntityRegistry.registerGlobalEntityID(EntitySubTrain.class, "subTrain", id2);

 

where EntitySubTrain and EntityMainTrain are subclasses of EntityTrain

 

The clientProxy:

 

RenderingRegistry.registerEntityRenderingHandler(EntityMainTrain.class, new RenderTrain());
RenderingRegistry.registerEntityRenderingHandler(EntitySubTrain.class, new RenderSubTrain());

 

 

EDIT:

The spawned Entity (regardless of what kind) has always the propertys of the first registered

  • Author

So it's rendering correctly now, but server and client are asynchron. While the server entity is changing its position the client one is not... I had that problem earlier and fixed it but I forgot what I did that time  :-[

So it's rendering correctly now, but server and client are asynchron. While the server entity is changing its position the client one is not... I had that problem earlier and fixed it but I forgot what I did that time  :-[

Entity movement is a bit different then the rest of the game, as Entity movement has to be done on the client and server side, or it will be jiggly.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.