Adding Special Information (lore) to Armor Pieces

Started by Spaceguy230 on Sat, 06/25/2016 - 20:26

Topic category: Advanced modding

Last seen on 15:36, 13. Nov 2016
Joined May 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Adding Special Information (lore) to Armor Pieces
Sat, 06/25/2016 - 20:26

I am making a mod based off of being able to add upgrades to armor pieces. I went to go make the armor and I realized that there isn't an option to add special information to armor pieces. I want to be able to tell the person what upgrades an armor already has and what upgrades can be added. I am using MCreator 1.6.3 for Minecraft 1.7.10. Does anyone have any code that I could add into the source code for the armor? I know how to add lore to items, but not for armor. Please help me, I would greatly appreciate it. Thank you.

Don't Forget To Be Awesome!

-Spaceguy230

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Try:
Sat, 06/25/2016 - 20:36

Try:

1st - find this part(if you want chestplate find chestplate...) :
helmet = (new ItemArmor(enuma, armorPreffix, 0){public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack){
int i = (int)entity.posX;
int j = (int)entity.posY;
int k = (int)entity.posZ;
}
}).setUnlocalizedName("ScrapHelmet");helmet.setMaxStackSize(1);


2nd - after  int k = (int)entity.posZ;
} add:

public void addInformation(ItemStack itemstack, EntityPlayer par2EntityPlayer, List list, boolean par4)
{

    list.add("HERE YOUR LORE");

}

Last seen on 15:36, 13. Nov 2016
Joined May 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I tried the code that you
Sat, 06/25/2016 - 20:50

I tried the code that you gave me and this is the error that I got:

Executing gradle command: build
Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Pylo\MCreator163>cd forge
C:\Pylo\MCreator163\forge>SET "JAVA_HOME=C:\Pylo\MCreator163\jdk\"
C:\Pylo\MCreator163\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator163\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator163\forge>gradlew build
****************************
 Powered By MCP:             
 http://modcoderpack.com/    
 Searge, ProfMobius, Fesh0r, 
 R4wk, ZeuX, IngisKahn, bspkrs
 MCP Data version : unknown
****************************
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator163\forge\build\sources\java\mod\mcreator\mcreator_atomArmor.java:144: error: cannot find symbol
public void addInformation(ItemStack itemstack, EntityPlayer par2EntityPlayer, List list, boolean par4)
                                                                               ^
  symbol: class List
1 error
:compileJava FAILED
FAILURE: Build failed with an exception.
BUILD FAILED
* What went wrong:
Execution failed for task ':compileJava'.
Total time: 6.32 secs
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
C:\Pylo\MCreator163\forge>
Task completed with return code 0 in 6792 milliseconds

 

Here is my code for the set of armor that I added the code to. I added the code to the chestplate of the armor.

 

static{
ItemArmor.ArmorMaterial enuma = EnumHelper.addArmorMaterial("ATOMARMOR", 15, new int[] {2, 5, 3, 1}, 9);

int armorPreffix = 0;if(FMLCommonHandler.instance().getEffectiveSide()==Side.CLIENT) armorPreffix = RenderingRegistry.addNewArmourRendererPrefix("AtomArmor");
helmet = (new ItemArmor(enuma, armorPreffix, 0){public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack){
int i = (int)entity.posX;
int j = (int)entity.posY;
int k = (int)entity.posZ;
}
}).setUnlocalizedName("AtomArmor_head").setTextureName("AtomArmor_head");helmet.setMaxStackSize(1);
body = (new ItemArmor(enuma, armorPreffix, 1){public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack){
int i = (int)entity.posX;
int j = (int)entity.posY;
int k = (int)entity.posZ;
}
public void addInformation(ItemStack itemstack, EntityPlayer par2EntityPlayer, List list, boolean par4)
{

    list.add("HERE YOUR LORE");

}
}).setUnlocalizedName("AtomArmor_body").setTextureName("AtomArmor_body");body.setMaxStackSize(1);
legs = (new ItemArmor(enuma, armorPreffix, 2){public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack){
int i = (int)entity.posX;
int j = (int)entity.posY;
int k = (int)entity.posZ;
}
}).setUnlocalizedName("AtomArmor_leggins").setTextureName("AtomArmor_leggins");legs.setMaxStackSize(1);
boots = (new ItemArmor(enuma, armorPreffix, 3){public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack){
int i = (int)entity.posX;
int j = (int)entity.posY;
int k = (int)entity.posZ;
}
}).setUnlocalizedName("AtomArmor_boots").setTextureName("AtomArmor_boots");boots.setMaxStackSize(1);

Item.itemRegistry.addObject(450, "AtomArmor_head", helmet);
Item.itemRegistry.addObject(451, "AtomArmor_body", body);
Item.itemRegistry.addObject(452, "AtomArmor_leggins", legs);
Item.itemRegistry.addObject(453, "AtomArmor_boots", boots);


}

}

 

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Put anywhere bewteen imports
Sat, 06/25/2016 - 21:19

Put anywhere bewteen imports this: 
import java.util.List;

Last seen on 15:36, 13. Nov 2016
Joined May 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yay, that worked. Thank you
Sat, 06/25/2016 - 21:24

Yay, that worked. Thank you so much. 

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:Yay, that worked. Thank you
Sat, 06/25/2016 - 21:42

@#4 You are welcome

Last seen on 11:18, 22. Jun 2017
Joined Jun 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hey can you show me how to do
Sun, 06/26/2016 - 13:14

Hey can you show me how to do the item/armour thing your talking about I was trying make items such as guns to have revomeable scopes and other attachments.

Stay awesome.

Greg