import java.util.List;
-<<<<<<< HEAD
-import pcc.chemicraft.ChemiCraft;
-import pcc.chemicraft.ChemiCraftAPI;
-
-=======
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
-<<<<<<< HEAD
-=======
import pcc.chemicraft.ChemiCraft;
import pcc.chemicraft.ChemiCraftAPI;
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
-<<<<<<< HEAD
- for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
- return ChemiCraftAPI.instance().getCompoundHandler().get(i).onItemUseHandler(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
- }
-=======
try {
- for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
- return ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onItemUseHandler(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
+ for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
+ if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+ return ChemiCraftAPI.instance().getCompoundHandler().get(i).onItemUseHandler(par1ItemStack, par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
}
}
} catch (IndexOutOfBoundsException e) {
par1ItemStack.stackSize = 0;
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
}
return false;
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
-<<<<<<< HEAD
- for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
- ChemiCraftAPI.instance().getCompoundHandler().get(i).onItemRightClickHandler(par1ItemStack, par2World, par3EntityPlayer);
- }
-=======
try {
- for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
- ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onItemRightClickHandler(par1ItemStack, par2World, par3EntityPlayer);
+ for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
+ if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+ ChemiCraftAPI.instance().getCompoundHandler().get(i).onItemRightClickHandler(par1ItemStack, par2World, par3EntityPlayer);
}
}
} catch (IndexOutOfBoundsException e) {
par1ItemStack.stackSize = 0;
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
}
return par1ItemStack;
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5){
-<<<<<<< HEAD
- for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
- ChemiCraftAPI.instance().getCompoundHandler().get(i).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
- }
-=======
try {
- for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
- ChemiCraftAPI.getInstance().getCompoundHandler().get(i).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
+ for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
+ if(ChemiCraftAPI.instance().getCompoundsName().get(par1ItemStack.getItemDamage()).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+ ChemiCraftAPI.instance().getCompoundHandler().get(i).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
}
}
} catch (IndexOutOfBoundsException e) {
par1ItemStack.stackSize = 0;
par1ItemStack = null;
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
}
}
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List){
-<<<<<<< HEAD
for(int type = 0; type < ChemiCraftAPI.instance().getCompoundsName().toArray().length; type++)
-=======
- for(int type = 0; type < ChemiCraftAPI.getInstance().getCompoundsName().toArray().length; type++)
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
{
par3List.add(new ItemStack(par1, 1, type));
this.setIconIndex(type);
@Override
public String getItemNameIS(ItemStack par1ItemStack){
-<<<<<<< HEAD
- return super.getItemName() + "." + ChemiCraftAPI.instance().getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
-=======
try {
- return super.getItemName() + "." + ChemiCraftAPI.getInstance().getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
+ return super.getItemName() + "." + ChemiCraftAPI.instance().getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
} catch (ArrayIndexOutOfBoundsException e) {
par1ItemStack.stackSize = 0;
}
return null;
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
}
@SideOnly(Side.CLIENT)
@Override
public int getIconFromDamage(int par1){
-<<<<<<< HEAD
- for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.instance().getCompoundsName().get(par1).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
- return ChemiCraftAPI.instance().getCompoundHandler().get(i).getIconIndexHandler();
- }
-=======
try {
- for(int i=0;i < ChemiCraftAPI.getInstance().getCompoundHandlerItemName().size();i++){
- if(ChemiCraftAPI.getInstance().getCompoundsName().get(par1).equals(ChemiCraftAPI.getInstance().getCompoundHandlerItemName().get(i))){
- return ChemiCraftAPI.getInstance().getCompoundHandler().get(i).getIconIndexHandler();
+ for(int i=0;i < ChemiCraftAPI.instance().getCompoundHandlerItemName().size();i++){
+ if(ChemiCraftAPI.instance().getCompoundsName().get(par1).equals(ChemiCraftAPI.instance().getCompoundHandlerItemName().get(i))){
+ return ChemiCraftAPI.instance().getCompoundHandler().get(i).getIconIndexHandler();
}
}
} catch (IndexOutOfBoundsException e) {
return 0;
->>>>>>> a5e4a5c40b9001657f1e36ece533651f63183fbe
}
return 0;
}