/**
* CreativeTab of ChemiCraft.
*/
- public static final CreativeTabs creativeTabAtomsOre = new CreativeTabAtomOres("AtomsOre");
+ public static final CreativeTabs creativeTabAtomOres = new CreativeTabAtomOres("AtomOres");
/**
* the ItemID.
*/
+ public int atomIngotsID;
public int atomGrenadeID;
public int blackSmokeID;
+ public int oreSerarcherID;
public int dustID;
public int radiationGunID;
public int radiationBalletID;
- public int oreSerarcherID;
/**
* the BlockID.
/**
* Variables of Item type.
*/
+ public Item itemAtomIngots;
public Item itemAtomGrenade;
public Item itemBlackSmoke;
public Item itemDust;
/**
* the Textures
*/
- public static final String ORE = ChemiCraft.TEXTURE + "atoms_ore_";
+ public static final String INGOT = ChemiCraft.TEXTURE + "atom_ingots_";
+ public static final String ORE = ChemiCraft.TEXTURE + "atom_ores_";
public ChemiCraftBase() {
this.registerCompounds = new ChemiCraftRegisterCompounds(this);
this.atomOresID[i] = ccfgBlock.additionID();
}
+ this.atomIngotsID = ccfgItem.additionID();
this.atomGrenadeID = ccfgItem.additionID();
this.dustID = ccfgItem.additionID();
this.radiationGunID = ccfgItem.additionID();
// API用の処理
for (int i = 0; i < this.apiBase.getAtomOres().size(); i++) {
OreDictionary.registerOre("ore" + this.apiBase.getAtomOresAtomName().get(i), new ItemStack(this.blockAtomOres[i / 16], 1, i % 16));
+ OreDictionary.registerOre("ingot" + this.apiBase.getAtomOresAtomName().get(i), new ItemStack(this.itemAtomIngots, 1, i ));
GameRegistry.registerWorldGenerator(this.apiBase.getAtomOres().get(i));
}
Iterator<String> langoresItr = this.apiBase.getAtomOresName().iterator();
while (langoresItr.hasNext()){
String lang = langoresItr.next();
- ArrayList<String> names = this.apiBase.getAtomOresName().get(lang);
- for (int i = 0; i < names.size(); i++) {
- ChemiCraftCore.logger.write("AtomOresAddName:" + "Name-" + names.get(i) + "ID-" + (i / 16)+ "/Damage-" + (i - i / 16 * 16) + "/Lang-" + lang,
+ ArrayList<String> oresName = this.apiBase.getAtomOresName().get(lang);
+ ArrayList<String> ingotsName = this.apiBase.getAtomIngotsName().get(lang);
+ for (int i = 0; i < oresName.size(); i++) {
+ ChemiCraftCore.logger.write("AtomOresAddName:" + "IngotName-" + ingotsName.get(i) + "OreName-" + oresName.get(i) + "ID-" + (i / 16)+ "/Damage-" + (i - i / 16 * 16) + "/Lang-" + lang,
EnumLoggingType.INFO);
LanguageRegistry.instance().addNameForObject(
new ItemStack(this.atomOresID[i / 16], 1, i % 16),
lang,
- names.get(i)
+ oresName.get(i)
+ );
+
+ /*
+ LanguageRegistry.instance().addNameForObject(
+ new ItemStack(this.atomIngotsID, 1, i),
+ lang,
+ ingotsName.get(i)
);
+ */
}
}
import java.util.HashMap;
import pcc.chemicraft.base.gen.EnumOreSpawnFrequency;
-import pcc.chemicraft.base.gen.WorldGenAtomsOre;
+import pcc.chemicraft.base.gen.WorldGenAtomOres;
import pcc.chemicraft.util.AtomInfo;
import pcc.chemicraft.util.Formula;
import pcc.chemicraft.util.ListHash;
/**
* 鉱石リスト
*/
- private ArrayList<WorldGenAtomsOre> atomOresList = new ArrayList<WorldGenAtomsOre>();
+ private ArrayList<WorldGenAtomOres> atomOresList = new ArrayList<WorldGenAtomOres>();
/**
/**
+ * インゴット名リスト
+ */
+ private ListHash<String, String> atomIngotsNameListHash = new ListHash<String, String>();
+
+
+ /**
* 鉱石の英語名リスト
*/
private ArrayList<String> atomOresAtomList = new ArrayList<String>();
if (!AtomInfo.isExisting(par1Name)) {
atomOresList.add(
- new WorldGenAtomsOre(
+ new WorldGenAtomOres(
par3Id,
getAtomOresMetaOfLastIndex(),
par4Size,
atomOresAtomList.add(par1Name);
String var7 = par1Name;
- if (!var7.contains(" Ore")) {
- var7 = var7.concat(" Ore");
+ if (!par1Name.contains(" Ore")) {
+ var7 = par1Name + " Ore";
}
addAtomOresLanguage(par1Name, var7, "en_US");
+
+ if (!par1Name.contains(" Ingot")) {
+ var7 = par1Name + " Ingot";
+ }
+
+ addAtomIngotsLanguage(par1Name, var7, "en_US");
}
}
+ /**
+ * 既に登録したインゴットの新しい名前・言語を追加します
+ * @param par1KeyName 鉱石追加の際に用いたpar1Nameに当たる文字列
+ * @param par2NewName 新しい名前
+ * @param par3NewLanguage 新しい言語
+ */
+ public void addAtomIngotsLanguage(String par1KeyName, String par2NewName, String par3NewLanguage){
+ if (this.atomOresAtomList.contains(par1KeyName)){
+ atomIngotsNameListHash.add(
+ par3NewLanguage,
+ par2NewName
+ );
+ }
+ }
+
+
+
//以下システム関連//////////////////////////////////////////////////////
- public ArrayList<WorldGenAtomsOre> getAtomOres(){
+ public ArrayList<WorldGenAtomOres> getAtomOres(){
return atomOresList;
}
+ public ListHash<String, String> getAtomIngotsName(){
+ return atomIngotsNameListHash;
+ }
+
+
+
public ArrayList<String> getAtomOresAtomName() {
return this.atomOresAtomList;
}
@Override
public void start() {
+
//化合物のレシピ
this.mod.api.addChemicalCombinationRecipe(
new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("SodiumChloride")),
this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar),
new Formula("C12H22O11"));
- this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.bucketWater),
+ this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.bucketWater),
new Formula("H2O"));
- this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0),
+ this.mod.api.addReversibleOfElectrolysis(new ItemStack(Item.potion, 1, 0),
new Formula("H2O"));
this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal),
this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal),
new Formula("C"));
+ this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreIron),
+ new Formula("Fe"));
+
+ this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.ingotIron),
+ new Formula("Fe"));
+
+ this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.blockSteel),
+ new Formula("9Fe"));
+
+ this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreGold),
+ new Formula("Au"));
+
+ this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.ingotGold),
+ new Formula("Au"));
+
+ this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.blockGold),
+ new Formula("9Au"));
+
this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood),
new Formula("C6H10O5"));
//鉱石分解の追加
Iterator<String> arrayOreNames = this.mod.apiBase.getAtomOresFormulas().keySet().iterator();
- while (arrayOreNames.hasNext()) {
+ for (int i = 0; arrayOreNames.hasNext(); i++) {
String name = arrayOreNames.next();
- ItemStack itemstack;
+ ItemStack ingot;
+ ItemStack ore;
try {
- itemstack = OreDictionary.getOres(name).get(0);
+ ingot = OreDictionary.getOres("ingot" + name).get(0);
+ ore = OreDictionary.getOres("ore" + name).get(0);
} catch (IndexOutOfBoundsException e) {
int var1 = this.mod.apiBase.getAtomOresAtomName().indexOf(name);
- itemstack = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
+ ingot = new ItemStack(this.mod.itemAtomIngots, 1, i);
+ ore = new ItemStack(this.mod.blockAtomOres[var1 / 16], 1, var1 % 16);
}
this.mod.api.addPyrolysisDecompositionRecipe(
- itemstack,
+ ingot,
+ this.mod.apiBase.getAtomOresFormulas().get(name));
+ this.mod.api.addPyrolysisDecompositionRecipe(
+ ore,
this.mod.apiBase.getAtomOresFormulas().get(name));
}
}
for (int i = 0; i < this.mod.blockAtomOres.length; i++) {
this.mod.blockAtomOres[i] = new BlockAtomOres(this.mod.atomOresID[i]).
setHardness(3.0F).setResistance(0.0F).
- setStepSound(Block.soundStoneFootstep).setUnlocalizedName("BlockAtomsOre");
+ setStepSound(Block.soundStoneFootstep).setUnlocalizedName("atomOres");
//鉱石をMinecraftに登録
- GameRegistry.registerBlock(this.mod.blockAtomOres[i], ItemAtomOres.class, "AtomsOre" + i);
+ GameRegistry.registerBlock(this.mod.blockAtomOres[i], ItemAtomOres.class, "atomOres" + i);
//回収&最適に破壊できるピッケルのレベルを設定
MinecraftForge.setBlockHarvestLevel(this.mod.blockAtomOres[i], "pickaxe", 2);
}
ChemiCraftCore.ATOMSNAMEJP[i] + "鉱石",
"ja_JP"
);
+ this.mod.apiBase.addAtomIngotsLanguage(
+ ChemiCraftCore.ATOMSNAME[i],
+ ChemiCraftCore.ATOMSNAMEJP[i] + "インゴット",
+ "ja_JP"
+ );
}
}
"ランタノイド鉱石",
"ja_JP"
);
+ this.mod.apiBase.addAtomIngotsLanguage(
+ "Lanthanoid",
+ "ランタノイドインゴット",
+ "ja_JP"
+ );
// アクチノイド鉱石
this.mod.apiBase.addAtomOres(
"アクチノイド鉱石",
"ja_JP"
);
+ this.mod.apiBase.addAtomIngotsLanguage(
+ "Actinoid",
+ "アクチノイドインゴット",
+ "ja_JP"
+ );
}
import pcc.chemicraft.base.item.ItemOreSerarcher;
import pcc.chemicraft.base.item.ItemRadiationBullet;
import pcc.chemicraft.base.item.ItemRadiationGun;
+import pcc.chemicraft.base.ore.ItemAtomIngots;
/**
* アイテムを追加します
@Override
public void start() {
//アイテムを変数に代入
+ this.mod.itemAtomIngots = new ItemAtomIngots(this.mod.atomIngotsID).setUnlocalizedName("atomIngots");
this.mod.itemAtomGrenade = new ItemAtomsGrenade(this.mod.atomGrenadeID).setUnlocalizedName("AtomsGrenade");
+ this.mod.itemBlackSmoke = new ItemBlackSmoke(this.mod.blackSmokeID).setUnlocalizedName("BlackSmoke");
this.mod.itemDust = new ItemDust(this.mod.dustID).setUnlocalizedName("dust");
+ this.mod.itemOreSearcher = new ItemOreSerarcher(this.mod.oreSerarcherID).setUnlocalizedName("oreSearcher");
this.mod.itemRadiationGun = new ItemRadiationGun(this.mod.radiationGunID).setUnlocalizedName("RadiationGun");
this.mod.itemRadiationBallet = new ItemRadiationBullet(this.mod.radiationBalletID).setUnlocalizedName("RadiationBullet");
- this.mod.itemBlackSmoke = new ItemBlackSmoke(this.mod.blackSmokeID).setUnlocalizedName("BlackSmoke");
- this.mod.itemOreSearcher = new ItemOreSerarcher(this.mod.oreSerarcherID).setUnlocalizedName("oreSearcher");
//名前を登録&Minecraftに登録
this.mod.nameAuxiliary.addName(this.mod.itemAtomGrenade, "AtomGrenade");
this.mod.nameAuxiliary.addName(this.mod.itemAtomGrenade, "ja_JP", "元素手榴弾");
+ this.mod.nameAuxiliary.addName(this.mod.itemBlackSmoke, "BlackSmoke");
+ this.mod.nameAuxiliary.addName(this.mod.itemBlackSmoke, "ja_JP", "黒煙");
this.mod.nameAuxiliary.addName(this.mod.itemDust, "dust");
this.mod.nameAuxiliary.addName(this.mod.itemDust, "ja_JP", "粉塵");
+ this.mod.nameAuxiliary.addName(this.mod.itemOreSearcher, "OreSearcher");
+ this.mod.nameAuxiliary.addName(this.mod.itemOreSearcher, "ja_JP", "鉱石情報探知機");
this.mod.nameAuxiliary.addName(this.mod.itemRadiationGun, "RadiationGun");
this.mod.nameAuxiliary.addName(this.mod.itemRadiationGun, "ja_JP", "放射線銃");
this.mod.nameAuxiliary.addName(this.mod.itemRadiationBallet, "RadiationBullet");
this.mod.nameAuxiliary.addName(this.mod.itemRadiationGun, "ja_JP", "放射線弾");
- this.mod.nameAuxiliary.addName(this.mod.itemBlackSmoke, "BlackSmoke");
- this.mod.nameAuxiliary.addName(this.mod.itemBlackSmoke, "ja_JP", "黒煙");
- this.mod.nameAuxiliary.addName(this.mod.itemOreSearcher, "OreSearcher");
- this.mod.nameAuxiliary.addName(this.mod.itemOreSearcher, "ja_JP", "鉱石情報探知機");
}
}
@Override
@SideOnly(Side.CLIENT)
public String getTranslatedTabLabel() {
- return "AtomsOre";
+ return "AtomOres";
}
}
* 鉱石生成のインスタンスです
* @author mozipi,ponkotate,つやぴん
*/
-public class WorldGenAtomsOre extends WorldGenMinable implements IWorldGenerator {
+public class WorldGenAtomOres extends WorldGenMinable implements IWorldGenerator {
/**
* 生成率
*/
private int posY;
- public WorldGenAtomsOre(int id, int meta, int size, int frequency, int posY) {
+ public WorldGenAtomOres(int id, int meta, int size, int frequency, int posY) {
super(id, meta, size, Block.stone.blockID);
this.frequency = frequency;
this.posY = posY;
}
- public WorldGenAtomsOre(int id, int meta, EnumOreSpawnFrequency frequency) {
+ public WorldGenAtomOres(int id, int meta, EnumOreSpawnFrequency frequency) {
this(id, meta, frequency.getSize(), frequency.getFrequency(), frequency.getPosY());
}
public class BlockAtomOres extends Block {
@SideOnly(Side.CLIENT)
- private Icon[] iconArray;
+ private Icon[] icons;
public BlockAtomOres(int id) {
super(id, Material.rock);
- this.setCreativeTab(ChemiCraftBase.instance.creativeTabAtomsOre);
+ this.setCreativeTab(ChemiCraftBase.instance.creativeTabAtomOres);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {
ArrayList<String> atomNames = ChemiCraftBaseAPI.instance().getAtomOresAtomName();
- this.iconArray = new Icon[atomNames.size()];
+ this.icons = new Icon[atomNames.size()];
- for (int i = 0; i < this.iconArray.length; i++){
- this.iconArray[i] = par1IconRegister.registerIcon(ChemiCraftBase.ORE + atomNames.get(i));
+ for (int i = 0; i < this.icons.length; i++){
+ this.icons[i] = par1IconRegister.registerIcon(ChemiCraftBase.ORE + atomNames.get(i));
}
// WIP
- this.iconArray[iconArray.length - 1] = par1IconRegister.registerIcon(ChemiCraftBase.ORE + "WIP");
- this.iconArray[iconArray.length - 2] = par1IconRegister.registerIcon(ChemiCraftBase.ORE + "WIP");
+ this.icons[icons.length - 1] = par1IconRegister.registerIcon(ChemiCraftBase.ORE + "WIP");
+ this.icons[icons.length - 2] = par1IconRegister.registerIcon(ChemiCraftBase.ORE + "WIP");
}
@Override
public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
int var3 = this.blockID - ChemiCraftBase.instance.atomOresID[0];
- return this.iconArray[par2 + var3 * 16];
+ return this.icons[par2 + var3 * 16];
}
@Override
--- /dev/null
+package pcc.chemicraft.base.ore;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import pcc.chemicraft.base.ChemiCraftBase;
+import pcc.chemicraft.base.ChemiCraftBaseAPI;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class ItemAtomIngots extends Item {
+
+ @SideOnly(Side.CLIENT)
+ private Icon[] icons;
+
+ public ItemAtomIngots(int par1) {
+ super(par1);
+ this.maxStackSize = 64;
+ this.setHasSubtypes(true);
+ this.setMaxDamage(0);
+ this.setCreativeTab(ChemiCraftBase.instance.creativeTabAtomOres);
+ }
+
+
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List){
+ for(int type = 0; type < ChemiCraftBaseAPI.instance().getAtomOresAtomName().size(); type++)
+ {
+ par3List.add(new ItemStack(par1, 1, type));
+ }
+ }
+
+
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public Icon getIconFromDamage(int par1) {
+ return this.icons[par1];
+ }
+
+
+
+ @Override
+ public String getUnlocalizedName(ItemStack par1ItemStack){
+ return super.getUnlocalizedName() + "." + ChemiCraftBaseAPI.instance().getAtomOresAtomName().get(par1ItemStack.getItemDamage());
+ }
+
+
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void updateIcons(IconRegister par1IconRegister) {
+ ArrayList<String> atomNames = ChemiCraftBaseAPI.instance().getAtomOresAtomName();
+ this.icons = new Icon[atomNames.size()];
+
+ for (int i = 0; i < this.icons.length; i++){
+ this.icons[i] = par1IconRegister.registerIcon(ChemiCraftBase.INGOT + atomNames.get(i));
+ }
+ }
+
+}
@Override
public void start() {
+ GameRegistry.addRecipe(new ItemStack(this.mod.itemGasCollectingBottle),
+ new Object[]{
+ " X ", "X X", "XXX",
+ Character.valueOf('X'), new ItemStack(Item.ingotIron),
+ });
+
//科学作業台のレシピ
GameRegistry.addRecipe(new ItemStack(this.mod.blockPyrolysisTable),
new Object[]{
Character.valueOf('A'), new ItemStack(this.mod.itemAtoms, 1, 0),
});
- GameRegistry.addRecipe(new ItemStack(this.mod.itemChemicalCells, 1, 0),
+ GameRegistry.addRecipe(new ItemStack(this.mod.itemChemicalCells),
new Object[]{
" X ", "ZYZ", "ZYZ",
Character.valueOf('X'), new ItemStack(Item.redstone),
new ItemStack(Item.bucketWater),
new ItemStack(Item.bucketWater),
},
- new ItemStack(this.mod.itemChemicalCells, 1, 0),
+ new ItemStack(this.mod.itemChemicalCells),
null);
this.mod.api.addMaterialRecipe(
{
super(id);
this.setMaxStackSize(1);
- this.setMaxDamage(2);
+ this.setMaxDamage(4);
this.setCreativeTab(ChemiCraftCore.instance.creativeTabChemiCraft);
}
*/
@SideOnly(Side.CLIENT)
public boolean isOverY(int par1) {
- if (this.posY >= par1) {
- return true;
- }else{
- return false;
- }
+ return this.posY >= par1;
}
*/
@SideOnly(Side.CLIENT)
public boolean isEquivalentY(int par1) {
- if (this.posY == par1) {
- return true;
- }else{
- return false;
- }
+ return this.posY == par1;
}
*/
@SideOnly(Side.CLIENT)
public boolean isBelowY(int par1) {
- if (this.posY <= par1) {
- return true;
- }else{
- return false;
- }
+ return this.posY <= par1;
}
}
private ArrayList<String> atoms = new ArrayList<String>();
private ArrayList<Integer> amonts = new ArrayList<Integer>();
+ private int magnification;
+
+ private String lastSpell;
+ private int lastIndex;
+
public Formula(String par1) {
+ this.magnification = 1;
this.run(par1);
}
this.amonts = par2;
}
- // 今後ソースの整頓をする予定 -WIP-
+ // 括弧対応はまだ未完成です。 --WIP--
public void run(String par1) {
- char[] var2 = par1.toCharArray(); // par1のchar配列
- String var3 = null; // setAtomの第一引数に送る
- int var4 = 0; // setAtomの第二引数に送る
- int var5 = 1; // 倍率
- Formula var6 = null; // Formula格納用
+ char[] var2 = par1.toCharArray();
for (int i = 0; i < var2.length; i++) {
- if (Character.isLetter(var2[i])) {
- if (Character.isUpperCase(var2[i])) {
- if (var4 <= 0) {
- var4 = 1;
- }
- if (var3 != null) {
- this.setAtom(var3, var4 * var5);
- } else if (var6 != null) {
- this.setAtoms(var6.getAtoms(), var6.getAmonts(), var4 * var5);
- var6 = null;
- }
- var3 = Character.toString(var2[i]);
- } else {
- var3 = var3.concat(Character.toString(var2[i]));
+ if (var2[i] == '・') {
+ if (this.lastSpell != null) {
+ setAtom(this.lastSpell, this.magnification);
}
- var4 = 0;
+ setAtoms(new Formula(new String(var2, ++i, var2.length - i)));
+ return;
+ } else if (var2[i] == '(') {
+ // 括弧対応はまだ未完成です。 --WIP--
} else if (Character.isDigit(var2[i])) {
- if (var3 != null || var6 != null) {
- var4 = var4 * 10 + Integer.valueOf(Character.toString(var2[i]));
+ if (this.lastIndex > 0) {
+ this.amonts.set(this.amonts.size() - 1, this.magnification
+ * (this.lastIndex = this.lastIndex * 10 + Integer.valueOf(Character.toString(var2[i]))));
+ } else if (this.lastSpell != null) {
+ setAtom(this.lastSpell, this.lastIndex = Integer.valueOf(Character.toString(var2[i])));
} else {
- var5 = Integer.valueOf(Character.toString(var2[i]));
- }
- } else if (var2[i] == '・') {
- if (var3 != null) {
- this.setAtom(var3, var4 * var5);
- } else if (var6 != null) {
- this.setAtoms(var6.getAtoms(), var6.getAmonts(), var4 * var5);
+ this.magnification = Integer.valueOf(Character.toString(var2[i]));
}
- var3 = null;
- var4 = 0;
- var5 = 1;
- var6 = null;
- } else if (var2[i] == '(') {
- if (var3 != null) {
- this.setAtom(var3, var4 * var5);
- var3 = null;
- var4 = 1;
+ this.lastSpell = null;
+ } else if (Character.isLetter(var2[i])) {
+ if (Character.isUpperCase(var2[i])) {
+ if (this.lastSpell != null) {
+ setAtom(this.lastSpell, this.magnification);
+ }
+ this.lastSpell = Character.toString(var2[i]);
+ } else if (Character.isLowerCase(var2[i])) {
+ if (this.lastSpell == null) {
+ throw new IllegalArgumentException();
+ }
+ this.lastSpell = this.lastSpell.concat(Character.toString(var2[i]));
+
+ if (var2.length <= i + 1) {
+ setAtom(this.lastSpell, this.magnification);
+ }
}
- int var7 = par1.indexOf(')');
- String var8 = par1.substring(i + 1, var7);
- var6 = new Formula(var8);
- i = var7;
+ this.lastIndex = 0;
} else {
throw new IllegalArgumentException();
}
}
- if (var3 != null) {
- if (var4 <= 0) {
- var4 = 1;
- }
- this.setAtom(var3, var4 * var5);
- }
}
public boolean isAtom(String par1) {
throw new IndexOutOfBoundsException();
}
for (int i = 0; i < par1.length; i++) {
- this.setAtom(par1[i], par2[i] * par3);
+ setAtom(par1[i], par2[i] * par3);
}
}
+ public void setAtoms(Formula par1) {
+ setAtoms(par1, 1);
+ }
+
+ public void setAtoms(Formula par1, int par2) {
+ setAtoms(par1.getAtoms(), par1.getAmonts(), par2);
+ }
+
public String[] getAtoms() {
return atoms.toArray(new String[atoms.size()]);
}