X-Git-Url: http://git.sourceforge.jp/view?p=chemicraft%2Fchemicraft.git;a=blobdiff_plain;f=common%2Fchemicraft%2Fitem%2FItemGasCollectingBottle.java;h=49ef396072a10cac7e33857a81588b93cece1f9e;hp=8f07fa61b90600c1ae7ca9a436668007b43c8bbe;hb=337a7d44b682a04e2b9792badb862bdf985ca990;hpb=7449f8bbab4ecac8868895f8fd66f594b870a216 diff --git a/common/chemicraft/item/ItemGasCollectingBottle.java b/common/chemicraft/item/ItemGasCollectingBottle.java index 8f07fa6..49ef396 100644 --- a/common/chemicraft/item/ItemGasCollectingBottle.java +++ b/common/chemicraft/item/ItemGasCollectingBottle.java @@ -71,10 +71,13 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer @Override public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { - int var11 = par3World.getBlockId(par4, par5, par6); - Block block = Block.blocksList[var11]; + int blockID = par3World.getBlockId(par4, par5, par6); + Block block = Block.blocksList[blockID]; - if (block instanceof BlockFire){ + int uniqueBlockID = par3World.getBlockId(par4, par5 + 1, par6); + Block uniqueBlock = Block.blocksList[uniqueBlockID]; + + if (uniqueBlock instanceof BlockFire){ par1ItemStack.damageItem(1, par2EntityPlayer); int result1 = MathHelperPlus.probability(99, 1); @@ -82,7 +85,7 @@ public class ItemGasCollectingBottle extends ItemAtomInfoContainer if (result1 == 0) { this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonDioxide")), par2EntityPlayer); } else { - this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 17), par2EntityPlayer); + this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonMonoxide")), par2EntityPlayer); } return true;