OSDN Git Service

d2fbda00cd958d4a4a85acf325fac11cc8d16955
[chemicraft/chemicraft.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)) {
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                                 this.mod.apiBase.addAtomOresLanguage(ChemiCraftCore.ATOMSNAME[i], ChemiCraftCore.ATOMSNAMEJP[i] + "鉱石", "ja_JP");
32                         }
33                 }
34
35                 // ランタノイド鉱石
36                 this.mod.apiBase.addAtomOres(
37                                 "Lanthanoid",
38                                 new Formula("LaCePrNdPmSmEuGdTbDyHoErTmYbLu"),
39                                 this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
40                                 EnumOreSpawnFrequency.RARE);
41                 // LaCePrNdPmSmEuGdTbDyHoErTmYbLu
42                 this.mod.apiBase.addAtomOresLanguage("Lanthanoid", "ランタノイド鉱石", "ja_JP");
43
44                 // アクチノイド鉱石
45                 this.mod.apiBase.addAtomOres(
46                                 "Actinoid",
47                                 new Formula("AcThPaUNpPuAmCmBkCfEsFmMdNoLr"),
48                                 this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
49                                 EnumOreSpawnFrequency.RARE);
50                 // AcThPaUNpPuAmCmBkCfEsFmMdNoLr
51                 this.mod.apiBase.addAtomOresLanguage("Actinoid", "アクチノイド鉱石", "ja_JP");
52
53         }
54
55 }