Revisión | f27aa4f3a6a0163e53b3c45beda1bc29ff70f30b (tree) |
---|---|
Tiempo | 2013-03-07 19:41:31 |
Autor | mozipi <mozipi@user...> |
Commiter | mozipi |
Merge branch 'master' of git.sourceforge.jp:/gitroot/chemicraft/chemicraft
@@ -460,6 +460,10 @@ public class ChemiCraft implements Runnable { | ||
460 | 460 | api.addAtomOres("Calcite", new String[]{"Ca", "C", "O"}, new Integer[]{1, 1, 3}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // CaCO3 |
461 | 461 | api.addAtomOresLanguage("Calcite", "方解石", "ja_JP"); |
462 | 462 | |
463 | + // スカンジウム | |
464 | + api.addAtomOres("Thortveitite", new String[]{"Sc", "Y", "Si", "O"}, new Integer[]{2, 2, 2, 7}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // (Sc,Y)2Si2O7 | |
465 | + api.addAtomOresLanguage("Thortveitite", "トルトベイト石", "ja_JP"); | |
466 | + | |
463 | 467 | // api.addAtomOres("元素名(英)", new String[]{"元素"}, new Integer[]{<数>}, this.atomOresID[api.getAtomOresLastIndex()], 5, 1, 50); // 化学式 |
464 | 468 | // api.addAtomOresLanguage("元素名(英)", "元素名(他国語)", "言語"); |
465 | 469 |
@@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack; | ||
7 | 7 | import net.minecraft.world.World; |
8 | 8 | import pcc.chemicraft.ChemiCraft; |
9 | 9 | import pcc.chemicraft.ChemiCraftAPI; |
10 | +import pcc.chemicraft.ChemiCraftData; | |
10 | 11 | import pcc.chemicraft.util.Auxiliary.Probability; |
11 | 12 | |
12 | 13 | public class ItemGasCollectingBottle extends ItemAtomInfoContainer |
@@ -14,7 +15,8 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer | ||
14 | 15 | |
15 | 16 | public Probability probability = new Probability(); |
16 | 17 | |
17 | - public ItemGasCollectingBottle(int id) { | |
18 | + public ItemGasCollectingBottle(int id) | |
19 | + { | |
18 | 20 | super(id); |
19 | 21 | this.setMaxStackSize(1); |
20 | 22 | this.setMaxDamage(2); |
@@ -28,30 +30,28 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer | ||
28 | 30 | |
29 | 31 | this.atomInfo.update(par2World, par3EntityPlayer); |
30 | 32 | |
31 | - int heightValue = par2World.getHeightValue((int) par3EntityPlayer.posX, (int) par3EntityPlayer.posZ); | |
33 | + int heightValue = par2World.getHeightValue((int)par3EntityPlayer.posX, (int)par3EntityPlayer.posZ); | |
32 | 34 | |
33 | - int result1 = probability.getProbability(99.0D, 1.0D); | |
34 | - int result2 = probability.getProbability(78.0D, 21.0D, 1.0D); | |
35 | - int result3 = probability.getProbability(0.032D, 0.0018D, 0.000012D, 0.00052D); | |
35 | + int result = probability.getProbability(78.0D, 21.0D, 1.0D, 0.032D, 0.0018D, 0.000012D, 0.00052D, 0.000114D, 0.000087D); | |
36 | 36 | if (this.atomInfo.isOverY(heightValue)) { |
37 | - if (result1 == 0) { | |
38 | - if (result2 == 0) { | |
39 | - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 6), par3EntityPlayer); | |
40 | - } else if (result2 == 1) { | |
41 | - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 7), par3EntityPlayer); | |
42 | - } else { | |
43 | - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 17), par3EntityPlayer); | |
44 | - } | |
37 | + if (result == 0) { | |
38 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, ChemiCraftData.NITROGEN), par3EntityPlayer); | |
39 | + } else if (result == 1) { | |
40 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, ChemiCraftData.OXYGEN), par3EntityPlayer); | |
41 | + } else if (result == 2) { | |
42 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, ChemiCraftData.ARGON), par3EntityPlayer); | |
43 | + } else if (result == 3) { | |
44 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.instance().getCompound("CarbonDioxide")), par3EntityPlayer); | |
45 | + } else if (result == 4) { | |
46 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, ChemiCraftData.NEON), par3EntityPlayer); | |
47 | + } else if (result == 5) { | |
48 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.instance().getCompound("CarbonMonoxide")), par3EntityPlayer); | |
49 | + } else if (result == 6) { | |
50 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, ChemiCraftData.LITHIUM), par3EntityPlayer); | |
51 | + } else if (result == 7) { | |
52 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, ChemiCraftData.KRYPTON), par3EntityPlayer); | |
45 | 53 | } else { |
46 | - if (result3 == 0) { | |
47 | - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.instance().getCompound("CarbonDioxide")), par3EntityPlayer); | |
48 | - } else if (result3 == 1) { | |
49 | - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 9), par3EntityPlayer); | |
50 | - } else if (result3 == 2) { | |
51 | - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, 1), par3EntityPlayer); | |
52 | - } else { | |
53 | - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 1), par3EntityPlayer); | |
54 | - } | |
54 | + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, ChemiCraftData.XENON), par3EntityPlayer); | |
55 | 55 | } |
56 | 56 | } |
57 | 57 |
@@ -74,7 +74,7 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer | ||
74 | 74 | int uniqueBlockID = par3World.getBlockId(par4, par5 + 1, par6); |
75 | 75 | Block uniqueBlock = Block.blocksList[uniqueBlockID]; |
76 | 76 | |
77 | - if (uniqueBlock instanceof BlockFire){ | |
77 | + if (uniqueBlock instanceof BlockFire) { | |
78 | 78 | par1ItemStack.damageItem(1, par2EntityPlayer); |
79 | 79 | |
80 | 80 | int result1 = probability.getProbability(99, 1); |