Jump to content

Block looks like a map?


Recommended Posts

I installed the mod I'm working on in a client using forge build The custom block I was working on is showing up as a map in the player's hands. It still renders perfectly in the world, and in a previous version of forge, it was working fine? Is this a bug or am I not doing something right?


For the most part, I followed minalien's tutorial @ http://minalien.com/tutorial-advancedmodelloader/ when I set up the block, so aside from having a TileEntity attached, you can assume that the overrides are the same.

Link to comment
Share on other sites



That's pretty strange.  Did you derive the corresponding item from an ItemMap perhaps?  Does it look like a map in all item views(Inventory, First person, third person, or dropped on the ground (not placed as a block))?  Perhaps you haven't registered the item properly?


All I can suggest is that you insert a breakpoint in the minecraft code responsible for rendering a map

(MapItemRenderer.renderMap) and then track back up the stack to see why it is being called instead of your IItemRenderer.




Link to comment
Share on other sites

Thanks for respond TGG, good questions.


My block has absolutely nothing to do with any of the map classes. I'm not subclassing anything out of the ordinary, just BlockContainer, ModelBase, TileEntity and TileEntitySpecialRenderer. My item renderer implements IItemRenderer without extending anything at all and it's a really simple class.


I checked to see if it looks like a map in all views and it does not. It only looks like a map in first-person view when it's being held in your hands. The view where you would normally read a map. It looks fine in third person, on the ground, in the inventory, etc.


I saw this in the recent change log for forge:

	Added a RenderType that allows Map-style rendering w/o inheriting from

Unfortunately, I just started working with forge a week ago and I don't know my way around the library (or even eclipse) enough to figure out with any speed if that is the cause of my current dilemma. I'll be trying your suggested method for a while. Let me know if you think of anything. Thanks again, I appreciate it.

Link to comment
Share on other sites

I don't have quite the latest Forge installed, but I'm guessing the key will be somewhere in here:




at the line which looks something like


      Render render;

        RenderPlayer renderplayer;


        if (itemstack != null && itemstack.getItem() instanceof ItemMap)



I suspect they might have changed it to check for either a RenderType or RenderHelper or similar IItemRenderer method


Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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