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.

thib92

Members
  • Joined

  • Last visited

Everything posted by thib92

  1. Okay thank you
  2. oh, so I should make one item per piece of armor ?
  3. Oh I just clear my inventory and it's ok now. but the humain-readable name is missing, and the texture is missing !
  4. Okay, here is my code : package thib92.theusefulmod; import java.util.List; import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class RedstoneHelmet extends ItemArmor { public final static String[] subitemsNames = new String[] {"respiration1", "respiration2", "respiration3", "nightvision"}; private Icon[] iconList; public RedstoneHelmet(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); this.setHasSubtypes(true); this.setMaxDamage(0); this.setCreativeTab(CreativeTabs.tabCombat); for(int i = 0; i < subitemsNames.length; i++){ LanguageRegistry.addName(new ItemStack(this,1,i), subitemsNames[i]); } } @Override @SideOnly(Side.CLIENT) public Icon getIconFromDamage(int par1) { int i = MathHelper.clamp_int(par1, 0, 3); return this.iconList[i]; } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.iconList = new Icon[subitemsNames.length]; for(int i = 0; i < subitemsNames.length; i++){ this.iconList[i] = par1IconRegister.registerIcon("theusefulmod:redstoneHelmet"); } } @Override @SideOnly(Side.CLIENT) public void getSubItems(int itemID, CreativeTabs tab, List itemList) { for(int i = 0; i < subitemsNames.length; i++){ itemList.add(new ItemStack(itemID,1,i)); } } @Override public String getUnlocalizedName(ItemStack item) { return this.getUnlocalizedName() + "." + subitemsNames[item.getItemDamage()]; } public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { if (itemID == TheUsefulMod.redstoneHelmet.itemID || stack.itemID == TheUsefulMod.redstoneChestplate.itemID || stack.itemID == TheUsefulMod.redstoneBoots.itemID) { return "TheUsefulMod:textures/armor/redstone_1.png"; } if(itemID== TheUsefulMod.redstoneLeggings.itemID) { return "TheUsefulMod:textures/armor/redstone_2.png"; } return "TheUsefulMod:textures/armor/redstone_2.png"; } } When I open my inventory, I have no problem, but if I hover the item with my mouse, then... the game just ends !
  5. By damage value you mean subitem right ?
  6. okay, thank you very muuch ! And after this, how do I get my sub-items as a variable ?
  7. Sorry but I'm really really bad !! I started 3 days ago, so I don't know what you're talking about ! Could you be more precise please ? I don't have enough level yet to study that kind of file, I managed to study some easy ones but this one is really complicated !
  8. No, but that file is huge and I'm still a newbie... I saw things about "metadata" but I don't know how it works...
  9. Hi everyone, I'd like to know how to make a sub-item, like dyes (for instance the Id of an item is 6549, another is 6549:1, another is 6549:2 etc...) Please reply, - Thib92
  10. Yes, this works to kake the item in your inventory glow. I'd like to make the armor glow when I wear it.
  11. Hi everybody, I'd like to know if it is possible to give a enchantement-like glowing on an armor ? I am already able to do it on items, but it doesn't apply to armors when worn, and I'd like to know if it is possible, and how. Thanks, - Thib92
  12. I just found it, I need a TickHandler. Resolved !
  13. okay, so I put the onArmorTickUpdate() in my armor class, and then inside it, put the code to toggle the light right ? And what are the parameters I need ?
  14. I want to make the player glow when he has a specific armor (helmet OR chestplate OR leggings OR boots)
  15. Sorry but I'm new to moding. What do you mean by doing it with blockActivate() or itemRightClick() ?
  16. Hello everybody ! I'd like to know if it is possible with Minecraft Forge to detect if the player has a specific armor eauiped (an armor thst I have created), and then to do something if he does. - Thib92

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.