OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/chemicraft/chemicraft
authormozipi <mozipi@users.sourceforge.jp>
Thu, 3 Jan 2013 14:17:00 +0000 (23:17 +0900)
committermozipi <mozipi@users.sourceforge.jp>
Thu, 3 Jan 2013 14:17:00 +0000 (23:17 +0900)
Conflicts:
common/chemicraft/ChemiCraft.java

common/chemicraft/ChemiCraft.java
common/chemicraft/container/ContainerChemicalCombinationTable.java
common/chemicraft/tileentity/TileEntityChemicalCombinationTable.java

index fe7ebf5..94ad8f5 100644 (file)
@@ -15,8 +15,6 @@ import chemicraft.compounds.CompoundWater;
 import chemicraft.debug.CommandDeleteItem;\r
 import chemicraft.debug.CommandGenDebugRoom;\r
 import chemicraft.debug.CommandSetTile;\r
-import chemicraft.entity.EntityAtomsGrenade;\r
-import chemicraft.item.ItemAtomGrenade;\r
 import chemicraft.item.ItemAtoms;\r
 import chemicraft.item.ItemAtomsGrenade;\r
 import chemicraft.item.ItemCompounds;\r
@@ -39,7 +37,6 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
 import cpw.mods.fml.common.event.FMLServerStartingEvent;\r
 import cpw.mods.fml.common.network.NetworkMod;\r
 import cpw.mods.fml.common.network.NetworkRegistry;\r
-import cpw.mods.fml.common.registry.EntityRegistry;\r
 import cpw.mods.fml.common.registry.GameRegistry;\r
 \r
 /**\r
@@ -302,15 +299,21 @@ public class ChemiCraft {
                });\r
 \r
                // 化合物を追加します\r
+               api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");\r
+               api.addLangCompound("ja_JP", "Water", "水");
                ChemiCraftAPI.getInstance().addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");\r
                ChemiCraftAPI.getInstance().addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");\r
                ChemiCraftAPI.getInstance().addLangCompound("ja_JP", "Water", "水");\r
+
 \r
                //化合物のHandlerを設定します\r
-               ChemiCraftAPI.getInstance().settingCompoundHandler("Water", new CompoundWater());\r
+               api.settingCompoundHandler("Water", new CompoundWater());\r
+\r
+               //化合物のレシピを追加します\r
+               api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, 1));\r
 \r
                //手榴弾の追加\r
-               ChemiCraftAPI.getInstance().addMaterialRecipe(\r
+               api.addMaterialRecipe(\r
                                new ItemStack[]{\r
                                                null,\r
                                                new ItemStack(Block.stone),\r
@@ -335,12 +338,6 @@ public class ChemiCraft {
        }\r
 \r
        private void debug(final FMLPostInitializationEvent event) {\r
-               //デバッグ処理\r
-               api.addChemicalCombinationRecipe(\r
-                               new String[]{ChemiCraftData.HYDROGEN_SIGN, ChemiCraftData.OXYGEN_SIGN},\r
-                               new Integer[]{2, 1},\r
-                               new ItemStack(Block.dirt)\r
-                               );\r
        }\r
 \r
 }
\ No newline at end of file
index e671966..db89f56 100644 (file)
@@ -102,10 +102,9 @@ public class ContainerChemicalCombinationTable extends Container {
 
        @Override
        public ItemStack slotClick(int par1, int par2, boolean par3, EntityPlayer par4EntityPlayer) {
-               if (par1 == 16) {
+               if (par1 == 15) {
                        if (this.invr.getStackInSlot(0) != null) {
                                this.tileentity.emptytoAtomsList();
-                               return super.slotClick(par1, par2, par3, par4EntityPlayer);
                        }
                }
                return super.slotClick(par1, par2, par3, par4EntityPlayer);
index 8a0ae46..ab84c7c 100644 (file)
@@ -11,6 +11,7 @@ import net.minecraft.src.NBTTagCompound;
 import net.minecraft.src.NBTTagList;
 import net.minecraft.src.Packet;
 import net.minecraft.src.TileEntity;
+import net.minecraft.src.WorldServer;
 import chemicraft.ChemiCraft;
 import chemicraft.ChemiCraftData;
 import chemicraft.inventory.InventoryChemicalCombinationTableMaterial;
@@ -43,6 +44,13 @@ public class TileEntityChemicalCombinationTable extends TileEntity {
                        this.isProvidePower = false;
                        PacketDispatcher.sendPacketToAllPlayers(this.getDescriptionPacket());
                }
+               if (this.worldObj instanceof WorldServer) {
+                       System.out.println(this.atomsList + ":Server");
+                       System.out.println(this.atomsAmountList + ":Server");
+               } else {
+                       System.out.println(this.atomsList + ":Client");
+                       System.out.println(this.atomsAmountList + ":Client");
+               }
        }
 
        @Override
@@ -254,6 +262,7 @@ public class TileEntityChemicalCombinationTable extends TileEntity {
                        this.atomsList.add(par1);
                        this.atomsAmountList.add(par2);
                }
+               PacketDispatcher.sendPacketToAllPlayers(this.getDescriptionPacket());
        }
 
        public void setDropItems(ItemStack par1ItemStack){