OSDN Git Service

文字コードをSJISからUTF8へ
[chemicraft/chemicraft.git] / src / ChemiCraft.java
index 6628332..7093007 100644 (file)
@@ -4,6 +4,7 @@ import java.util.ArrayList;
 import java.util.Properties;\r
 \r
 import net.minecraft.src.Block;\r
+import net.minecraft.src.CreativeTabs;\r
 import net.minecraft.src.Item;\r
 import net.minecraft.src.ItemStack;\r
 import net.minecraftforge.common.Configuration;\r
@@ -22,6 +23,8 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
 public class ChemiCraft\r
 {\r
 \r
+       public static final CreativeTabs tabAtoms = new CreativeTabAtoms("tabAtoms");\r
+\r
        public static final String[] atomsName = {\r
                "Hydrogen", "Helium","Lithium","Beryllium","Boron","Carbon","Nitrogen","Oxygen","Fluorine","Neon",\r
                "Sodium","Magnesium","Aluminium","Silicon","Phosphorus","Sulfur","Chlorine","Argon","Potassium","Calcium",\r
@@ -54,13 +57,13 @@ public class ChemiCraft
 \r
        private ChemiCraftAPI chemiCraftAPI = ChemiCraftAPI.instance;\r
 \r
+       public static int gasCollectingBottleID;\r
        public static int atomsID;\r
        public static int compoundsID;\r
-       public static int gasCollectingBottleID;\r
 \r
+       public static Item itemGasCollectingBottle;\r
        public static Item itemAtoms;\r
        public static Item itemCompounds;\r
-       public static Item itemGasCollectingBottle;\r
 \r
        private Auxiliary Auxiliary = new Auxiliary();\r
        private Auxiliary.NameAuxiliary NameAuxiliary = Auxiliary.new NameAuxiliary();\r
@@ -69,9 +72,9 @@ public class ChemiCraft
        @Mod.Init\r
        public void chemiLoadMethod(FMLInitializationEvent event)\r
        {\r
+\r
                //\89»\8d\87\95¨\82Ì\92Ç\89Á\r
-               ChemiCraftAPI.addCompound("Salt(Sodium chloride)");\r
-               ChemiCraftAPI.addLangCompound("ja_JP", "\89\96(\89\96\89»\83i\83g\83\8a\83E\83\80)");\r
+               ChemiCraftAPI.addLangCompound("ja_JP", "Salt", "\89\96");\r
        }\r
 \r
        @Mod.PreInit  // \91O\8f\88\97\9d\r
@@ -79,21 +82,21 @@ public class ChemiCraft
        {\r
                Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());\r
                cfg.load();\r
-               Property atomsIDProp = cfg.getItem("atomsID", 25000);\r
-               Property compoundsIDProp = cfg.getItem("compoundsID", 25001);\r
-               Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);\r
+               Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25000);\r
+               Property atomsIDProp = cfg.getItem("atomsID", 25001);\r
+               Property compoundsIDProp = cfg.getItem("compoundsID", 25002);\r
+               gasCollectingBottleID = gasCollectingBottleIDProp.getInt();\r
                atomsID = atomsIDProp.getInt();\r
                compoundsID = compoundsIDProp.getInt();\r
-               gasCollectingBottleID = gasCollectingBottleIDProp.getInt();\r
                cfg.save();\r
        }\r
 \r
        @Mod.PostInit // ModLoader.load\83\81\83\\83b\83h\82Æ\93¯\93\99\r
        public void chemiPostLoadMethod(FMLPostInitializationEvent event)\r
        {\r
+               itemGasCollectingBottle = new ItemGasCollectingBottle(gasCollectingBottleID).setItemName("gasCollectingBottle");\r
                itemAtoms = new ItemAtoms(atomsID).setItemName("atoms");\r
                itemCompounds = new ItemCompounds(compoundsID).setItemName("compounds");\r
-               itemGasCollectingBottle = new ItemGasCollectingBottle(gasCollectingBottleID).setItemName("gasCollectingBottle");\r
 \r
                NameAuxiliary.addName(itemAtoms, atomsName);\r
                NameAuxiliary.addName(itemAtoms, "ja_JP", atomsNameJP);\r
@@ -101,6 +104,9 @@ public class ChemiCraft
                NameAuxiliary.addName(itemCompounds, "ja_JP", ChemiCraftAPI.getCompoundsLangName().toArray());\r
                NameAuxiliary.addName(itemGasCollectingBottle, "GasCollectingBottle");\r
                NameAuxiliary.addName(itemGasCollectingBottle, "ja_JP", "\8fW\8bC\95r");\r
+\r
+               ChemiCraftAPI.addCompoundHandler("Salt", new CompoundHandlerTest());\r
+\r
        }\r
 \r
 }
\ No newline at end of file