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 know that you can change an itemstacks texture on the fly, but is it possible to change armors texture on the fly, without modifying the armor's file

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

I'm not sure about the on the fly part, but you can make an armor invisible, just change the texture file to all alpha.

  • 3 weeks later...

I know it's a little late but here's how I do it in 1.4.7

In your Item class

@Override
public String getArmorTextureFile(ItemStack itemstack) {
if (itemstack.itemID == MinerHelmet.itemHelmet.itemID) {
	// change textures to match the state of the light (on|off)
	if (MinerHelmet.getInstance().getLightSwitchedOff()) {
		return "/textures/helmetLightOff.png";
	} else {
		return "/textures/helmetLightOn.png";
	}
}
return "/textures/helmetLightOff.png";
}

  • Author

Thanks, now maybe I can push my next release in about week :D

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

  • Author

Quick question, how did you get the Boolean getlightswitchedoff to be ItemStack specific?

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

I would suppose its a keybinding that toggles it and registers the variable into @Mod file or its part of the item class, though first is easier.

~I was here~

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.