Posted April 20, 201510 yr 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 (:
April 20, 201510 yr 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.
April 20, 201510 yr 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 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
July 14, 201510 yr 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.