mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Format cleanup
This commit is contained in:
1 parent
c6ef343106
commit
fdcb651ef4
130 files changed
+4066
-3266
No files matched your search
@@ -11,40 +11,47 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class ArmorPattern extends CraftingItem implements ItemBlocklike{
|
||||
public class ArmorPattern extends CraftingItem implements ItemBlocklike
|
||||
{
|
||||
|
||||
private Icon baseIcon;
|
||||
|
||||
public ArmorPattern(int id, String partType, String patternType, String folder) {
|
||||
super(id, patternName, getPatternNames(patternType), folder);
|
||||
private Icon baseIcon;
|
||||
|
||||
public ArmorPattern(int id, String partType, String patternType, String folder)
|
||||
{
|
||||
super(id, patternName, getPatternNames(patternType), folder);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setContainerItem(this);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
protected static String[] getPatternNames (String partType){
|
||||
}
|
||||
|
||||
protected static String[] getPatternNames (String partType)
|
||||
{
|
||||
String[] names = new String[patternName.length];
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
names[i] = partType + patternName[i];
|
||||
return names;
|
||||
}
|
||||
|
||||
public Icon getBaseIcon(){
|
||||
return baseIcon;
|
||||
|
||||
public Icon getBaseIcon ()
|
||||
{
|
||||
return baseIcon;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister){
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
{
|
||||
super.registerIcons(iconRegister);
|
||||
baseIcon = iconRegister.registerIcon("tinker:" + folder + "armor_cast");
|
||||
}
|
||||
|
||||
|
||||
private static final String[] patternName = new String[] { "helmet", "chestplate", "leggings", "boots" };
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list){
|
||||
for (int i = 0; i < patternName.length; i++){
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user