Remove META_PLACEHOLDER
This commit is contained in:
parent
f5c6b59ebd
commit
2910acc29c
11 changed files with 25 additions and 80 deletions
|
@ -133,38 +133,28 @@ public class RegisterItemJsons {
|
||||||
|
|
||||||
name = ItemPlates.types.clone();
|
name = ItemPlates.types.clone();
|
||||||
for (int i = 0; i < ItemPlates.types.length; ++i) {
|
for (int i = 0; i < ItemPlates.types.length; ++i) {
|
||||||
if (!name[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
registerBlockstate(ModItems.PLATES, i, name[i], "items/materials/");
|
registerBlockstate(ModItems.PLATES, i, name[i], "items/materials/");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
name = ItemNuggets.types.clone();
|
name = ItemNuggets.types.clone();
|
||||||
for (int i = 0; i < ItemNuggets.types.length; ++i) {
|
for (int i = 0; i < ItemNuggets.types.length; ++i) {
|
||||||
if (!name[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
registerBlockstate(ModItems.NUGGETS, i, name[i], "items/materials/");
|
registerBlockstate(ModItems.NUGGETS, i, name[i], "items/materials/");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
name = ItemDusts.types.clone();
|
name = ItemDusts.types.clone();
|
||||||
for (int i = 0; i < ItemDusts.types.length; ++i) {
|
for (int i = 0; i < ItemDusts.types.length; ++i) {
|
||||||
if (!name[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
registerBlockstate(ModItems.DUSTS, i, name[i], "items/materials/");
|
registerBlockstate(ModItems.DUSTS, i, name[i], "items/materials/");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
name = ItemDustsSmall.types.clone();
|
name = ItemDustsSmall.types.clone();
|
||||||
for (int i = 0; i < ItemDustsSmall.types.length; ++i) {
|
for (int i = 0; i < ItemDustsSmall.types.length; ++i) {
|
||||||
if (!name[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
registerBlockstate(ModItems.SMALL_DUSTS, i, name[i], "items/materials/");
|
registerBlockstate(ModItems.SMALL_DUSTS, i, name[i], "items/materials/");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
name = ItemParts.types.clone();
|
name = ItemParts.types.clone();
|
||||||
for (int i = 0; i < ItemParts.types.length; ++i) {
|
for (int i = 0; i < ItemParts.types.length; ++i) {
|
||||||
if (!name[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
registerBlockstate(ModItems.PARTS, i, name[i], "items/materials/");
|
registerBlockstate(ModItems.PARTS, i, name[i], "items/materials/");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
name = ItemUpgrades.types.clone();
|
name = ItemUpgrades.types.clone();
|
||||||
for (int i = 0; i < ItemUpgrades.types.length; ++i) {
|
for (int i = 0; i < ItemUpgrades.types.length; ++i) {
|
||||||
|
|
|
@ -46,7 +46,6 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class ModItems {
|
public class ModItems {
|
||||||
|
|
||||||
public static final String META_PLACEHOLDER = "PLACEHOLDER_ITEM";
|
|
||||||
public static Item GEMS;
|
public static Item GEMS;
|
||||||
public static Item INGOTS;
|
public static Item INGOTS;
|
||||||
public static Item NUGGETS;
|
public static Item NUGGETS;
|
||||||
|
|
|
@ -39,8 +39,7 @@ public class OreDict {
|
||||||
private static final ImmutableList<String> plateGenIgnores = ImmutableList.of(
|
private static final ImmutableList<String> plateGenIgnores = ImmutableList.of(
|
||||||
"hot", //Hot ingots
|
"hot", //Hot ingots
|
||||||
"mixed_metal", //Mixed metal has own version of plate
|
"mixed_metal", //Mixed metal has own version of plate
|
||||||
"iridium_alloy", //Iridium alloy is plate itself
|
"iridium_alloy" //Iridium alloy is plate itself
|
||||||
ModItems.META_PLACEHOLDER //...
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
@ -86,8 +85,6 @@ public class OreDict {
|
||||||
OreUtil.registerOre("dustAsh", ItemDusts.getDustByName("ashes"));
|
OreUtil.registerOre("dustAsh", ItemDusts.getDustByName("ashes"));
|
||||||
|
|
||||||
for (String type : ItemGems.types) {
|
for (String type : ItemGems.types) {
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "gem_" + type), ItemGems.getGemByName(type));
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "gem_" + type), ItemGems.getGemByName(type));
|
||||||
boolean ignoreIt = false;
|
boolean ignoreIt = false;
|
||||||
for (String ignore : plateGenIgnores)
|
for (String ignore : plateGenIgnores)
|
||||||
|
@ -98,8 +95,6 @@ public class OreDict {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String type : ItemIngots.types) {
|
for (String type : ItemIngots.types) {
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + type), ItemIngots.getIngotByName(type));
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + type), ItemIngots.getIngotByName(type));
|
||||||
boolean ignoreIt = false;
|
boolean ignoreIt = false;
|
||||||
for (String ignore : plateGenIgnores)
|
for (String ignore : plateGenIgnores)
|
||||||
|
@ -110,8 +105,6 @@ public class OreDict {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String type : ItemPlates.types) {
|
for (String type : ItemPlates.types) {
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "plate_" + type), ItemPlates.getPlateByName(type));
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "plate_" + type), ItemPlates.getPlateByName(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,20 +116,14 @@ public class OreDict {
|
||||||
|
|
||||||
|
|
||||||
for (String type : ItemDusts.types) {
|
for (String type : ItemDusts.types) {
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_" + type), ItemDusts.getDustByName(type));
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_" + type), ItemDusts.getDustByName(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String type : ItemDustsSmall.types) {
|
for (String type : ItemDustsSmall.types) {
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_small_" + type), ItemDustsSmall.getSmallDustByName(type));
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "dust_small_" + type), ItemDustsSmall.getSmallDustByName(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String type : ItemNuggets.types) {
|
for (String type : ItemNuggets.types) {
|
||||||
if (type.equals(ModItems.META_PLACEHOLDER))
|
|
||||||
continue; //Aware of placeholders!
|
|
||||||
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + type), ItemNuggets.getNuggetByName(type));
|
OreUtil.registerOre(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + type), ItemNuggets.getNuggetByName(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -316,15 +316,12 @@ public class CraftingTableRecipes extends RecipeMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String name : ItemDustsSmall.types) {
|
for (String name : ItemDustsSmall.types) {
|
||||||
if (name.equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
registerShapeless(getMaterial(name, 4, Type.SMALL_DUST), getMaterialObject(name, Type.DUST));
|
registerShapeless(getMaterial(name, 4, Type.SMALL_DUST), getMaterialObject(name, Type.DUST));
|
||||||
registerShapeless(getMaterial(name, Type.DUST), getMaterialObject(name, Type.SMALL_DUST), getMaterialObject(name, Type.SMALL_DUST), getMaterialObject(name, Type.SMALL_DUST), getMaterialObject(name, Type.SMALL_DUST));
|
registerShapeless(getMaterial(name, Type.DUST), getMaterialObject(name, Type.SMALL_DUST), getMaterialObject(name, Type.SMALL_DUST), getMaterialObject(name, Type.SMALL_DUST), getMaterialObject(name, Type.SMALL_DUST));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String nuggets : ItemNuggets.types) {
|
for (String nuggets : ItemNuggets.types) {
|
||||||
if (nuggets.equals(ModItems.META_PLACEHOLDER) || nuggets.equalsIgnoreCase("diamond"))
|
if (nuggets.equalsIgnoreCase("diamond"))
|
||||||
continue;
|
continue;
|
||||||
registerShapeless(getMaterial(nuggets, 9, Type.NUGGET), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + nuggets));
|
registerShapeless(getMaterial(nuggets, 9, Type.NUGGET), CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "ingot_" + nuggets));
|
||||||
registerShaped(getMaterial(nuggets, Type.INGOT), "NNN", "NNN", "NNN", 'N', CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets));
|
registerShaped(getMaterial(nuggets, Type.INGOT), "NNN", "NNN", "NNN", 'N', CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "nugget_" + nuggets));
|
||||||
|
|
|
@ -192,22 +192,16 @@ public class ScrapboxRecipes extends RecipeMethods {
|
||||||
register(getStack(ModBlocks.RUBBER_SAPLING));
|
register(getStack(ModBlocks.RUBBER_SAPLING));
|
||||||
|
|
||||||
for (String i : ItemDusts.types) {
|
for (String i : ItemDusts.types) {
|
||||||
if (!i.equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
register(ItemDusts.getDustByName(i));
|
register(ItemDusts.getDustByName(i));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for (String i : ItemNuggets.types) {
|
for (String i : ItemNuggets.types) {
|
||||||
if (!i.equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
register(ItemNuggets.getNuggetByName(i));
|
register(ItemNuggets.getNuggetByName(i));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for (String i : ItemGems.types) {
|
for (String i : ItemGems.types) {
|
||||||
if (!i.equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
register(ItemGems.getGemByName(i));
|
register(ItemGems.getGemByName(i));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
registerDyable(Items.DYE);
|
registerDyable(Items.DYE);
|
||||||
registerDyable(Blocks.WOOL);
|
registerDyable(Blocks.WOOL);
|
||||||
|
|
|
@ -40,10 +40,10 @@ public class ItemDusts extends ItemTR {
|
||||||
"bauxite", "brass", "bronze", "calcite", "charcoal", "chrome", "cinnabar", "clay", "coal", "copper",
|
"bauxite", "brass", "bronze", "calcite", "charcoal", "chrome", "cinnabar", "clay", "coal", "copper",
|
||||||
"dark_ashes", "diamond", "electrum", "emerald", "ender_eye", "ender_pearl", "endstone", "flint", "galena",
|
"dark_ashes", "diamond", "electrum", "emerald", "ender_eye", "ender_pearl", "endstone", "flint", "galena",
|
||||||
"gold", "grossular", "invar", "iron", "lazurite", "lead", "magnesium", "manganese", "marble", "netherrack",
|
"gold", "grossular", "invar", "iron", "lazurite", "lead", "magnesium", "manganese", "marble", "netherrack",
|
||||||
"nickel", "obsidian", "peridot", "phosphorous", "platinum", "pyrite", "pyrope", "red_garnet", ModItems.META_PLACEHOLDER,
|
"nickel", "obsidian", "peridot", "phosphorous", "platinum", "pyrite", "pyrope", "red_garnet",
|
||||||
"ruby", "saltpeter", "sapphire", "saw_dust", "silver", "sodalite", "spessartine", "sphalerite", "steel",
|
"ruby", "saltpeter", "sapphire", "saw_dust", "silver", "sodalite", "spessartine", "sphalerite", "steel",
|
||||||
"sulfur", "tin", "titanium", "tungsten", "uvarovite", ModItems.META_PLACEHOLDER, "yellow_garnet", "zinc",
|
"sulfur", "tin", "titanium", "tungsten", "uvarovite", "yellow_garnet", "zinc",
|
||||||
ModItems.META_PLACEHOLDER, "andesite", "diorite", "granite" };
|
"andesite", "diorite", "granite" };
|
||||||
|
|
||||||
public ItemDusts() {
|
public ItemDusts() {
|
||||||
setTranslationKey("techreborn.dust");
|
setTranslationKey("techreborn.dust");
|
||||||
|
@ -56,9 +56,6 @@ public class ItemDusts extends ItemTR {
|
||||||
name = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
|
name = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
if (types[i].equalsIgnoreCase(name)) {
|
if (types[i].equalsIgnoreCase(name)) {
|
||||||
if (types[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
throw new InvalidParameterException("The dust " + name + " could not be found.");
|
|
||||||
}
|
|
||||||
return new ItemStack(ModItems.DUSTS, count, i);
|
return new ItemStack(ModItems.DUSTS, count, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,10 +104,8 @@ public class ItemDusts extends ItemTR {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
list.add(new ItemStack(this, 1, meta));
|
list.add(new ItemStack(this, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,10 +40,10 @@ public class ItemDustsSmall extends ItemTR {
|
||||||
"bauxite", "brass", "bronze", "calcite", "charcoal", "chrome", "cinnabar", "clay", "coal", "copper",
|
"bauxite", "brass", "bronze", "calcite", "charcoal", "chrome", "cinnabar", "clay", "coal", "copper",
|
||||||
"dark_ashes", "diamond", "electrum", "emerald", "ender_eye", "ender_pearl", "endstone", "flint", "galena",
|
"dark_ashes", "diamond", "electrum", "emerald", "ender_eye", "ender_pearl", "endstone", "flint", "galena",
|
||||||
"gold", "grossular", "invar", "iron", "lazurite", "lead", "magnesium", "manganese", "marble", "netherrack",
|
"gold", "grossular", "invar", "iron", "lazurite", "lead", "magnesium", "manganese", "marble", "netherrack",
|
||||||
"nickel", "obsidian", "peridot", "phosphorous", "platinum", "pyrite", "pyrope", "red_garnet", ModItems.META_PLACEHOLDER,
|
"nickel", "obsidian", "peridot", "phosphorous", "platinum", "pyrite", "pyrope", "red_garnet",
|
||||||
"ruby", "saltpeter", "sapphire", "saw_dust", "silver", "sodalite", "spessartine", "sphalerite", "steel",
|
"ruby", "saltpeter", "sapphire", "saw_dust", "silver", "sodalite", "spessartine", "sphalerite", "steel",
|
||||||
"sulfur", "tin", "titanium", "tungsten", "uvarovite", ModItems.META_PLACEHOLDER, "yellow_garnet", "zinc",
|
"sulfur", "tin", "titanium", "tungsten", "uvarovite", "yellow_garnet", "zinc",
|
||||||
ModItems.META_PLACEHOLDER, "redstone", "glowstone", "andesite", "diorite", "granite" };
|
"redstone", "glowstone", "andesite", "diorite", "granite" };
|
||||||
|
|
||||||
public ItemDustsSmall() {
|
public ItemDustsSmall() {
|
||||||
setTranslationKey("techreborn.dustsmall");
|
setTranslationKey("techreborn.dustsmall");
|
||||||
|
@ -56,9 +56,6 @@ public class ItemDustsSmall extends ItemTR {
|
||||||
name = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
|
name = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
if (types[i].equalsIgnoreCase(name)) {
|
if (types[i].equalsIgnoreCase(name)) {
|
||||||
if (types[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
throw new InvalidParameterException("The small dust " + name + " could not be found.");
|
|
||||||
}
|
|
||||||
return new ItemStack(ModItems.SMALL_DUSTS, count, i);
|
return new ItemStack(ModItems.SMALL_DUSTS, count, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,10 +84,8 @@ public class ItemDustsSmall extends ItemTR {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
list.add(new ItemStack(this, 1, meta));
|
list.add(new ItemStack(this, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,9 +86,7 @@ public class ItemIngots extends ItemTR {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
list.add(new ItemStack(this, 1, meta));
|
list.add(new ItemStack(this, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -38,8 +38,7 @@ public class ItemNuggets extends ItemTR {
|
||||||
|
|
||||||
public static final String[] types = new String[] { "aluminum", "brass", "bronze", "chrome", "copper", "electrum",
|
public static final String[] types = new String[] { "aluminum", "brass", "bronze", "chrome", "copper", "electrum",
|
||||||
"invar", "iridium", "lead", "nickel", "platinum", "silver", "steel", "tin", "titanium", "tungsten",
|
"invar", "iridium", "lead", "nickel", "platinum", "silver", "steel", "tin", "titanium", "tungsten",
|
||||||
"hot_tungstensteel", "tungstensteel", "zinc", "refined_iron", ModItems.META_PLACEHOLDER, ModItems.META_PLACEHOLDER,
|
"hot_tungstensteel", "tungstensteel", "zinc", "refined_iron", "iron", "diamond" };
|
||||||
ModItems.META_PLACEHOLDER, "iron", "diamond" };
|
|
||||||
|
|
||||||
public ItemNuggets() {
|
public ItemNuggets() {
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
|
@ -80,10 +79,8 @@ public class ItemNuggets extends ItemTR {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
list.add(new ItemStack(this, 1, meta));
|
list.add(new ItemStack(this, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ItemParts extends ItemTR {
|
||||||
public static final String[] types = new String[] { "energy_flow_circuit", "data_control_circuit", "data_storage_circuit",
|
public static final String[] types = new String[] { "energy_flow_circuit", "data_control_circuit", "data_storage_circuit",
|
||||||
"data_orb", "diamond_grinding_head", "diamond_saw_blade", "tungsten_grinding_head", "helium_coolant_simple",
|
"data_orb", "diamond_grinding_head", "diamond_saw_blade", "tungsten_grinding_head", "helium_coolant_simple",
|
||||||
"helium_coolant_triple", "helium_coolant_six", "nak_coolant_simple", "nak_coolant_triple", "nak_coolant_six",
|
"helium_coolant_triple", "helium_coolant_six", "nak_coolant_simple", "nak_coolant_triple", "nak_coolant_six",
|
||||||
"cupronickel_heating_coil", "nichrome_heating_coil", "kanthal_heating_coil", ModItems.META_PLACEHOLDER, "super_conductor",
|
"cupronickel_heating_coil", "nichrome_heating_coil", "kanthal_heating_coil", "super_conductor",
|
||||||
"thorium_cell", "double_thorium_cell", "quad_thorium_cell", "plutonium_cell", "double_plutonium_cell",
|
"thorium_cell", "double_thorium_cell", "quad_thorium_cell", "plutonium_cell", "double_plutonium_cell",
|
||||||
"quad_plutonium_cell", "computer_monitor", "machine_parts", "neutron_reflector", "iridium_neutron_reflector",
|
"quad_plutonium_cell", "computer_monitor", "machine_parts", "neutron_reflector", "iridium_neutron_reflector",
|
||||||
"thick_neutron_reflector", "electronic_circuit", "advanced_circuit", "sap", "rubber", "scrap",
|
"thick_neutron_reflector", "electronic_circuit", "advanced_circuit", "sap", "rubber", "scrap",
|
||||||
|
@ -100,11 +100,9 @@ public class ItemParts extends ItemTR {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < ItemParts.types.length; ++meta) {
|
for (int meta = 0; meta < ItemParts.types.length; ++meta) {
|
||||||
if (!ItemParts.types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
list.add(new ItemStack(this, 1, meta));
|
list.add(new ItemStack(this, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer player) {
|
public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer player) {
|
||||||
switch (itemStack.getItemDamage()) {
|
switch (itemStack.getItemDamage()) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ItemPlates extends ItemTR {
|
||||||
|
|
||||||
//Vanilla plates or plates not from ingots or gems
|
//Vanilla plates or plates not from ingots or gems
|
||||||
public static String[] types = new String[] {
|
public static String[] types = new String[] {
|
||||||
"iron", "gold", "carbon", "wood", "redstone", "diamond", "emerald", ModItems.META_PLACEHOLDER, "coal", "obsidian", "lazurite"
|
"iron", "gold", "carbon", "wood", "redstone", "diamond", "emerald", "coal", "obsidian", "lazurite"
|
||||||
};
|
};
|
||||||
|
|
||||||
public ItemPlates() {
|
public ItemPlates() {
|
||||||
|
@ -53,9 +53,6 @@ public class ItemPlates extends ItemTR {
|
||||||
name = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
|
name = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
if (types[i].equalsIgnoreCase(name)) {
|
if (types[i].equalsIgnoreCase(name)) {
|
||||||
if (types[i].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
throw new InvalidParameterException("The plate " + name + " could not be found.");
|
|
||||||
}
|
|
||||||
return new ItemStack(ModItems.PLATES, count, i);
|
return new ItemStack(ModItems.PLATES, count, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,9 +95,7 @@ public class ItemPlates extends ItemTR {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int meta = 0; meta < types.length; ++meta) {
|
for (int meta = 0; meta < types.length; ++meta) {
|
||||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
|
||||||
list.add(new ItemStack(this, 1, meta));
|
list.add(new ItemStack(this, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue