Added SimpleOres AIOTs

This commit is contained in:
Ellpeck 2015-10-25 23:19:01 +01:00
parent 713e9b6e1a
commit c494edc88b
28 changed files with 101 additions and 34 deletions

View file

@ -34,7 +34,8 @@ public enum ConfigBoolValues{
TF_PAXELS("Thermal Foundation Paxels", ConfigCategories.OTHER, true, "If Paxels made of Thermal Foundation Materials should exist"),
MT_PAXELS("MekanismTools Paxels", ConfigCategories.OTHER, true, "If Paxels made of MekanismTools Materials should exist"),
DUPLICATE_PAXELS("Allow Duplicate Paxels", ConfigCategories.OTHER, true, "If Paxels are allowed to have Duplicates (for Example ActuallyAdditions' Obsidian and MekanismTools' Obsidian)"),
SO_PAXELS("Simpleores Paxels", ConfigCategories.OTHER, true, "If Paxels made of SimpleOres Materials should exist"),
NR_PAXLES("NetherRocks Paxels", ConfigCategories.OTHER, true, "If Paxels made of Netherrock Materials should exist"),
DO_RICE_GEN("Rice Gen", ConfigCategories.WORLD_GEN, true, "If Rice should generate in the World"),
DO_CANOLA_GEN("Canola Gen", ConfigCategories.WORLD_GEN, true, "If Canola should generate in the World"),

View file

@ -27,37 +27,76 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
public class InitForeignPaxels{
public static final String[] MT_NAMES = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"};
private static final String THERMAL_FOUNDATION = "ThermalFoundation";
//MekanismTools
private static final String MEKANISM_TOOLS = "MekanismTools";
private static final String[] TF_NAMES = new String[]{"Copper", "Tin", "Silver", "Lead", "Nickel", "Electrum", "Bronze", "Platinum", "Invar"};
public static final int[] MT_COLORS = new int[]{4166, 2248890, 8882649, 12410135, 11451392, 3684412};
public static final String[] MT_NAMES = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"};
private static final String[] MT_REPAIR_NAMES = new String[]{"ingotRefinedObsidian", "gemLapis", "ingotOsmium", "ingotBronze", "ingotRefinedGlowstone", "ingotSteel"};
public static Item[] tfPaxels = new Item[9];
private static Item[] mtPaxels = new Item[6];
//ThermalFoundation
private static final String THERMAL_FOUNDATION = "ThermalFoundation";
public static final int[] TF_COLORS = new int[]{13332762, 5407943, 5407895, 5394789, 12960613, 12960653, 12410135, 2999795, 10143162};
private static final String[] TF_NAMES = new String[]{"Copper", "Tin", "Silver", "Lead", "Nickel", "Electrum", "Bronze", "Platinum", "Invar"};
public static Item[] tfPaxels = new Item[9];
//SimpleOres
private static final String SIMPLE_ORES = "simpleores";
public static final int[] SO_COLORS = new int[]{9409450, 2040021, 5714944, 526344, 545032};
private static final String[] SO_NAMES = new String[]{"tin", "mythril", "copper", "onyx", "adamantium"};
private static final String[] SO_REPAIR_NAMES = new String[]{"ingotTin", "ingotMythril", "ingotCopper", "gemOnyx", "ingotAdamantium"};
public static Item[] soPaxels = new Item[5];
public static void init(){
//SimpleOres
if(ConfigBoolValues.SO_PAXELS.isEnabled()){
if(Loader.isModLoaded(SIMPLE_ORES)){
ModUtil.LOGGER.info("Initializing "+SIMPLE_ORES+" AIOTs...");
for(int i = 0; i < soPaxels.length; i++){
Item axe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_axe");
Item pickaxe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_pickaxe");
Item hoe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_hoe");
Item sword = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_sword");
Item shovel = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_shovel");
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
soPaxels[i] = new ItemAllToolAA(material, SO_REPAIR_NAMES[i], "paxelSO"+SO_NAMES[i], EnumRarity.rare, SO_COLORS[i]);
ItemUtil.register(soPaxels[i]);
if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(soPaxels[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe());
}
}
}
}
else{
ModUtil.LOGGER.info(SIMPLE_ORES+" not loaded, can't initialize Special AIOTs.");
}
}
//MekanismTools
if(ConfigBoolValues.MT_PAXELS.isEnabled()){
if(Loader.isModLoaded(MEKANISM_TOOLS)){
ModUtil.LOGGER.info("Initializing "+MEKANISM_TOOLS+" AIOTs...");
for(int i = 0; i < mtPaxels.length; i++){
if(!(!ConfigBoolValues.DUPLICATE_PAXELS.isEnabled() && (i == 0 || (i == 3 && ConfigBoolValues.TF_PAXELS.isEnabled() && Loader.isModLoaded(THERMAL_FOUNDATION))))){
Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Axe");
Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe");
Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Hoe");
Item sword = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Sword");
Item shovel = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Shovel");
Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Axe");
Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe");
Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Hoe");
Item sword = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Sword");
Item shovel = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Shovel");
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.rare);
ItemUtil.register(mtPaxels[i]);
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.rare, MT_COLORS[i]);
ItemUtil.register(mtPaxels[i]);
if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe());
}
if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe());
}
}
}
@ -67,7 +106,7 @@ public class InitForeignPaxels{
}
}
//Thermal Foundation
//ThermalFoundation
if(ConfigBoolValues.TF_PAXELS.isEnabled()){
if(Loader.isModLoaded(THERMAL_FOUNDATION)){
ModUtil.LOGGER.info("Initializing "+THERMAL_FOUNDATION+" AIOTs...");
@ -81,7 +120,7 @@ public class InitForeignPaxels{
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.rare);
tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.rare, TF_COLORS[i]);
ItemUtil.register(tfPaxels[i]);
if(ConfigCrafting.PAXELS.isEnabled()){
@ -108,5 +147,10 @@ public class InitForeignPaxels{
CreativeTab.instance.add(item);
}
}
for(Item item : soPaxels){
if(item != null){
CreativeTab.instance.add(item);
}
}
}
}

View file

@ -291,14 +291,14 @@ public class InitItems{
itemHoeQuartz = new ItemHoeAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "itemHoeQuartz", EnumRarity.rare);
ItemUtil.registerItems(new Item[]{itemPickaxeQuartz, itemAxeQuartz, itemShovelQuartz, itemSwordQuartz, itemHoeQuartz});
woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plankWood", "woodenPaxel", EnumRarity.uncommon);
stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, "stone", "stonePaxel", EnumRarity.uncommon);
ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, "ingotIron", "ironPaxel", EnumRarity.rare);
goldPaxel = new ItemAllToolAA(Item.ToolMaterial.GOLD, "ingotGold", "goldPaxel", EnumRarity.rare);
diamondPaxel = new ItemAllToolAA(Item.ToolMaterial.EMERALD, "gemDiamond", "diamondPaxel", EnumRarity.epic);
emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "emeraldPaxel", EnumRarity.epic);
obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "obsidianPaxel", EnumRarity.epic);
quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "quartzPaxel", EnumRarity.rare);
woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plankWood", "woodenPaxel", EnumRarity.uncommon, 5192733);
stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, "stone", "stonePaxel", EnumRarity.uncommon, 7040621);
ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, "ingotIron", "ironPaxel", EnumRarity.rare, 10920613);
goldPaxel = new ItemAllToolAA(Item.ToolMaterial.GOLD, "ingotGold", "goldPaxel", EnumRarity.rare, 16770048);
diamondPaxel = new ItemAllToolAA(Item.ToolMaterial.EMERALD, "gemDiamond", "diamondPaxel", EnumRarity.epic, 3250376);
emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "emeraldPaxel", EnumRarity.epic, 7723338);
obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "obsidianPaxel", EnumRarity.epic, 4166);
quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "quartzPaxel", EnumRarity.rare, 1710103);
ItemUtil.registerItems(new Item[]{woodenPaxel, stonePaxel, ironPaxel, goldPaxel, diamondPaxel, emeraldPaxel, obsidianPaxel, quartzPaxel});
}
}

View file

@ -37,16 +37,20 @@ import java.util.Set;
@SuppressWarnings("unchecked")
public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
private IIcon overlayIcon;
private int color;
private String name;
private EnumRarity rarity;
private String repairItem;
public ItemAllToolAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
public ItemAllToolAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity, int color){
super(4.0F, toolMat, Sets.newHashSet());
this.repairItem = repairItem;
this.name = unlocalizedName;
this.rarity = rarity;
this.color = color;
this.setMaxDamage(this.getMaxDamage()*4);
}
@ -91,13 +95,26 @@ public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconReg){
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
public int getColorFromItemStack(ItemStack stack, int pass){
return pass > 0 ? this.color : super.getColorFromItemStack(stack, pass);
}
@Override
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamageForRenderPass(int damage, int pass){
return pass > 0 ? this.overlayIcon : super.getIconFromDamageForRenderPass(damage, pass);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconReg){
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemPaxel");
this.overlayIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemPaxelOverlay");
}
@Override
public boolean requiresMultipleRenderPasses(){
return true;
}
@Override

View file

@ -171,6 +171,11 @@ item.actuallyadditions.paxelMTLapisLazuli.name=MT Lapis Lazuli AIOT
item.actuallyadditions.paxelMTOsmium.name=MT Osmium AIOT
item.actuallyadditions.paxelMTBronze.name=MT Bronze AIOT
item.actuallyadditions.paxelMTSteel.name=MT Steel AIOT
item.actuallyadditions.paxelSOadamantium.name=SO Adamantium AIOT
item.actuallyadditions.paxelSOcopper.name=SO Copper AIOT
item.actuallyadditions.paxelSOtin.name=SO Tin AIOT
item.actuallyadditions.paxelSOonyx.name=SO Onyx AIOT
item.actuallyadditions.paxelSOmythril.name=SO Mythril AIOT
item.actuallyadditions.itemPhantomConnector.name=Phantom Connector
item.actuallyadditions.itemMiscCup.name=Empty Cup
item.actuallyadditions.itemCoffee.name=Cup with Coffee

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B