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

Hi every1,

 

My main question is:

 

Do I have to do anything more than just adding the Entity to the map in EntityList.java and RenderManager.java?

 

But let's start from the beginning:

 

Lately I was wondering how Forge registers new Entities and the corresponding Renderers.

I just want to understand some substantial Forge mechanics to improve my modding skills.

So I tried to add a new custom Mob to Minecraft without using Forge.

 

When I am adding a new Mob, which extends a more specific Entity Type like EntityZombie,

I just needed to add it to the map in EntityList.java and everything was fine and simple.

 

But here is my problem and my actual question:

 

How do I add a new Mob with a custom Model and Renderer?

 

In this case I have just copied the EntityVillager.java, ModelVillager.java and RenderVillager.java

and called them EntityTrader.java, ModelTrader.java and RenderTrader.java.

In RenderTrader.java I have changed the parts where it called the render methods with EntityVillager, ModelVillager etc...

I was really careful and replaced everything, that needed to be replaced.

 

Additionally I have added the new Entity and the corresponding Renderer to the map in RenderManager.java.

 

For some reason the Entity is invisible, when I spawn it with an egg and as well as if I call World.spawnEntity...(...).

I am just hearing the sounds of the Entity and if I am using methods to find Entities within a specified AxisAlignedBoundingBox

it is listed in the returned list.

 

Finally I decided to check if the methods of RenderTrader.java were called, but none of them were called.

 

I don't understand why Minecraft doesn't even try to render it.

 

Did I miss something?

Do I have to do anything more than just adding the Entity to the map in EntityList.java and RenderManager.java?

 

I really hope, you can help me with that issue.

Big THX in advance!

 

GH

To add a render to an entity RenderingRegistry.registerEntityRenderingHandler, also do this only in your client proxy!

  • Author

O.o

I wanted to know, how Forge is doing that in detail,

not how to use convenient Forge methods to do so.

  • 4 years later...
  On 12/27/2014 at 12:28 PM, Degubi said:

For registering entities use EntityRegistry.registerModEntity

What about the top part

 

Old thread for a version that is no longer supported due to its age. Locking.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Reveal hidden contents

 

Guest
This topic is now closed to further replies.

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.