OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
authormozipi <mozipi_2@yahoo.co.jp>
Sun, 21 Apr 2013 08:45:04 +0000 (17:45 +0900)
committermozipi <mozipi_2@yahoo.co.jp>
Sun, 21 Apr 2013 08:45:04 +0000 (17:45 +0900)
common/pcc/chemicraft/base/ChemiCraftRegisterBaseRecipe.java
common/pcc/chemicraft/base/ChemiCraftRegisterItem.java
common/pcc/chemicraft/base/item/ItemOreSerarcher.java
common/pcc/chemicraft/core/ChemiCraftRegisterCoreRecipe.java
common/pcc/chemicraft/core/item/ItemAtoms.java
mcmod.info

index be67f7a..2698554 100644 (file)
@@ -7,7 +7,6 @@ import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
 import net.minecraftforge.oredict.OreDictionary;
 import pcc.chemicraft.ChemiCraftData;
-import pcc.chemicraft.core.ChemiCraftAPI;
 import pcc.chemicraft.core.ChemiCraftCore;
 import pcc.chemicraft.core.nbt.NBTRecipeGrenade;
 import pcc.chemicraft.util.Formula;
@@ -112,7 +111,40 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
                                new NBTRecipeGrenade()
                                );
 
-               ChemiCraftAPI.addMaterialRecipe(
+               this.mod.api.addSharplessMaterialRecipe(
+                               new ItemStack[] {
+                                               new ItemStack(Item.dyePowder, 1, 0),
+                                               new ItemStack(Item.egg),
+                               },
+                               new ItemStack(this.mod.itemBlackSmoke),
+                               null
+                               );
+
+               this.mod.api.addSharplessMaterialRecipe(
+                               new ItemStack[] {
+                                               new ItemStack(Item.gunpowder),
+                                               new ItemStack(Item.egg),
+                               },
+                               new ItemStack(this.mod.itemDust),
+                               null
+                               );
+
+               this.mod.api.addMaterialRecipe(
+                               new ItemStack[] {
+                                               new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Nb")),
+                                               new ItemStack(Item.ingotIron),
+                                               new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Nb")),
+                                               new ItemStack(Item.ingotIron),
+                                               new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Nb")),
+                                               new ItemStack(Item.ingotIron),
+                                               new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("He")),
+                                               new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("Sn")),
+                                               new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, this.mod.chemicalData.toAtoms("He")),
+                               },
+                               new ItemStack(this.mod.itemOreSearcher),
+                               null);
+
+               this.mod.api.addMaterialRecipe(
                                new ItemStack[] {
                                                new ItemStack(Block.stone), new ItemStack(Item.ingotIron), new ItemStack(Block.stone),
                                                new ItemStack(Item.ingotIron), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Item.ingotIron),
@@ -121,7 +153,16 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
                                new ItemStack(this.mod.itemRadiationBallet),
                                null);
 
-               ChemiCraftAPI.addMaterialRecipe(
+               this.mod.api.addMaterialRecipe(
+                               new ItemStack[] {
+                                               new ItemStack(Block.stone), new ItemStack(Item.ingotIron), new ItemStack(Block.stone),
+                                               new ItemStack(Item.ingotIron), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Item.ingotIron),
+                                               new ItemStack(Block.stone), new ItemStack(Item.redstone), new ItemStack(Block.stone)
+                               },
+                               new ItemStack(this.mod.itemRadiationBallet),
+                               null);
+
+               this.mod.api.addMaterialRecipe(
                                new ItemStack[] {
                                                new ItemStack(Block.stone), new ItemStack(ChemiCraftCore.instance.itemAtoms, 1, ChemiCraftData.URANIUM), new ItemStack(Block.stone),
                                                new ItemStack(Item.ingotIron), new ItemStack(Item.redstone), new ItemStack(Item.ingotIron),
@@ -130,7 +171,7 @@ public class ChemiCraftRegisterBaseRecipe extends ChemiCraftBaseRegister {
                                new ItemStack(this.mod.itemRaditionGunDataChip),
                                null);
 
-               ChemiCraftAPI.addMaterialRecipe(
+               this.mod.api.addMaterialRecipe(
                                new ItemStack[]{
                                                new ItemStack(Block.blockSteel), new ItemStack(Block.blockSteel), new ItemStack(this.mod.itemRaditionGunDataChip),
                                                null, null, new ItemStack(Block.stone),
index d460d91..f900572 100644 (file)
@@ -28,7 +28,7 @@ public class ChemiCraftRegisterItem extends ChemiCraftBaseRegister {
                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.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.itemRaditionGunDataChip = new Item(this.mod.raditionGunDataChipID) {
@@ -50,7 +50,7 @@ public class ChemiCraftRegisterItem extends ChemiCraftBaseRegister {
                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.itemRadiationBallet, "ja_JP", "放射線弾");
                this.mod.nameAuxiliary.addName(this.mod.itemRaditionGunDataChip, "RaditionGunDataChip");
                this.mod.nameAuxiliary.addName(this.mod.itemRaditionGunDataChip, "ja_JP", "放射線銃データチップ");
        }
index a809839..f0a928d 100644 (file)
@@ -1,5 +1,6 @@
 package pcc.chemicraft.base.item;
 
+import net.minecraft.block.Block;
 import net.minecraft.client.renderer.texture.IconRegister;
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.item.Item;
@@ -30,10 +31,10 @@ public class ItemOreSerarcher extends Item {
                                if (par3World.isRemote) {
                                        this.changeItem(par2EntityPlayer);
                                }
-                               String blockName = ChemiCraftBase.instance.apiBase.getAtomOresAtomName().get(
-                                               (Math.abs(ChemiCraftBase.instance.atomOresID[ChemiCraftBase.instance.atomOresID.length-1] -
-                                                               (par3World.getBlockId(par4, par5, par6) + 3))) * 16 +
-                                                               par3World.getBlockMetadata(par4, par5, par6));
+                               String blockName = new ItemStack(
+                                               Block.blocksList[par3World.getBlockId(par4, par5, par6)],
+                                               1,
+                                               par3World.getBlockMetadata(par4, par5, par6)).getDisplayName();
                                par1ItemStack.getTagCompound().setString("OreName", blockName);
                        }
                }
@@ -50,11 +51,12 @@ public class ItemOreSerarcher extends Item {
                return par1ItemStack;
        }
 
+       @Override
        public String getItemDisplayName(ItemStack par1ItemStack) {
                if (par1ItemStack.getTagCompound() != null) {
-                       return "OreSearcher:" + par1ItemStack.getTagCompound().getString("OreName");
+                       return super.getItemDisplayName(par1ItemStack) + ":" + par1ItemStack.getTagCompound().getString("OreName");
                }
-               return "OreSearcher";
+               return super.getItemDisplayName(par1ItemStack);
        }
 
        @Override
index c373378..238e1b8 100644 (file)
@@ -45,11 +45,11 @@ public class ChemiCraftRegisterCoreRecipe extends ChemiCraftCoreRegister {
 
                GameRegistry.addRecipe(new ItemStack(this.mod.blockChemicalCombinationTable),
                                new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
-                       Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(Block.obsidian),
+                       "XYX", "ZAZ", "XYX",
+                       Character.valueOf('X'), new ItemStack(Item.ingotGold),
+                       Character.valueOf('Y'), new ItemStack(Item.ingotIron),
+                       Character.valueOf('Z'), new ItemStack(this.mod.itemAtoms, 1, this.mod.chemicalData.toAtoms("U")),
+                       Character.valueOf('A'), new ItemStack(Block.hopperBlock),
                });
 
                /*
@@ -65,11 +65,11 @@ public class ChemiCraftRegisterCoreRecipe extends ChemiCraftCoreRegister {
 
                GameRegistry.addRecipe(new ItemStack(this.mod.blockChemicalCraftingTable),
                                new Object[]{
-                       "XYX", "ZAZ", "ZZZ",
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),
+                       "XXX", "ZAZ", "ZZZ",
+                       Character.valueOf('X'), new ItemStack(this.mod.itemGasCollectingBottle),
+                       Character.valueOf('Y'), new ItemStack(Item.dyePowder, 1, 4),
                        Character.valueOf('Z'), new ItemStack(Block.stone),
-                       Character.valueOf('A'), new ItemStack(this.mod.itemAtoms, 1, 0),
+                       Character.valueOf('A'), new ItemStack(Block.workbench),
                });
 
                GameRegistry.addRecipe(new ItemStack(this.mod.itemChemicalCells),
index 6ac63e8..80eb6e2 100644 (file)
@@ -50,8 +50,10 @@ public class ItemAtoms extends Item {
                                                        1,
                                                        par1ItemStack.getItemDamage());
                                        itemstack.setItemDamage(AtomInfo.collapseUraniumSeries(itemstack.getItemDamage() + 1) - 1);
+                                       if (--par1ItemStack.stackSize <= 0) {
+                                               player.inventory.clearInventory(par1ItemStack.itemID, par1ItemStack.getItemDamage());
+                                       }
                                        player.inventory.addItemStackToInventory(itemstack);
-                                       player.inventory.consumeInventoryItem(par1ItemStack.itemID);
                                }
                        }
                }
index 6ad001b..5013d03 100644 (file)
@@ -1,11 +1,11 @@
 [
 {
-       "modid": "ChemiCraft|Core",
+       "modid": "ChemiCraftCore",
        "name": "ChemiCraft",
        "description": "",
        "version": "",
        "credits": "",
-       "authors": ["Ponkotate", "inaka", "ProjectChemiCraft"],
+       "authors": ["Ponkotate", "Mozipi", "Inaka", "ProjectChemiCraft"],
        "logoFile": "/chemicraft_logo.png",
        "url": "http://chemicraft.sourceforge.jp/",
        "updateUrl": "",
        ]
 }
 {
-       "modid": "ChemiCraft|Base",
+       "modid": "ChemiCraftBase",
        "name": "ChemiCraftBase",
        "description": "",
        "version": "",
        "credits": "",
-       "authors": ["Ponkotate", "inaka", "ProjectChemiCraft"],
+       "authors": ["Ponkotate", "Mozipi", "Inaka", "ProjectChemiCraft"],
        "logoFile": "/chemicraft_logo.png",
        "url": "http://chemicraft.sourceforge.jp/",
        "updateUrl": "",
@@ -32,7 +32,7 @@
        ]
 }
 {
-       "modid": "ChemiCraft|Crops",
+       "modid": "ChemiCraftCrops",
        "name": "ChemicalCrops(ChemiCraft-Addon)",
        "description": "",
        "version": "",