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

My mod added a suit of armor in a new material. Amazingly, that much works. However, when I take off my armor in creative mode (e.g. to enchant or repair pieces of it), the empty armor slots in my creative inventory are black squares instead of armor-piece outlines. Surprisingly, survival mode is unaffected.

 

It appears to be a small thing, but I've learned from unpleasant experience that even small visible defects can can spring from bugs that are doing worse behind the scenes. Therefore, I am trying to figure it out anyway.

 

I've walked through as much of the vanilla armor class as I can, and I didn't see how it could have been affected by what I modded in my armor class. I didn't even touch the method that registers those icons.

 

Then I tried commenting out my added creative tab. Voila! The empty slot icons returned to normal in creative mode.

 

Has anyone else noticed the slots turning black after adding a creative tab? Is it a forge bug, or a tutorial oversight, or must I have done something wrong?

 

My creative tab code:

 

tabTest = new CreativeTabs("Testing") {
	@Override
	@SideOnly(Side.CLIENT)
	public Item getTabIconItem() {
		return Items.brewing_stand;
	}
};

 

 

EDIT:

Looking at how vanilla tabs are instantiated, I noticed that they did not have the @Override annotation on getTabIconItem(). I removed it from mine, and the empty slots returned to normal. I don't know why, but the fix worked.

 

Somewhere out there is a tutorial that is teaching new modders like me to put that @Override in there. If anyone spots it, please ask the tutor to make a correction.

 

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

That @Override is actually good coding practice. Look it up.

 

What you saw is a vanilla bug when wearing any damaged armor in 1.7.2.

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.