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

I currently have 2 throwable entities made, but for some reason I cannot render both at once.  For some reason, the one RenderSnowball I have renders for all entity throwable. Although, when I spawn multiple of the entities at once, it is half correct, half incorrect textures.  Here is how I register them

 

 

RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderSnowball(ItemManager.grenade));

RenderingRegistry.registerEntityRenderingHandler(Caterpillar.class, new RenderCaterpillar(new ModelCaterpillar(), 0));

RenderingRegistry.registerEntityRenderingHandler(Coyote.class, new RenderCoyote(new ModelCoyote(), 0));

RenderingRegistry.registerEntityRenderingHandler(EntityPepperSpray.class, new RenderSpray());

 

 

 

Is there any way I can fix this problem?  If I can't fix it using RenderSnowball, is there any way I can make a 2D model?

Thanks for your help.

Have you registered the entities? You should register them with EntityRegistry.registerModEntity and EntityList.addMapping

Romejanic

 

Creator of Witch Hats, Explosive Chickens and Battlefield!

  • Author

This is how I register it

 

public static void registerEntity() {

createEntity(Caterpillar.class, "Caterpillar", 0x66FF00, 0x000000);

createEntity(Coyote.class, "Coyote", 0x5E0F0F, 0 );

createEntity(EntityGrenade.class, "Grenade");

createEntity(EntityPepperLightning.class, "Peppa Lightning");

createEntity(EntityPepperSpray.class, "Pepper Spray");

 

}//end registerEntity

 

 

 

public static void createEntity(Class entityClass, String entityName) {

    int entityId = EntityRegistry.findGlobalUniqueEntityId();

    EntityRegistry.registerModEntity(entityClass, entityName, entityId, MainRegistry.modInstance, 64, 1, true);

 

}

  • Author

This is the one I use for Mob/Animal entities.  Also, if I get rid of the findUniqueGlobalEntityID, It doesn't work

 

public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor) {

int entityId = EntityRegistry.findGlobalUniqueEntityId();

    EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityId);

    EntityList.entityEggs.put(Integer.valueOf(entityId), new EntityList.EntityEggInfo(entityId, solidColor, spotColor));

   

    }

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.