From: mozipi Date: Sat, 9 Mar 2013 01:32:09 +0000 (+0900) Subject: マージ用にコミット X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=refs%2Fheads%2F%E3%82%A2%E3%82%A4%E3%83%86%E3%83%A0%E7%B3%BB%E7%B5%B1%E8%BF%BD%E5%8A%A0;hp=515b25fe0e9b862f2e539575b469648a0a6413eb;p=chemicraft%2Fchemicraft.git マージ用にコミット --- diff --git a/common/pcc/chemicraft/ChemiCraftAPI.java b/common/pcc/chemicraft/ChemiCraftAPI.java index bdddd39..b1285d8 100644 --- a/common/pcc/chemicraft/ChemiCraftAPI.java +++ b/common/pcc/chemicraft/ChemiCraftAPI.java @@ -5,6 +5,7 @@ import java.util.HashMap; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import pcc.chemicraft.gen.EnumOreSpawnFrequency; import pcc.chemicraft.gen.WorldGenAtomsOre; import pcc.chemicraft.system.ChemiCraftCraftingManager; import pcc.chemicraft.tileentity.TileEntityElectrolysisTable; @@ -176,7 +177,13 @@ public class ChemiCraftAPI { * @param par7PosY Y座標 */ public void addAtomOres(String par1Name, Integer[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, int par6Frequency, int par7PosY){ - atomOresList.add(new WorldGenAtomsOre(par4Id, getAtomOresMetaOfLastIndex(), par5Size, par6Frequency, par7PosY)); + atomOresList.add( + new WorldGenAtomsOre( + par4Id, + getAtomOresMetaOfLastIndex(), + par5Size, + par6Frequency, + par7PosY)); atomOresAtomsHash.put(par1Name, par2Atoms); atomOresAmountsHash.put(par1Name, par3Amounts); addAtomOresLanguage(par1Name, par1Name, "en_US"); @@ -184,8 +191,48 @@ public class ChemiCraftAPI { + /** + * 鉱石を追加します + * @param par1Name 鉱石名 + * @param par2Atoms 元素 + * @param par3Amounts 元素数 + * @param par4Id ID + * @param par5Size 量 + * @param par6Frequency 頻度 + * @param par7PosY Y座標 + */ public void addAtomOres(String par1Name, String[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, int par6Frequency, int par7PosY){ - addAtomOres(par1Name, ChemiCraftData.toAtoms(par2Atoms), par3Amounts, par4Id, par5Size, par6Frequency, par7PosY); + addAtomOres( + par1Name, + ChemiCraftData.toAtoms(par2Atoms), + par3Amounts, + par4Id, + par5Size, + par6Frequency, + par7PosY); + } + + + + /** + * 鉱石を追加します + * @param par1Name 鉱石名 + * @param par2Atoms 元素 + * @param par3Amounts 元素数 + * @param par4Id ID + * @param par5Size 量 + * @param par6Frequency 頻度 + * @param par7PosY Y座標 + */ + public void addAtomOres(String par1Name, String[] par2Atoms, Integer[] par3Amounts, int par4Id, int par5Size, EnumOreSpawnFrequency par6Enum){ + addAtomOres( + par1Name, + ChemiCraftData.toAtoms(par2Atoms), + par3Amounts, + par4Id, + par5Size, + par6Enum.getFrequency(), + par6Enum.getPosY()); } @@ -197,8 +244,10 @@ public class ChemiCraftAPI { * @param par3Language 言語 */ public void addAtomOresLanguage(String par1Name, String par2NewName, String par3Language){ - atomOresNameListHash.add(par1Name, par2NewName); - atomOresLangListHash.add(par1Name, par3Language); + atomOresNameListHash.add(par1Name, + par2NewName); + atomOresLangListHash.add(par1Name, + par3Language); } @@ -208,8 +257,16 @@ public class ChemiCraftAPI { * @param par1Name */ public void addChemicalCell(Item par1ChemicalCell, String par2Name, int par3OperationTime){ - chemicalCellsList.put(new ItemStack(par1ChemicalCell, 0, chemicalCellsNameListHash.sizeKeysList()), par3OperationTime); - addChemicalCellLanguage(par2Name, "en_US", par2Name); + chemicalCellsList.put( + new ItemStack( + par1ChemicalCell, + 0, + chemicalCellsNameListHash.sizeKeysList()), + par3OperationTime); + addChemicalCellLanguage( + par2Name, + "en_US", + par2Name); } @@ -265,8 +322,12 @@ public class ChemiCraftAPI { public void addCompoundLanguage(String lang, String englishName, String langName){ - compoundsNameListHash.add(englishName, langName); - compoundsLangListHash.add(englishName, lang); + compoundsNameListHash.add( + englishName, + langName); + compoundsLangListHash.add( + englishName, + lang); } @@ -277,7 +338,9 @@ public class ChemiCraftAPI { * @param burnTime 燃焼時間(tick * rate) */ public void addPyrolysisDecompositionFuel(ItemStack itemstack, int burnTime) { - TileEntityPyrolysisTable.addFuel(itemstack, burnTime); + TileEntityPyrolysisTable.addFuel( + itemstack, + burnTime); } @@ -288,21 +351,35 @@ public class ChemiCraftAPI { * @param integers2 原子のできる数の配列 */ public void addPyrolysisDecompositionRecipe(ItemStack material, Integer[] integers, Integer[] integers2) { - ItemStack[] itemstacks = new ItemStack[integers.length]; + ItemStack[] itemstacks = + new ItemStack[integers.length]; for (int i = 0; i < itemstacks.length; i++) { - itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,integers2[i], integers[i]); + itemstacks[i] = + new ItemStack( + ChemiCraft.instance.itemAtoms, + integers2[i], + integers[i]); } - TileEntityPyrolysisTable.addRecipe(material, itemstacks); + TileEntityPyrolysisTable.addRecipe( + material, + itemstacks); } public void addElectrolysisDecompositionRecipe(ItemStack material, Integer[] integers, Integer[] integers2) { - ItemStack[] itemstacks = new ItemStack[integers.length]; + ItemStack[] itemstacks = + new ItemStack[integers.length]; for (int i = 0; i < itemstacks.length; i++) { - itemstacks[i] = new ItemStack(ChemiCraft.instance.itemAtoms,integers2[i], integers[i]); + itemstacks[i] = + new ItemStack( + ChemiCraft.instance.itemAtoms, + integers2[i], + integers[i]); } - TileEntityElectrolysisTable.addRecipe(material, itemstacks); + TileEntityElectrolysisTable.addRecipe( + material, + itemstacks); } @@ -314,7 +391,12 @@ public class ChemiCraftAPI { * @param nbtRecipe NBT(Nullの場合はなし) */ public void addMaterialRecipe(ItemStack[] materials, ItemStack result, ChemicalNBTRecipe nbtRecipe){ - materialRecipe.add(new MaterialRecipe(result, materials, nbtRecipe, false)); + materialRecipe.add( + new MaterialRecipe( + result, + materials, + nbtRecipe, + false)); } @@ -326,7 +408,12 @@ public class ChemiCraftAPI { * @param nbtRecipe NBT(Nullの場合はなし) */ public void addSharplessMaterialRecipe(ItemStack[] materials, ItemStack result, ChemicalNBTRecipe nbtRecipe){ - materialRecipe.add(new MaterialRecipe(result, materials, nbtRecipe, true)); + materialRecipe.add( + new MaterialRecipe( + result, + materials, + nbtRecipe, + true)); } @@ -359,7 +446,7 @@ public class ChemiCraftAPI { return atomOresList; } - + //以下システム関連////////////////////////////////////////////////////// public HashMap getAtomOresAmounts(){ diff --git a/common/pcc/chemicraft/gen/EnumOreSpawnFrequency.java b/common/pcc/chemicraft/gen/EnumOreSpawnFrequency.java index 7947a7d..ae99dbd 100644 --- a/common/pcc/chemicraft/gen/EnumOreSpawnFrequency.java +++ b/common/pcc/chemicraft/gen/EnumOreSpawnFrequency.java @@ -6,23 +6,29 @@ package pcc.chemicraft.gen; */ public enum EnumOreSpawnFrequency { - HIGH(10), - NORMAL(5), - LOW(3), - RARE(1); - + HIGH(10, 256), + NORMAL(5, 64), + LOW(3, 30), + RARE(1, 15); + /** * 鉱石の生成頻度 */ private short frequency; - + + /** + * 鉱石の生成最高高度 + */ + private short posY; + /** * @param par1 鉱石の生成頻度 */ - private EnumOreSpawnFrequency(int par1) { + private EnumOreSpawnFrequency(int par1, int par2) { this.frequency = (short) par1; + this.posY = (short) par2; } - + /** * 鉱石の生成頻度を返します * @return 鉱石の生成頻度 @@ -30,5 +36,14 @@ public enum EnumOreSpawnFrequency { public short getFrequency() { return this.frequency; } - + + /** + * 鉱石の生成最高高度を変えします + * @return 鉱石の生成最高高度 + */ + public short getPosY() { + return this.posY; + } + + }