Jump to content

Inventory Render Orange color


delpi

Recommended Posts

Having an odd issue with custom Item Renderers in my Inventory.

 

Basically when the item is in certain slots, the background around the item is orange instead of the default inventory color.

 

Any ideas?

 

 

I followed the setup in this tutorial

 

http://www.minecraftforge.net/wiki/Custom_2D_Inventory_Item_Renderer

 

 

code for the inventory part:

 

 

            // Setup Render

                RenderItem renderItem = new RenderItem();

               

                // set Texture

                IIcon icon = item.getIconIndex();

                               

                // Render

                renderItem.renderIcon(0, 0, icon, 16, 16);

 

 

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

I don't think you really need a custom item renderer to achieve this.

 

On each render go through all of the slots (or atleast the slots you want to have the orange background), and check if they have your item. If they do, draw the orange slot.

Kain

Link to comment
Share on other sites

In case it is confusing.

 

I have a custom rendor for an item.  It has a unique Model for it.  The Forge method for doing that utilizes a method similar to the tutorial I listed.  1st person and 3rd person work great and do exactly what I want it to do.

 

When the item is rendered in an inventory slot, it uses the peice of code I supplied.  The item renders fine, but the 'void' area around it (I use Gimp to ensure there is nothing there) renders with a wierd orage color when it is in certain slots in my inventory.  It is very repeatable and it happens if it is the default inventory GUI or a custom one.  In both cases, it is the same slot everytime.

 

I've looked through the minecraft code, the forge code, as well as my own and I can't find anything that would be impacting the color, much less only for specific slots.

 

Anybody experienced something like this?

 

 

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

Hi

 

Which slots in particular?  Perhaps you could show a screenshot?  Perhaps it is the first slot that gets rendered after rendering something else, so it might perhaps be due to an OpenGL render setting such as the colour, lighting, ALPHA_TEST or BLEND, that the vanilla slot code sets to something normal.  You could try tracing through the vanilla for the first item render and see what commands it uses, then copy those in front of your render code.

 

This class might be of interest to you

https://github.com/TheGreyGhost/SpeedyTools/blob/Working/src/speedytools/common/Utilities/OpenGLdebugging.java

 

I've used it in the past to check what the OpenGL settings are; it's not complete, but dumpAllIsEnabled() works and has showed up problems for me before- dump for a good render, dump for a bad render, and spot the difference.  Doesn't show everything but you might be lucky.

 

-TGG

 

 

Link to comment
Share on other sites

I'll take some tonight.  The 2nd and 3rd hotbar slots.  The 2nd inventory starting from top, and then something like the 13th and 18th.  They aren't in line or next to each other except for the first 2.

 

I'm assuming (as you suggested) that  some openGL setting is leaking over.  I've checked all my stuff and its enclosed in pop/push except for this because its getting some settings from outside.  I might try enclosing it as well.

 

I looked at your link and I'm having a little trouble figuring out how to use it.  Do you have an example where you used it?

 

 

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

Took some screenshots and noticed a pattern.

 

If one of my custom items is after another one, it seems to happens to it.  The hammers happen no matter what, but it is a different color.  It doesn't happen to the items that are armor.

 

width=384 height=168https://sites.google.com/site/clandoolittle/home/dimension-manager/Capture1.PNG?attredirects=0[/img]

 

width=377 height=169https://sites.google.com/site/clandoolittle/home/dimension-manager/Capture2.PNG?attredirects=0[/img]

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

I'll take some tonight.  The 2nd and 3rd hotbar slots.  The 2nd inventory starting from top, and then something like the 13th and 18th.  They aren't in line or next to each other except for the first 2.

 

I'm assuming (as you suggested) that  some openGL setting is leaking over.  I've checked all my stuff and its enclosed in pop/push except for this because its getting some settings from outside.  I might try enclosing it as well.

 

I looked at your link and I'm having a little trouble figuring out how to use it.  Do you have an example where you used it?

 

Hi

 

I just copied the entire class into an appropriate package, then called dumpAllIsEnabled().  It prints out all the openGL settings you can turn on/off.

In this case I would suggest something like

 


static int delay;  // put this as a static field in your render class

if (++delay % 100 == 0) {  // only print once every 100 calls
  OpenGLdebugging.dumpAllIsEnabled();
}
renderItem.renderIcon(0, 0, icon, 16, 16);

Then put your item in a good slot, wait till it prints the flags, then put your item in an orange slot, wait till it prints the flags, then compare the two.

No guarantees it will show a difference, but it might.  My guess would be

 

            GL11.glEnable(GL11.GL_ALPHA_TEST);

 

but perhaps also

                GL11.glDisable(GL11.GL_LIGHTING);

 

-TGG

 

 

 

 

 

 

 

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.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 射幸性スロット クープーン■BCGAME33·COM♬キルギススロットリーグ射幸性キプロススロットキャッシュゲーム[本社お問い合わせテレJBOX7]射幸性スロット ♥️中継中央アジアスロット本社射幸性ノルウェー射幸性スロットキャッシュゲーム[総販お問い合わせカカオトークJBOX7]射幸性スロット ↑♪カジノパブノルウェースロット動画射幸性モルモットゲーム場[各種オフィコミュニティ制作]射幸性スロット ★♤ゲームセネガルスロット ポーカー大会 賭博師行星南アフリカ四行星スロットポーカー大会[マーケティングお問い合わせ] 賭博師 スロット ▩↔キャッシュゲームマーリースロット 検証賭博師ゲーム 賭博師ゲーム ▲○ 遊び場 南スーダンスロット 総販 射幸性ウィンカジノ射幸性スロット クープーン[ト本社お問い合わせ]射幸性スロット◈☆YouTubeグレナディーンスロットゲーム射幸性オーストラリア射幸性スロット募集[トト総販購入]射幸性スロット※†募集アフガニスタンスロットツアー射幸性ハンガリー射幸性スロットトーナメント[カジノ総販] ギャンブル·モンテネグロ·スロットサイト ギャンブル·ウィンカジノ賭博師行用スロット中継[ヤマト本社]賭博師会 メキシコスロットバカラパブ賭博師行星西アフリカ四行成 スロットグループチャット[バカラ銃販社] 総販のお問い合わせ]お知らせ設定おすすめ購読いいですね
    • 仙台汗蒸房Kakao Talk™BCGAME55·COM㉿ 仙台汗蒸房新地址足球仙台汗蒸房抖音骑马汗蒸房网站菜板汗蒸房YouTube[本社咨询的Tele @JBOX7] 仙台汗蒸房抖音滑冰仙台汗蒸房推荐滑冰汗蒸房Telegram Speed Sangle Tour[总经销的Kakao Talk JBOX7] 桑拿店高跳机链接 赛达网 制作 桑田风云 凉粉色运动网站] [赌场总公司]仙台汗蒸房 度假村 诱导 仙台汗蒸房 夜动壁球 汗蒸房 视频 击剑 汗蒸房总经销 [体育总公司]仙台汗蒸房社区短道速滑仙台汗蒸房 亚动 高山汗蒸房连接调整汗蒸房地图[TOTO总公司咨询]仙台桑拿室广播巴西柔术仙台桑拿店聚会信息警报桑拿店位置 马乘马桑拿室链接[TO总经销]桑拿室运动 CANDASSETGRAM TELGO CANGOUNGILE TELGO WANGO WAN 桑拿房推特[BAKARA总经销]仙台桑拿房Kakao Talk调整仙台桑拿房新地址F1大奖赛桑拿房新地址拳击桑拿房度假村[赛马总经销]仙台桑拿房故事篮球仙台桑拿房Instagram桑拿房Skincove skincove系统[BCGAME BC游戏总经销咨询]设置通知推荐订阅点赞
    • 生中継K2サイト▨BCGAME33·COM§クウェートK2サイト生中継アンチガバブーダK2遊び場[本社お問い合わせテレJBOX7]生中継K2☜♣接続西アジアK2本社生中継ジブチ生中継K2戦略[総販お問い合わせカカオトークJBOX7]生中継K2@総販リベリアK2ユーチューブ生中継ベラルーシ生中継 K2クープーン[各種オフィコミュニティ制作] 生放送 K2♧□キャッシュゲームベネズエラ K2遊び場 生放送東ティモール 生放送東ティモールお問い合わせ] [マーケティングサイト [スポーツ本社]生中継 K2♡@グループトーク セントルシア K2サイト生中継 南アジア生中継 K2コミュニティ [ト本社お問い合わせ]生中継 K2↙↑キャッシュゲーム ソマリランド K2カジノパブ生中継 イラン生中継 K2検証 [ト総販購入]生中継 K2◑™ポーカー大会 エストニア K2ゲーム生中継 ナイジェリア 生放送 [カジノ総販] 生放送K2 №→中継 チリK2ゲーム場 生放送 コンゴ 生放送K2検証 [大和本社] 生放送 キャッシュゲームアラブリーグ 生放送K2 [BCGAMEBCゲーム総販お問い合わせ] お知らせ設定おすすめ購読いいですね
    • 盛冈酒吧的营业场所▽BCGAME55·COM♭盛冈酒吧最新地址诱导盛冈酒吧地图跆拳道酒吧招聘广告曲棍球酒吧夜动[本社咨询的Tele @JBOX7]盛冈酒吧视频乒乓球盛冈酒吧视频Telegram北欧酒店Instagram网球酒吧视频[总经销的Kakao Talk JBOX7]盛冈酒店广告滑冰盛冈酒店地址教练拳击视频验证[Oposmobaca视频制作平台] 酒吧视频链接 酒吧最新地址 [赌场总公司] 盛冈酒吧 聚会信息 网球 盛冈酒吧 Kakao Talk 游泳 酒吧总经销诱导 酒吧系统 [体育总公司]盛冈酒吧 Kakao Talk Nordic Mor冈酒吧招待所招集羽毛球队同好会短道速滑球队俱乐部网站[TOTO总公司咨询]盛冈俱乐部所在地水上运动盛冈酒店旅行足球俱乐部系统网球俱乐部视频[TOTO总经销] MORIOBA 总经销诱导后,认证为真球俱乐部提供真人秀。 Telegram[Yamato总公司] 盛冈 酒吧 旗舰 盛冈 酒吧 网络游戏 酒吧 连接 正九酒吧位置按摩酒吧链接[BCGAME BC游戏总咨询]设置订阅点赞 [MORIOCA Hostbar社区 Speed Hostbar旅行[赛马总销售] SORIOCA SUGU MORIOCA Hostbar SUKUGUE Hostbar System] Hostbar位置 按按摩酒吧链接[BCGAME BC游戏总咨询]
    • 生放送ブラックジャックコミュニティ→BCGAME33·COM●コンゴブラックジャックカジノパブ生放送BCGAMEカジノブラックジャック競技[本社お問い合わせテレJBOX7]生放送ブラックジャック↕◑前略モロッコブラックジャック放送生放送ブータン生放送ブラックジャック放送[総販お問い合わせカカオトークJBOX7]生放送ブラックジャック↘↑前フィリピンブラックジャックカジノパブ[各種オフィコミュニティ制作]生番組 ブラックザック☎♤クープーンタンザニア ブラックザック本社[マーケティングお問い合わせ]生放送ブータンザニアゲームセンター[マーケティングに関するお問い合わせ]前記 ブラックジャッキ 生番組名 ブラックジャック ゲームセンター [スポーツ本社]生放送ブラックジャック♠△リーグナウルブラックジャック試合生放送アラブ首長国連邦生放送ブラックジャックリーグ[ト本社お問い合わせ]生放送ブラックジャック@☆グループトークトルクメニスタンブラックジャック募集生放送ゲンティングハイランドカジノ生放送ブラックジャックホールダンパブ[トト総販購入]生放送ブラックジャック♠→検証ネパール黒ザック旅行生放送ネパール 生放送ブラックザッククープーン[カジノ総販] 生番組 ブラックザック#™トーナメントイビザグランカジノの総販 アメリカ合衆国の誕生番組 ブラックザック総販業者のお勧め [競馬総販]セントキッツ ブラックジャック キャッシュゲーム MGMカジノ ブラックジャック接続 [BCGAME BCゲーム総販お問い合わせ] お知らせ設定おすすめ購読いいですね
  • Topics

×
×
  • Create New...

Important Information

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