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.

Nyhax

Members
  • Joined

  • Last visited

  1. Hello fellow minecraft modding enthusiasts, i'm trying to make a custom map item, similar to the existing one in vanilla minecraft. This custom map item should use different colors for the grass block for each biome. Where I stay so far: In my first step i tried to play around with the colorValue of MaterialColors in making my own CustomMaterialColors. After that, I created a CustomFilledMapItem extending FilledMapItem and overwrote the method updateMapData(...) (just letting minecraft pick the index of the color out of CustomMaterialColors instead of MaterialColors). This logically didn't work, because when the CustomFilledMapItem is rendered in MapItemRenderer, the public method updateMapTexture(MapData mapdataIn) is called which leads to the private method updateMapTexture(). In this method the colorValue is get from MaterialColors. So i think that i have to implement my own custom version of MapItemRender but i don't how to register a custom renderer and link it to my new items in minecraft forge. My Questions are: How can i say to minecraft: "If the player helds an instance of my custom made item in his main hand, render it by my custom made renderer instead of the allready implemented ones." Do i have to use the ItemStackTileEntityRenderer in that case? If yes, how exactly do i use it and do you have an example where i can look at? My approach would be something like: CustomFilledMapItem would not extending FilledMapItem anymore. CustomFilledMapItem extends now AbstractMapItem (Maybe not so good idea -> Mc using its own MapItemRenderer again). Maybe implementing the Interface IBakedModel as written in the documentation? The constructor of CustomFilledMapItem would call super(new Item.Properties().setISTER(...)). But what is the argument needed for #setISTER(...)? I would create a CustomMapItemRenderer class extending ItemStackTileEntityRenderer and implement the #render(...) method. In addition to step four i would copy paste the needed and adjusted behavior of MapItemRenderer. If no, do i have to handle the rendering within events? Let's say each game tick it checks if the item held is instance of CustomFilledMap -> render it with custom Renderer (Possible IllegalStateException - Not right thread to render?). I am new to minecraft modding and i know it's more complex then adding a simple item. Therefore i don't now the hole scope of this "little one new added item project". In the first step it should only be rendered correctly if the player selected the item in the menu bar and if he's in first person mode. Thanks in advance!

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.