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,

I am trying to create a custom mob, and I want to know how to use a RenderManager or what this even is. I have only found tutorials and sourcecode from 1.7.10, and apperantly a RenderManager is something added in 1.8

 

Here is my ClientProxy:

package com.brickfix.roleplaymod;

import com.brickfix.roleplaymod.entity.EntityTestMob;
import com.brickfix.roleplaymod.rendering.TestMobRenderer;

import net.minecraft.client.model.ModelBiped;
import net.minecraftforge.fml.client.registry.RenderingRegistry;

public class ClientProxy extends CommonProxy
{
@Override
public void registerRenderThings()
{
	RenderingRegistry.registerEntityRenderingHandler(EntityTestMob.class,[u] new TestMobRenderer[/u](new ModelBiped(), 0));
}

}

 

Here is my TestMobRenderer

package com.brickfix.roleplaymod.rendering;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;

public class TestMobRenderer extends RenderLiving
{

private static final ResourceLocation testMobTextures = new ResourceLocation("textures/entity/testmob/testmob.png");

protected TestMobRenderer(RenderManager renderManager, ModelBase model, float f) 
{
	super(renderManager, model, f);
}

@Override
protected ResourceLocation getEntityTexture(Entity entity) 
{
	return this.testMobTextures;
}

}

 

I want to use ModelBiped for the mob.

 

I have underlined the error in the client proxy, and I know that I would have to add the RenderManager her. I just don't know what a RenderManager is, what is supposed to do and so on and so forth.

 

Thanks for any help (:

Minecraft.getMinecraft().getRenderManager()

 

It's a global manager that handles stuff, doesn't really matter.

1.7.10 is no longer supported by forge, you are on your own.

  • Author

Thanks, that was rather simple :)

 

But now I still have a box as an entity, but I think as I put new ModelBiped() in the argument I should get an entity looking simiular to the player ...

Where is my mistake now?

 

EDIT: Neverminde, I just found out I forgot to reference one thing. Stupid me :D

 

EDIT2: I think this belongs into another thread, but I will ask it here: How do I add a chat message when the player rightclicked the mob?

            I know it would go into the interact method of the entity, but how do I sent chatmessages in general? Thanks again in advance

EDIT3: And again I found it out by myself :)

  • 2 months later...

This is an old thread, but this is on the topic.

 

I've noticed some issues with the rendermanager being null when I register the renderers. 

 

What is the recommended point to do this?  PreInit, Init?

Long time Bukkit & Forge Programmer

Happy to try and help

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.