OSDN Git Service

水を追加しました(化合物
authormozipi <mozipi@users.sourceforge.jp>
Thu, 3 Jan 2013 12:28:33 +0000 (21:28 +0900)
committermozipi <mozipi@users.sourceforge.jp>
Thu, 3 Jan 2013 12:28:33 +0000 (21:28 +0900)
common/chemicraft/ChemiCraft.java
common/chemicraft/compounds/CompoundWater.java [new file with mode: 0644]
resources/chemicraft/items/Compounds.png

index 9239278..2bd896c 100644 (file)
@@ -11,6 +11,7 @@ import chemicraft.block.BlockChemicalCombinationTable;
 import chemicraft.block.BlockChemicalCraftingTable;\r
 import chemicraft.block.BlockDecompositionTable;\r
 import chemicraft.block.BlockToolAndWeaponCraftingTable;\r
+import chemicraft.compounds.CompoundWater;\r
 import chemicraft.debug.CommandDeleteItem;\r
 import chemicraft.debug.CommandGenDebugRoom;\r
 import chemicraft.debug.CommandSetTile;\r
@@ -47,7 +48,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
  */\r
 @Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")\r
 // ID,名前,バージョン\r
-@NetworkMod(clientSideRequired = true, serverSideRequired = false, versionBounds = "1.3.2", channels = "chemicraft", packetHandler = PacketHandler.class)\r
+@NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.3.2", channels = "chemicraft", packetHandler = PacketHandler.class)\r
 // クライアント、サーバー共に必要 1.3.2用\r
 public class ChemiCraft {\r
 \r
@@ -223,7 +224,6 @@ public class ChemiCraft {
                                setStepSound(Block.soundStoneFootstep).\r
                                setBlockName("ChemicalCraftingTable");\r
 \r
-\r
                // Itemを追加します\r
                this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");\r
                this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");\r
@@ -246,7 +246,6 @@ public class ChemiCraft {
                this.nameAuxiliary.addName(blockChemicalCraftingTable, "ChemicalCraftingTable");\r
                this.nameAuxiliary.addName(blockChemicalCraftingTable, "ja_JP", "素材製作台");\r
 \r
-\r
                // Itemの名前を設定します\r
                this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME);\r
                this.nameAuxiliary.addName(this.itemAtoms, "ja_JP", ATOMSNAMEJP);\r
@@ -303,6 +302,10 @@ public class ChemiCraft {
 \r
                // 化合物を追加します\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
 \r
                //手榴弾の追加\r
                ChemiCraftAPI.getInstance().addMaterialRecipe(\r
@@ -320,7 +323,6 @@ public class ChemiCraft {
                                new ItemStack(this.itemAtomGrenade, 16, 0),\r
                                new NBTRecipeGrenade()\r
                                );\r
-\r
        }\r
 \r
        private void apiProcessing(final FMLPostInitializationEvent event) {\r
diff --git a/common/chemicraft/compounds/CompoundWater.java b/common/chemicraft/compounds/CompoundWater.java
new file mode 100644 (file)
index 0000000..8987a44
--- /dev/null
@@ -0,0 +1,31 @@
+package chemicraft.compounds;
+
+import net.minecraft.src.Entity;
+import net.minecraft.src.EntityPlayer;
+import net.minecraft.src.ItemStack;
+import net.minecraft.src.World;
+import chemicraft.util.ICompoundHandler;
+
+public class CompoundWater implements ICompoundHandler {
+
+       @Override
+       public ItemStack onItemRightClickHandler(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
+               return null;
+       }
+
+       @Override
+       public boolean onItemUseHandler(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
+               return false;
+       }
+
+       @Override
+       public void onUpdateHandler(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
+
+       }
+
+       @Override
+       public int getIconIndexHandler() {
+               return 1;
+       }
+
+}
index 39484a5..efca654 100644 (file)
Binary files a/resources/chemicraft/items/Compounds.png and b/resources/chemicraft/items/Compounds.png differ