OSDN Git Service

修正・変更
authorponkotate <ponkotate@users.sourceforge.jp>
Sat, 30 Mar 2013 10:55:41 +0000 (19:55 +0900)
committerponkotate <ponkotate@users.sourceforge.jp>
Sat, 30 Mar 2013 10:55:41 +0000 (19:55 +0900)
・AtomInfoに気体等の判定メソッド追加
・鉱石完全収録

common/pcc/chemicraft/base/ChemiCraftBase.java
common/pcc/chemicraft/base/ChemiCraftRegisterChemicalRecipe.java
common/pcc/chemicraft/util/AtomInfo.java

index dfa7dd1..7c06def 100644 (file)
@@ -63,7 +63,7 @@ public class ChemiCraftBase extends ChemiCraft
        /**
         * the BlockID.
         */
        /**
         * the BlockID.
         */
-       public int[] atomOresID = new int[3];
+       public int[] atomOresID = new int[4];
 
        /**
         * Variables of Block type.
 
        /**
         * Variables of Block type.
index 86b5ad7..a4a35da 100644 (file)
@@ -2,6 +2,8 @@ package pcc.chemicraft.base;
 
 import pcc.chemicraft.ChemiCraftData;
 import pcc.chemicraft.base.gen.EnumOreSpawnFrequency;
 
 import pcc.chemicraft.ChemiCraftData;
 import pcc.chemicraft.base.gen.EnumOreSpawnFrequency;
+import pcc.chemicraft.core.ChemiCraftCore;
+import pcc.chemicraft.util.AtomInfo;
 import pcc.chemicraft.util.Formula;
 
 public class ChemiCraftRegisterChemicalRecipe extends ChemiCraftBaseRegister
 import pcc.chemicraft.util.Formula;
 
 public class ChemiCraftRegisterChemicalRecipe extends ChemiCraftBaseRegister
@@ -17,11 +19,19 @@ public class ChemiCraftRegisterChemicalRecipe extends ChemiCraftBaseRegister
        {
                // 元素入手手段
 
        {
                // 元素入手手段
 
-               // 水素
-               // 水を分解。
-
-               // ヘリウム
-               // 未定。
+               for (int i = 0; i < this.mod.chemicalData.ATOMSLIST.length; i++)
+               {
+                       if (AtomInfo.isSolid(i + 1) && !AtomInfo.isLanthanoid(i + 1) && !AtomInfo.isActinoid(i + 1))
+                       {
+                               String var1 = ChemiCraftCore.ATOMSNAME[i] + "Ore";
+                               this.mod.apiBase.addAtomOres(
+                                               var1,
+                                               new Formula(this.mod.chemicalData.ATOMSLIST[i]),
+                                               this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
+                                               EnumOreSpawnFrequency.NORMAL);
+                               this.mod.apiBase.addAtomOresLanguage(var1, ChemiCraftCore.ATOMSNAMEJP[i] + "鉱石", "ja_JP");
+                       }
+               }
 
                // ランタノイド鉱石
                this.mod.apiBase.addAtomOres(
 
                // ランタノイド鉱石
                this.mod.apiBase.addAtomOres(
index 822dea3..3028a27 100644 (file)
@@ -11,7 +11,46 @@ import cpw.mods.fml.relauncher.SideOnly;
  * @author ponkotate
  *
  */
  * @author ponkotate
  *
  */
-public class AtomInfo {
+public final class AtomInfo {
+
+       /**
+        * 気体
+        */
+       public static final Integer[] gases = new Integer[]{
+               1, 2, 7, 8, 9, 10, 17, 18, 36, 54, 86
+       };
+
+
+       /**
+        * 液体
+        */
+       public static final Integer[] liquids = new Integer[]{
+               35, 80
+       };
+
+
+       /**
+        * 不明
+        */
+       public static final Integer[] unknown = new Integer[]{
+               98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118
+       };
+
+
+       public static final Integer[] lanthanoid = new Integer[]{
+               57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71
+       };
+
+
+       public static final Integer[] actinoid = new Integer[]{
+               89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103
+       };
+
+
+       public static final Integer[] unofficial = new Integer[]{
+               113, 114, 115, 116, 117, 118
+       };
+
 
        /**
         * X, Y, Z座標
 
        /**
         * X, Y, Z座標
@@ -72,6 +111,81 @@ public class AtomInfo {
 
 
 
 
 
 
+       public static boolean isGas(int par1){
+               for (int var2:gases){
+                       if (par1 == var2){
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+
+
+       public static boolean isLiquid(int par1){
+               for (int var2:liquids){
+                       if (par1 == var2){
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+
+
+       public static boolean isSolid(int par1){
+               if (!isGas(par1) && !isLiquid(par1) && !isUnknown(par1)){
+                       return true;
+               }
+               return false;
+       }
+
+
+
+       public static boolean isUnknown(int par1){
+               for (int var2:unknown){
+                       if (par1 == var2){
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+
+
+       public static boolean isLanthanoid(int par1){
+               for (int var2:lanthanoid){
+                       if (par1 == var2){
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+
+
+       public static boolean isActinoid(int par1){
+               for (int var2:actinoid){
+                       if (par1 == var2){
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+
+
+       public static boolean isUnofficial(int par1){
+               for (int var2:unofficial){
+                       if (par1 == var2){
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+
+
        /**
         * 引数に指定されたBiomeと同等か比較します
         * @param biomeName 比較するBiomeの名前
        /**
         * 引数に指定されたBiomeと同等か比較します
         * @param biomeName 比較するBiomeの名前