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

I installed the mod I'm working on in a client using forge build 9.10.1.865. 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.

Hi

 

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.

 

-TGG

 

  • Author

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:

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

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.

Ah, that is a good clue.

 

Perhaps you might try changing your handleRenderType to say

if (type == FIRST_PERSON_MAP) return false;

return true;

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

 

ItemRenderer.renderItemInFirstPerson

 

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

 

  • Author

Ah, that is a good clue.

 

Perhaps you might try changing your handleRenderType to say

if (type == FIRST_PERSON_MAP) return false;

return true;

 

I just had to use the new FIRST_PERSON_HOLDING instead of FIRST_PERSON_MAP and it worked fine. Problem solved. Thanks for all the 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.