OSDN Git Service

修正・変更
[chemicraft/chemicraft.git] / common / pcc / chemicraft / item / ItemCompounds.java
index 14be9bc..e34c3d6 100644 (file)
@@ -2,23 +2,14 @@ package pcc.chemicraft.item;
 
 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;
 
@@ -33,21 +24,14 @@ public class ItemCompounds extends Item {
 
        @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;
        }
@@ -56,21 +40,14 @@ public class ItemCompounds extends Item {
        @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;
        }
@@ -79,22 +56,15 @@ public class ItemCompounds extends Item {
 
        @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
                }
        }
 
@@ -104,11 +74,7 @@ public class ItemCompounds extends Item {
        @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);
@@ -119,16 +85,12 @@ public class ItemCompounds extends Item {
 
        @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
        }
 
 
@@ -143,21 +105,14 @@ public class ItemCompounds extends Item {
        @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;
        }