From d86194313a0230a97e3d70d3675f175a69b96481 Mon Sep 17 00:00:00 2001 From: mozipi Date: Thu, 3 Jan 2013 21:28:33 +0900 Subject: [PATCH] =?utf8?q?=E6=B0=B4=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97?= =?utf8?q?=E3=81=BE=E3=81=97=E3=81=9F(=E5=8C=96=E5=90=88=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- common/chemicraft/ChemiCraft.java | 10 ++++---- common/chemicraft/compounds/CompoundWater.java | 31 +++++++++++++++++++++++++ resources/chemicraft/items/Compounds.png | Bin 2607 -> 2714 bytes 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 common/chemicraft/compounds/CompoundWater.java diff --git a/common/chemicraft/ChemiCraft.java b/common/chemicraft/ChemiCraft.java index 9239278..2bd896c 100644 --- a/common/chemicraft/ChemiCraft.java +++ b/common/chemicraft/ChemiCraft.java @@ -11,6 +11,7 @@ import chemicraft.block.BlockChemicalCombinationTable; import chemicraft.block.BlockChemicalCraftingTable; import chemicraft.block.BlockDecompositionTable; import chemicraft.block.BlockToolAndWeaponCraftingTable; +import chemicraft.compounds.CompoundWater; import chemicraft.debug.CommandDeleteItem; import chemicraft.debug.CommandGenDebugRoom; import chemicraft.debug.CommandSetTile; @@ -47,7 +48,7 @@ import cpw.mods.fml.common.registry.GameRegistry; */ @Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta") // ID,名前,バージョン -@NetworkMod(clientSideRequired = true, serverSideRequired = false, versionBounds = "1.3.2", channels = "chemicraft", packetHandler = PacketHandler.class) +@NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.3.2", channels = "chemicraft", packetHandler = PacketHandler.class) // クライアント、サーバー共に必要 1.3.2用 public class ChemiCraft { @@ -223,7 +224,6 @@ public class ChemiCraft { setStepSound(Block.soundStoneFootstep). setBlockName("ChemicalCraftingTable"); - // Itemを追加します this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms"); this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds"); @@ -246,7 +246,6 @@ public class ChemiCraft { this.nameAuxiliary.addName(blockChemicalCraftingTable, "ChemicalCraftingTable"); this.nameAuxiliary.addName(blockChemicalCraftingTable, "ja_JP", "素材製作台"); - // Itemの名前を設定します this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME); this.nameAuxiliary.addName(this.itemAtoms, "ja_JP", ATOMSNAMEJP); @@ -303,6 +302,10 @@ public class ChemiCraft { // 化合物を追加します ChemiCraftAPI.getInstance().addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素"); + ChemiCraftAPI.getInstance().addLangCompound("ja_JP", "Water", "水"); + + //化合物のHandlerを設定します + ChemiCraftAPI.getInstance().settingCompoundHandler("Water", new CompoundWater()); //手榴弾の追加 ChemiCraftAPI.getInstance().addMaterialRecipe( @@ -320,7 +323,6 @@ public class ChemiCraft { new ItemStack(this.itemAtomGrenade, 16, 0), new NBTRecipeGrenade() ); - } private void apiProcessing(final FMLPostInitializationEvent event) { diff --git a/common/chemicraft/compounds/CompoundWater.java b/common/chemicraft/compounds/CompoundWater.java new file mode 100644 index 0000000..8987a44 --- /dev/null +++ b/common/chemicraft/compounds/CompoundWater.java @@ -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; + } + +} diff --git a/resources/chemicraft/items/Compounds.png b/resources/chemicraft/items/Compounds.png index 39484a5b43f224e83221966598361d87671b5bbf..efca654d5f16c57a549c61792ed9d34b26a4345d 100644 GIT binary patch delta 1157 zcmV;01bX|g6q*%~BYz5ENklf1n9LM3W?K*8kL}&zxiC7Rrn1Q_mR7}i$ z0gY4`cn2Ms7&=p_eF1qHsaRVH2_Y&WA(r9_sa1=U5Yog9w(;3@g6+mR5sO0pL8TPPyIUh{x(99-GzT zTlRban9Bgz8Crpk9Ge5;wk zm+;D-4*=)Eg@0)`9JPmitFcwAiJ30GWzPqIv#k0W+b);<+LwKN0C4&N@Vw;L{@lk0 z0H+@S0Du4h00aO4AOHY>Ga3NL-Gy(O-(5`8RG} zO_E$%%l*~Q^F?(bFMhp~c9Pt?vz3#c4*+u)02^zY?SGY(l_bfxKVBPqF&(-q-_(n6 zasF3dU(3>J^2`0?oez@6r`dS%Q@;G|`+SlljrIO^#Sjny05CxS^e(%5+#dfpAu#PC z+?#*n=G82%Caou($DjY6?C&Kn_qzXyO0uw+TzM~9T21y^$^Ldf1VjJ;464p@@lQIZ z3mT2a#DC}Ii;MrT<#&^dZ}k7&Zg&>{=A&fiX;Qt=34vO@bGl%f`2aAF0Z{g>bqD4b z_x_uYlIBvf{eI`)i*FTv@#ExhKiTVEBXD8K2MhqC9Cb6G{gPkT!2H&eegrhule9V! z&^zb<=4vMllBAjb4d;E)?evUlgc!I-s}b-+Gc< zTuu&OCg0s2c~5|e=L5i820)UqT;lR*hElOF~PlV1gB7mVj0 XXF0GG5xuOj00000NkvXXu0mjfHMu*w delta 1060 zcmbV~>o?nX0EfT7NaGTUj#1S`j z2S0^7mEh7*;Cj6R4-HKnJ~ojIYZblR-dV>IoIi&HPj#gip49IQ;#CfGe-LF0^qq)7 zC=-{=6ZJbG{5-ZbUKIsC)BEEy^ErXRZCf9sX@`Ao2GCpQI%@ca+8Px#Acv#DtEkl| zcDhomZ>x?ri~byg)KpsPcwxNfk=xxfISB`VXgYugQC`Un@Y06w@~Yzbpisc zghO+)VRsw^k_cTEUJ{4)bA%ZmXW<~Hnx z=52j#>Q=t3^L zzX+!Hi~=Bf)5EefcH1o7ZEbjn?Yo9_vyA1rhA#(-caeziV7)g!Hp2i7)q4OcH}Yln z`9$LlboAtSbUcFm%KAGAL!vf{`4wYMvY2@CW!Q}#TH)@n;;oKGN=9Cskv z2n^k6Q15$%*?7(`LX>lF+FXs0XautPFMP+aq?W%p$g-jNNaGeTyW{!9cIH8dc7{=k zb=eIPaVSgVEO&*ubmE5^Y$|2G8K5n|DwfUpORd?DB= MhJ*#z2GQ>S3*Th}!vFvP -- 2.11.0