Jump to content

Recommended Posts

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

  • 4 years later...
Posted

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.

Announcements



×
×
  • Create New...

Important Information

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