Jump to content

Recommended Posts

Posted

Hi all,

 

So I've made a new block called roof. I followed the forge tutorials to set up the block's TileEntity and custom Renderer . I tested placing the block when it had just the block and tileentity classes and everything was fine. After making the custom renderer ,however, the block turned invisble showing just the collision lines. Which of the following classes should I check for the problem?

Roof, TileEntityRoof, RenderRoof, ModelRoof, clientproxy, commonproxy or the main mod file?

 

I can post the codes but it's so much that it would be really nice if it could be fixed without it.

 

Thnx,

 

RegalBlaze

Posted

As stated by Naitenne we need code, without the code it's just guessing what you could do wrong/miss... All I can do is throw a few common solutions: make sure your TE is spawned with your block, check if your model isn't misplaced (e.g. being rendered underground), check if you're registering your TE and TE renderer.

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Posted

I was having this problem earlier this morning/last night. The problem I finally found was that my renderer needed to be initialized. I thought I had properly initialized it in my ClientProxy class but the method was never being called.

 

First, check your ClientProxy class. You need a method in here - it doesn't matter what it's named, but for logic's sake call it InitRendering():

 

@Override
       public void InitRendering()
       {
    	   ClientRegistry.bindTileEntitySpecialRenderer(RoofTileEntity.class, new RoofTileEntityRenderer());
       }

 

This assumes you have named your tile entity class RoofTileEntity, and your rendering class RoofTileEntityRenderer. Change these accordingly.

 

Now go to your CommonProxy class. You extended CommonProxy with ClientProxy and InitRendering() should be overriding a method, so you need a method InitRendering() in the CommonProxy class so you can override it. Add one that does nothing:

 

public void InitRendering()
{
}

 

Now you can use a ClientProxy version of the CommonProxy object to call the real InitRendering() method.

Next comes voodoo black magic I don't understand.

You should already have some code in your main mod class that looks like:

 

@SidedProxy(clientSide = "mods.YourMod.client.ClientProxy", serverSide = "mods.YourMod.CommonProxy")
    public static CommonProxy proxy;

 

Somehow this makes the variable "proxy" a ClientProxy version of CommonProxy. Anyway.

At the end of the load (FMLInitializationEvent event) method in your main mod class, add one extra line of code:

 

proxy.InitRendering();

 

This should finally tell Minecraft where your custom rendering class is. Now you just have to go back and adjust your image path until the renderer can find your .png file. Use the Warning output as a nice indicator of where it is trying to find a file vs where it actually is.

 

Assuming that was your problem. If not, good luck

Read my thoughts on my summer mod work and tell me what you think!

http://www.minecraftforge.net/forum/index.php/topic,8396.0.html

 

I absolutely love her when she smiles

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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