OSDN Git Service

修正・変更
[chemicraft/ChemiCraftNext.git] / common / pcc / chemicraft / base / ChemiCraftRegisterChemicalRecipe.java
1 package pcc.chemicraft.base;
2
3 import pcc.chemicraft.base.gen.EnumOreSpawnFrequency;
4 import pcc.chemicraft.core.ChemiCraftCore;
5 import pcc.chemicraft.util.AtomInfo;
6 import pcc.chemicraft.util.Formula;
7
8 /**
9  * 科学的なレシピを追加します
10  * @author mozipi,ponkotate
11  */
12 public class ChemiCraftRegisterChemicalRecipe extends ChemiCraftBaseRegister {
13
14         public ChemiCraftRegisterChemicalRecipe(ChemiCraftBase mod) {
15                 super(mod);
16         }
17
18         @Override
19         public void start() {
20                 // 鉱石を追加
21                 for (int i = 0; i < this.mod.chemicalData.ATOMSLIST.length; i++) {
22                         if (AtomInfo.isSolid(i + 1) && !AtomInfo.isLanthanoid(i + 1)
23                                         && !AtomInfo.isActinoid(i + 1) && !AtomInfo.isOreOfVanilla(i + 1)) {
24                                 //鉱石をAPIに追加
25                                 this.mod.apiBase.addAtomOres(
26                                                 ChemiCraftCore.ATOMSNAME[i],
27                                                 new Formula(this.mod.chemicalData.ATOMSLIST[i]),
28                                                 this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
29                                                 EnumOreSpawnFrequency.NORMAL
30                                                 );
31                                 //日本語名で追加
32                                 this.mod.apiBase.addAtomOresLanguage(
33                                                 ChemiCraftCore.ATOMSNAME[i],
34                                                 ChemiCraftCore.ATOMSNAMEJP[i] + "鉱石",
35                                                 "ja_JP"
36                                                 );
37                         }
38                 }
39
40                 // ランタノイド鉱石
41                 this.mod.apiBase.addAtomOres(
42                                 "Lanthanoid",
43                                 new Formula("LaCePrNdPmSmEuGdTbDyHoErTmYbLu"),
44                                 this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
45                                 EnumOreSpawnFrequency.RARE
46                                 );
47                 // LaCePrNdPmSmEuGdTbDyHoErTmYbLu
48                 this.mod.apiBase.addAtomOresLanguage(
49                                 "Lanthanoid",
50                                 "ランタノイド鉱石",
51                                 "ja_JP"
52                                 );
53
54                 // アクチノイド鉱石
55                 this.mod.apiBase.addAtomOres(
56                                 "Actinoid",
57                                 new Formula("AcThPaUNpPuAmCmBkCfEsFmMdNoLr"),
58                                 this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
59                                 EnumOreSpawnFrequency.RARE);
60                 // AcThPaUNpPuAmCmBkCfEsFmMdNoLr
61                 this.mod.apiBase.addAtomOresLanguage(
62                                 "Actinoid",
63                                 "アクチノイド鉱石",
64                                 "ja_JP"
65                                 );
66
67         }
68
69 }