OSDN Git Service

Merge branch 'master' of https://scm.sourceforge.jp/gitroot/chemicraft/chemicraft
authorponkotate <ponkotate@users.sourceforge.jp>
Sun, 3 Feb 2013 14:21:09 +0000 (23:21 +0900)
committerponkotate <ponkotate@users.sourceforge.jp>
Sun, 3 Feb 2013 14:21:09 +0000 (23:21 +0900)
Conflicts:
common/chemicraft/block/BlockElectrolysisTable.java
common/chemicraft/container/ContainerElectrolysis.java

33 files changed:
common/chemicraft/ChemiCraft.java
common/chemicraft/block/BlockChemicalCombinationTable.java
common/chemicraft/block/BlockChemicalCraftingTable.java
common/chemicraft/block/BlockElectrolysisTable.java [new file with mode: 0644]
common/chemicraft/block/BlockPyrolysisTable.java
common/chemicraft/block/BlockToolAndWeaponCraftingTable.java
common/chemicraft/container/ContainerChemicalCombinationTable.java
common/chemicraft/container/ContainerElectrolysis.java [moved from common/chemicraft/container/ContainerElectrolysisTable.java with 81% similarity]
common/chemicraft/debug/CommandSetTile.java
common/chemicraft/debug/DebugTick.java
common/chemicraft/debug/SetBlockSupport.java
common/chemicraft/gui/GuiChemicalCombinationTable.java
common/chemicraft/gui/GuiChemicalCraftingTable.java
common/chemicraft/gui/GuiElectrolysisTable.java
common/chemicraft/gui/GuiPyrolysisTable.java
common/chemicraft/gui/GuiToolAndWeaponCraftingTable.java
common/chemicraft/inventory/InventoryPyrolysisTableMaterial.java
common/chemicraft/inventory/InventoryPyrolysisTableResult.java
common/chemicraft/item/ItemAtomInfoContainer.java
common/chemicraft/item/ItemAtoms.java
common/chemicraft/item/ItemCompounds.java
common/chemicraft/item/ItemGasCollectingBottle.java
common/chemicraft/render/RenderAtomsGrenade.java
common/chemicraft/slot/SlotPyrolysisTableMaterial.java
common/chemicraft/slot/SlotPyrolysisTableResult.java
common/chemicraft/system/CommonProxy.java
common/chemicraft/system/PacketHandler.java
common/chemicraft/tileentity/TileEntityChemicalCombinationTable.java
common/chemicraft/tileentity/TileEntityPyrolysisTable.java
common/chemicraft/util/AtomInfo.java
common/chemicraft/util/Auxiliary.java
common/chemicraft/util/ICompoundHandler.java
src/chemicraft/client/ClientProxy.java

index 231b97f..8c8db7d 100644 (file)
-package chemicraft;\r
-\r
-import net.minecraft.block.Block;\r
-import net.minecraft.block.material.Material;\r
-import net.minecraft.creativetab.CreativeTabs;\r
-import net.minecraft.item.Item;\r
-import net.minecraft.item.ItemStack;\r
-import net.minecraftforge.common.Configuration;\r
-import net.minecraftforge.common.Property;\r
-import chemicraft.block.BlockChemicalCombinationTable;\r
-import chemicraft.block.BlockChemicalCraftingTable;\r
-import chemicraft.block.BlockPyrolysisTable;\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
-import chemicraft.item.ItemAtoms;\r
-import chemicraft.item.ItemAtomsGrenade;\r
-import chemicraft.item.ItemCompounds;\r
-import chemicraft.item.ItemGasCollectingBottle;\r
-import chemicraft.system.CommonProxy;\r
-import chemicraft.system.PacketHandler;\r
-import chemicraft.tileentity.TileEntityChemicalCombinationTable;\r
-import chemicraft.tileentity.TileEntityChemicalCraftingTable;\r
-import chemicraft.tileentity.TileEntityPyrolysisTable;\r
-import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;\r
-import chemicraft.util.Auxiliary;\r
-import chemicraft.util.Auxiliary.ArrayAuxiliary;\r
-import chemicraft.util.Auxiliary.NameAuxiliary;\r
-import chemicraft.util.CreativeTabAtoms;\r
-import chemicraft.util.NBTRecipeGrenade;\r
-import cpw.mods.fml.common.Mod;\r
-import cpw.mods.fml.common.SidedProxy;\r
-import cpw.mods.fml.common.event.FMLPostInitializationEvent;\r
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;\r
-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.GameRegistry;\r
-\r
-/**\r
- * ChemiCraft本体\r
- * @author P.C.C.\r
- *\r
- */\r
-@Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")\r
-@NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraft", packetHandler = PacketHandler.class)\r
-public class ChemiCraft {\r
-\r
-       public static final String[] ATOMSNAME = {\r
-               "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon",\r
-               "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium",\r
-               "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttorium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium",\r
-               "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium",\r
-               "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum",\r
-               "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium",\r
-               "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium",\r
-               "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Ununquadium", "Ununpentium", "Ununhexium", "Ununseptium", "Ununoctium" };\r
-\r
-       public static final String[] ATOMSNAMEJP = {\r
-               "水素", "ヘリウム", "リチウム", "ベリウム", "ホウ素", "炭素", "窒素", "酸素", "フッ素", "ネオン", "ナトリウム", "マグネシウム", "アルミニウム", "ケイ素", "リン", "硫黄", "塩素", "アルゴン", "カリウム", "カルシウム", "スカンジウム",\r
-               "チタン", "バナジウム", "クロム", "マンガン", "鉄", "コバルト", "ニッケル", "銅", "亜鉛", "ガリウム", "ゲルマニウム", "ヒ素", "セレン", "臭素", "クリプトン", "ルビジウム", "ストロンチウム", "イットリウム", "ジルコニウム", "ニオブ", "モリブデン", "テクネチウム", "ルテニウム",\r
-               "ロジウム", "パラジウム", "銀", "カドミウム", "インジウム", "スズ", "アンチモン", "テルル", "ヨウ素", "キセノン", "セシウム", "バリウム", "ランタン", "セリウム", "プラセオジム", "ネオジム", "プロメチウム", "サマリウム", "ユウロビウム", "ガドリニウム", "テルビウム", "ジスプロニウム",\r
-               "ホルミウム", "エルビウム", "ツリウム", "イッテルビウム", "ルテチウム", "ハフニウム", "タンタル", "タングステン", "レニウム", "オスミウム", "イリジウム", "白金", "金", "水銀", "タリウム", "鉛", "ビスマス", "ポロニウム", "アスタチン", "ラドン", "フランシウム", "ラジウム",\r
-               "アクチニウム", "トリウム", "プロトアクチウム", "ウラン", "ネプツニウム", "プルトニウム", "アメリシウム", "キュリウム", "バークリウム", "カルホルニウム", "アインスタイニウム", "フェルミウム", "メンデレビウム", "ノーベリウム", "ローレンシウム", "ラサホージウム", "ドブニウム", "シーボーギウム",\r
-               "ボーリウム", "ハッシウム", "マイトネリウム", "ダームスタチウム", "レントゲニウム", "コペルニシウム", "ウンウントリウム", "ウンウンクアジウム", "ウンウンペンチウム", "ウンウンヘキシウム", "ウンウンセプチウム", "ウンウンオクチウム" };\r
-\r
-       /**\r
-        * このmodのインスタンス\r
-        */\r
-       @Mod.Instance("chemiCraft")\r
-       public static ChemiCraft instance;\r
-\r
-       /**\r
-        * ChemiCraftのProxy.\r
-        */\r
-       @SidedProxy(clientSide = "chemicraft.client.ClientProxy", serverSide = "chemicraft.system.CommonProxy")\r
-       public static CommonProxy proxy;\r
-\r
-       /**\r
-        * ChemiCraftのCreativeTab.\r
-        */\r
-       public static final CreativeTabs creativeTab = new CreativeTabAtoms("ChemiCraft");\r
-\r
-       /**\r
-        * ItemID.\r
-        */\r
-       public int atomsID;\r
-       public int compoundsID;\r
-       public int gasCollectingBottleID;\r
-       public int atomGrenadeID;\r
-\r
-       /**\r
-        * BlockID.\r
-        */\r
-       public int pyrolysisTableID;\r
-       public int chemicalConbinationTableID;\r
-       public int toolAndWeaponCraftingTableID;\r
-       public int chemicalCraftingTableID;\r
-\r
-       /**\r
-        * GUIID.\r
-        */\r
-       public int guiPyrolysisTableID;\r
-       public int guiChemicalCombinationTableID;\r
-       public int guiToolAndWeaponCraftingTableID;\r
-       public int guiChemicalCraftingTableID;\r
-\r
-       /**\r
-        * Block型変数.\r
-        */\r
-       public Block blockPyrolysisTable;\r
-       public Block blockChemicalCombinationTable;\r
-       public Block blockToolAndWeaponCraftingTable;\r
-       public Block blockChemicalCraftingTable;\r
-\r
-       /**\r
-        * Item型変数.\r
-        */\r
-       public Item itemAtoms;\r
-       public Item itemCompounds;\r
-       public Item itemGasCollectingBottle;\r
-       public Item itemAtomGrenade;\r
-\r
-       /**\r
-        * このmodで使用するTextureのパス.\r
-        */\r
-       public String itemAtomsTexture = "/chemicraft/items/Atoms.png";\r
-       public String itemCompoundsTexture = "/chemicraft/items/Compounds.png";\r
-       public String itemTexture = "/chemicraft/items/items.png";\r
-       public String blockChemicalCraftingTableTexture = "/chemicraft/blocks/cctable.png";\r
-       public String guiPyrolysisTexture = "/chemicraft/guis/Pyrolysis.png";\r
-       public String guiChemicalCombinationTexture = "/chemicraft/guis/ChemicalCombination.png";\r
-       public String guiToolAndWeaponCraftingTexture = "/chemicraft/guis/ToolAndWeaponCrafting.png";\r
-       public String guiChemicalCraftingTexture = "/chemicraft/guis/MaterialCrafting.png";\r
-\r
-       /**\r
-        * このmodに必要な補助クラスのインスタンス.\r
-        */\r
-       public Auxiliary auxiliary = new Auxiliary();\r
-       public NameAuxiliary nameAuxiliary = new NameAuxiliary();\r
-       public ArrayAuxiliary arrayAuxiliary = new ArrayAuxiliary();\r
-\r
-       private ChemiCraftAPI api = ChemiCraftAPI.getInstance();\r
-       private ChemiCraftData chemicalData = new ChemiCraftData();\r
-\r
-       @Mod.PreInit\r
-       public void chemiPreLoadMethod(final FMLPreInitializationEvent event) {\r
-               Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());\r
-               cfg.load();\r
-\r
-               Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);\r
-               Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2401);\r
-               Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2402);\r
-               Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2403);\r
-\r
-               Property atomsIDProp = cfg.getItem("AtomsID", 25000);\r
-               Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);\r
-               Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);\r
-               Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);\r
-\r
-               Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);\r
-               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1001);\r
-               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1002);\r
-               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1003);\r
-\r
-\r
-               this.pyrolysisTableID = pyrolysisTableIDProp.getInt();\r
-               this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();\r
-               this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();\r
-               this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();\r
-               this.atomsID = atomsIDProp.getInt();\r
-               this.compoundsID = compoundsIDProp.getInt();\r
-               this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();\r
-               this.atomGrenadeID = atomGrenadeIDProp.getInt();\r
-               this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();\r
-               this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();\r
-               this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();\r
-               this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();\r
-\r
-               cfg.save();\r
-       }\r
-\r
-       @Mod.ServerStarting\r
-       public void serverStarting(final FMLServerStartingEvent event) {\r
-               event.registerServerCommand(new CommandSetTile());\r
-               event.registerServerCommand(new CommandDeleteItem());\r
-               event.registerServerCommand(new CommandGenDebugRoom());\r
-       }\r
-\r
-       @Mod.PostInit\r
-       public void chemiPostLoadMethod(final FMLPostInitializationEvent event) {\r
-               this.settingProcessing(event);\r
-               this.apiProcessing(event);\r
-               this.debug(event);\r
-       }\r
-\r
-       private void settingProcessing(final FMLPostInitializationEvent event) {\r
-\r
-               // Blockを追加します\r
-               this.blockPyrolysisTable = new BlockPyrolysisTable(this.pyrolysisTableID, 0, Material.ground).\r
-                               setHardness(2.0F).\r
-                               setResistance(0.0F).\r
-                               setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("PyrolysisTable");\r
-               this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 0, Material.ground).\r
-                               setHardness(2.0F).\r
-                               setResistance(0.0F).\r
-                               setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("ChemicalCombinationTable");\r
-               this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 0, Material.ground).\r
-                               setHardness(2.0F).\r
-                               setResistance(0.0F).\r
-                               setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("ToolAndWeaponCraftingTable");\r
-               this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(chemicalCraftingTableID, 0, Material.ground).\r
-                               setHardness(2.0F).\r
-                               setResistance(0.0F).\r
-                               setStepSound(Block.soundStoneFootstep).\r
-                               setBlockName("ChemicalCraftingTable");\r
-\r
-               // Itemを追加します\r
-               this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");\r
-               this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");\r
-               this.itemGasCollectingBottle = new ItemGasCollectingBottle(this.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);\r
-               this.itemAtomGrenade = new ItemAtomsGrenade(this.atomGrenadeID).setItemName("grenade").setIconIndex(1);\r
-\r
-               // BlockをMinecraftに登録します\r
-               GameRegistry.registerBlock(this.blockPyrolysisTable, "BlockPyrolysisTable");\r
-               GameRegistry.registerBlock(this.blockChemicalCombinationTable, "BlockChemicalCombinationTable");\r
-               GameRegistry.registerBlock(this.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");\r
-               GameRegistry.registerBlock(this.blockChemicalCraftingTable, "BlockMaterialCraftingTable");\r
-\r
-               // Blockの名前を設定します\r
-               this.nameAuxiliary.addName(this.blockPyrolysisTable, "PyrolysisTable");\r
-               this.nameAuxiliary.addName(this.blockPyrolysisTable, "ja_JP", "熱分解台");\r
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");\r
-               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");\r
-               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");\r
-               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");\r
-               this.nameAuxiliary.addName(blockChemicalCraftingTable, "ChemicalCraftingTable");\r
-               this.nameAuxiliary.addName(blockChemicalCraftingTable, "ja_JP", "素材製作台");\r
-\r
-               // Itemの名前を設定します\r
-               this.nameAuxiliary.addName(this.itemAtoms, ATOMSNAME);\r
-               this.nameAuxiliary.addName(this.itemAtoms, "ja_JP", ATOMSNAMEJP);\r
-               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "GasCollectingBottle");\r
-               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "ja_JP", "集気瓶");\r
-               this.nameAuxiliary.addName(this.itemAtomGrenade, "AtomGrenade");\r
-               this.nameAuxiliary.addName(this.itemAtomGrenade, "元素手榴弾");\r
-\r
-               // TileEntityを追加します\r
-               GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");\r
-               GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");\r
-               GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");\r
-               GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");\r
-\r
-               // GUIを追加します\r
-               NetworkRegistry.instance().registerGuiHandler(instance, proxy);\r
-\r
-               // 描画関係の読み込み\r
-               proxy.registerRenderInformation();\r
-\r
-               //化学作業台類のレシピを追加します\r
-               GameRegistry.addRecipe(new ItemStack(this.blockPyrolysisTable),\r
-                               new Object[]{\r
-                       "XYX", "ZAZ", "ZZZ",\r
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),\r
-                       Character.valueOf('Z'), new ItemStack(Block.stone),\r
-                       Character.valueOf('A'), new ItemStack(Item.bucketLava),\r
-               });\r
-               GameRegistry.addRecipe(new ItemStack(this.blockChemicalCombinationTable),\r
-                               new Object[]{\r
-                       "XYX", "ZAZ", "ZZZ",\r
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),\r
-                       Character.valueOf('Z'), new ItemStack(Block.stone),\r
-                       Character.valueOf('A'), new ItemStack(Block.obsidian),\r
-               });\r
-               GameRegistry.addRecipe(new ItemStack(this.blockToolAndWeaponCraftingTable),\r
-                               new Object[]{\r
-                       "XYX", "ZAZ", "ZZZ",\r
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),\r
-                       Character.valueOf('Z'), new ItemStack(Block.stone),\r
-                       Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),\r
-               });\r
-               GameRegistry.addRecipe(new ItemStack(this.blockChemicalCraftingTable),\r
-                               new Object[]{\r
-                       "XYX", "ZAZ", "ZZZ",\r
-                       Character.valueOf('X'), new ItemStack(Item.ingotIron),\r
-                       Character.valueOf('Y'), new ItemStack(Block.workbench),\r
-                       Character.valueOf('Z'), new ItemStack(Block.stone),\r
-                       Character.valueOf('A'), new ItemStack(this.itemAtoms, 1, 0),\r
-               });\r
-\r
-               // 化合物を追加します\r
-               api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");\r
-               api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");\r
-               api.addLangCompound("ja_JP", "Water", "水");\r
-               api.addCompound("Test");\r
-
-\r
-               //化合物のHandlerを設定します\r
-               api.settingCompoundHandler("Water", new CompoundWater());\r
-\r
-               //化合物のレシピを追加します\r
-               api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("Water")));\r
-\r
-               //手榴弾の追加\r
-               api.addMaterialRecipe(\r
-                               new ItemStack[]{\r
-                                               null,\r
-                                               new ItemStack(Block.stone),\r
-                                               null,\r
-                                               new ItemStack(Block.stone),\r
-                                               new ItemStack(Item.gunpowder),\r
-                                               new ItemStack(Block.stone),\r
-                                               null,\r
-                                               new ItemStack(Block.stone),\r
-                                               null\r
-                               },\r
-                               new ItemStack(this.itemAtomGrenade, 16, 0),\r
-                               new NBTRecipeGrenade()\r
-                               );\r
-               //Tickingの追加\r
-               this.proxy.registerTickHandler();\r
-       }\r
-\r
-       private void apiProcessing(final FMLPostInitializationEvent event) {\r
-               // API用の処理\r
-               this.nameAuxiliary.addName(itemCompounds, api.getInstance().getCompoundsName().toArray());\r
-               for (int i = 0; i < api.getCompoundsLang().size(); i++) {\r
-                       this.nameAuxiliary.addName(itemCompounds, api.getCompoundsLang().get(i), api.getInstance().getCompoundsLangName().toArray());\r
-               }\r
-       }\r
-\r
-       private void debug(final FMLPostInitializationEvent event) {\r
-       }\r
-\r
-}\r
+package chemicraft;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.BiomeManager;
+import net.minecraftforge.common.Configuration;
+import net.minecraftforge.common.DimensionManager;
+import net.minecraftforge.common.Property;
+import chemicraft.block.BlockChemicalCombinationTable;
+import chemicraft.block.BlockChemicalCraftingTable;
+import chemicraft.block.BlockElectrolysisTable;
+import chemicraft.block.BlockPyrolysisTable;
+import chemicraft.block.BlockToolAndWeaponCraftingTable;
+import chemicraft.compounds.CompoundWater;
+import chemicraft.debug.CommandDeleteItem;
+import chemicraft.debug.CommandGenDebugRoom;
+import chemicraft.debug.CommandSetTile;
+import chemicraft.item.ItemAtoms;
+import chemicraft.item.ItemAtomsGrenade;
+import chemicraft.item.ItemCompounds;
+import chemicraft.item.ItemGasCollectingBottle;
+import chemicraft.system.CommonProxy;
+import chemicraft.system.PacketHandler;
+import chemicraft.tileentity.TileEntityChemicalCombinationTable;
+import chemicraft.tileentity.TileEntityChemicalCraftingTable;
+import chemicraft.tileentity.TileEntityElectrolysisTable;
+import chemicraft.tileentity.TileEntityPyrolysisTable;
+import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
+import chemicraft.util.Auxiliary;
+import chemicraft.util.Auxiliary.ArrayAuxiliary;
+import chemicraft.util.Auxiliary.NameAuxiliary;
+import chemicraft.util.CreativeTabAtoms;
+import chemicraft.util.NBTRecipeGrenade;
+import chemicraft.util.WorldProviderChemical;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkMod;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+/**
+ * ChemiCraft本体
+ * @author P.C.C.
+ *
+ */
+@Mod(modid = "chemiCraft", name = "ChemiCraft", version = "beta")
+@NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraft", packetHandler = PacketHandler.class)
+public class ChemiCraft {
+
+       public static final String[] ATOMSNAME = {
+               "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminium", "Silicon",
+               "Phosphorus", "Sulfur", "Chlorine", "Argon", "Potassium", "Calcium", "Scandium", "Titanium", "Vanadium", "Chromium", "Manganese", "Iron", "Cobalt", "Nickel", "Copper", "Zinc", "Gallium",
+               "Germanium", "Arsenic", "Selenium", "Bromine", "Krypton", "Rubidium", "Strontium", "Yttorium", "Zirconium", "Niobium", "Molybdenum", "Technetium", "Ruthenium", "Rhodium", "Palladium",
+               "Silver", "Cadmium", "Indium", "Tin", "Antimony", "Tellurium", "Iodine", "Xenon", "Caesium", "Barium", "Lanthanum", "Cerium", "Praseodymium", "Neodymium", "Promethium", "Samarium",
+               "Europium", "Gadolinium", "Terbium", "Dysprosium", "Holmium", "Erbium", "Thulium", "Ytterbium", "Lutetium", "Hafnium", "Tantalum", "Tungsten", "Rhenium", "Osmium", "Iridium", "Platinum",
+               "Gold", "Mercury", "Thallium", "Lead", "Bismuth", "Polonium", "Astatine", "Radon", "Francium", "Radium", "Actinium", "Thorium", "Protactinium", "Uranium", "Neptunium", "Plutonium",
+               "Americium", "Curium", "Berkelium", "Californium", "Einsteinium", "Fermium", "Mendelevium", "Nobelium", "Lawrencium", "Rutherfordium", "Dubnium", "Seaborgium", "Bohrium", "Hassium",
+               "Meitnerium", "Darmstadtium", "Roentgenium", "Copernicium", "Ununtrium", "Ununquadium", "Ununpentium", "Ununhexium", "Ununseptium", "Ununoctium" };
+
+       public static final String[] ATOMSNAMEJP = {
+               "水素", "ヘリウム", "リチウム", "ベリウム", "ホウ素", "炭素", "窒素", "酸素", "フッ素", "ネオン", "ナトリウム", "マグネシウム", "アルミニウム", "ケイ素", "リン", "硫黄", "塩素", "アルゴン", "カリウム", "カルシウム", "スカンジウム",
+               "チタン", "バナジウム", "クロム", "マンガン", "鉄", "コバルト", "ニッケル", "銅", "亜鉛", "ガリウム", "ゲルマニウム", "ヒ素", "セレン", "臭素", "クリプトン", "ルビジウム", "ストロンチウム", "イットリウム", "ジルコニウム", "ニオブ", "モリブデン", "テクネチウム", "ルテニウム",
+               "ロジウム", "パラジウム", "銀", "カドミウム", "インジウム", "スズ", "アンチモン", "テルル", "ヨウ素", "キセノン", "セシウム", "バリウム", "ランタン", "セリウム", "プラセオジム", "ネオジム", "プロメチウム", "サマリウム", "ユウロビウム", "ガドリニウム", "テルビウム", "ジスプロニウム",
+               "ホルミウム", "エルビウム", "ツリウム", "イッテルビウム", "ルテチウム", "ハフニウム", "タンタル", "タングステン", "レニウム", "オスミウム", "イリジウム", "白金", "金", "水銀", "タリウム", "鉛", "ビスマス", "ポロニウム", "アスタチン", "ラドン", "フランシウム", "ラジウム",
+               "アクチニウム", "トリウム", "プロトアクチウム", "ウラン", "ネプツニウム", "プルトニウム", "アメリシウム", "キュリウム", "バークリウム", "カルホルニウム", "アインスタイニウム", "フェルミウム", "メンデレビウム", "ノーベリウム", "ローレンシウム", "ラサホージウム", "ドブニウム", "シーボーギウム",
+               "ボーリウム", "ハッシウム", "マイトネリウム", "ダームスタチウム", "レントゲニウム", "コペルニシウム", "ウンウントリウム", "ウンウンクアジウム", "ウンウンペンチウム", "ウンウンヘキシウム", "ウンウンセプチウム", "ウンウンオクチウム" };
+
+       /**
+        * このmodのインスタンス
+        */
+       @Mod.Instance("chemiCraft")
+       public static ChemiCraft instance;
+
+       /**
+        * ChemiCraftのProxy.
+        */
+       @SidedProxy(clientSide = "chemicraft.client.ClientProxy", serverSide = "chemicraft.system.CommonProxy")
+       public static CommonProxy proxy;
+
+       /**
+        * ChemiCraftのCreativeTab.
+        */
+       public static final CreativeTabs creativeTab = new CreativeTabAtoms("ChemiCraft");
+
+       /**
+        * ItemID.
+        */
+       public int atomsID;
+       public int compoundsID;
+       public int gasCollectingBottleID;
+       public int atomGrenadeID;
+
+       /**
+        * BlockID.
+        */
+       public int pyrolysisTableID;
+       public int electrolysisTableID;
+       public int chemicalConbinationTableID;
+       public int toolAndWeaponCraftingTableID;
+       public int chemicalCraftingTableID;
+
+       /**
+        * GUIID.
+        */
+       public int guiPyrolysisTableID;
+       public int guiElectrolysisTableID;
+       public int guiChemicalCombinationTableID;
+       public int guiToolAndWeaponCraftingTableID;
+       public int guiChemicalCraftingTableID;
+
+       /**
+        * Block型変数.
+        */
+       public Block blockPyrolysisTable;
+       public Block blockElectrolysisTable;
+       public Block blockChemicalCombinationTable;
+       public Block blockToolAndWeaponCraftingTable;
+       public Block blockChemicalCraftingTable;
+
+       /**
+        * Item型変数.
+        */
+       public Item itemAtoms;
+       public Item itemCompounds;
+       public Item itemGasCollectingBottle;
+       public Item itemAtomGrenade;
+
+       /**
+        * このmodで使用するTextureのパス.
+        */
+       public final String ITEMATOMSTEXTURE = "/chemicraft/items/Atoms.png";
+       public final String ITEMCOMPOUNDSTEXTURE = "/chemicraft/items/Compounds.png";
+       public final String ITEMTEXTURE = "/chemicraft/items/items.png";
+       public final String BLOCKCHEMICALCRAFTINGTABLETEXTURE = "/chemicraft/blocks/cctable.png";
+       public final String GUIPYROLYSISTEXTURE = "/chemicraft/guis/Pyrolysis.png";
+       public final String GUIELECTROLYSISTEXTURE = "/chemicraft/guis/Electrolysis.png";
+       public final String GUICHEMICALCOMBINATIONTEXTURE = "/chemicraft/guis/ChemicalCombination.png";
+       public final String GUITOOLANDWEAPONCRAFTINGTEXTURE = "/chemicraft/guis/ToolAndWeaponCrafting.png";
+       public final String GUICHEMICALCRAFTINGTEXTURE = "/chemicraft/guis/MaterialCrafting.png";
+
+       /**
+        * このmodに必要な補助クラスのインスタンス.
+        */
+       public Auxiliary auxiliary = new Auxiliary();
+       public NameAuxiliary nameAuxiliary = new NameAuxiliary();
+       public ArrayAuxiliary arrayAuxiliary = new ArrayAuxiliary();
+
+       private ChemiCraftAPI api = ChemiCraftAPI.getInstance();
+       private ChemiCraftData chemicalData = new ChemiCraftData();
+
+       @Mod.PreInit
+       public void chemiPreLoadMethod(final FMLPreInitializationEvent event) {
+               Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
+               cfg.load();
+
+               Property pyrolysisTableIDProp = cfg.getBlock("PyrolysisTable", 2400);
+               Property electrolysisTableIDProp = cfg.getBlock("ElectrolysisTable", 2401);
+               Property chemicalCombinationTableIDProp = cfg.getBlock("ChemicalCombinationID", 2402);
+               Property toolAndWeaponCraftingTableIDProp = cfg.getBlock("ToolAndWeaponCraftingTableID", 2403);
+               Property chemicalCraftingTableIDProp = cfg.getBlock("ChemicalCraftingTableID", 2404);
+
+               Property atomsIDProp = cfg.getItem("AtomsID", 25000);
+               Property compoundsIDProp = cfg.getItem("CompoundsID", 25001);
+               Property gasCollectingBottleIDProp = cfg.getItem("gasCollectingBottleID", 25002);
+               Property atomGrenadeIDProp = cfg.getItem("AtomGrenadeID", 25003);
+
+               Property guiPyrolysisTableIDProp = cfg.get("GUI", "GUIPyrolysisID", 1000);
+               Property guiChemicalCombinationTableIDProp = cfg.get("GUI", "GUIChemicalCombinationTableID", 1001);
+               Property guiToolAndWeaponCraftingTableIDProp = cfg.get("GUI", "GUIToolAndWeaponCraftingTableID", 1002);
+               Property guiChemicalCraftingTableIDProp = cfg.get("GUI", "GUIChemicalCraftingTableID", 1003);
+
+
+               this.pyrolysisTableID = pyrolysisTableIDProp.getInt();
+               this.electrolysisTableID = electrolysisTableIDProp.getInt();
+               this.chemicalConbinationTableID = chemicalCombinationTableIDProp.getInt();
+               this.toolAndWeaponCraftingTableID = toolAndWeaponCraftingTableIDProp.getInt();
+               this.chemicalCraftingTableID = chemicalCraftingTableIDProp.getInt();
+               this.atomsID = atomsIDProp.getInt();
+               this.compoundsID = compoundsIDProp.getInt();
+               this.gasCollectingBottleID = gasCollectingBottleIDProp.getInt();
+               this.atomGrenadeID = atomGrenadeIDProp.getInt();
+               this.guiPyrolysisTableID = guiPyrolysisTableIDProp.getInt();
+               this.guiChemicalCombinationTableID = guiChemicalCombinationTableIDProp.getInt();
+               this.guiToolAndWeaponCraftingTableID = guiToolAndWeaponCraftingTableIDProp.getInt();
+               this.guiChemicalCraftingTableID = guiChemicalCraftingTableIDProp.getInt();
+
+               cfg.save();
+       }
+
+       @Mod.ServerStarting
+       public void serverStarting(final FMLServerStartingEvent event) {
+               event.registerServerCommand(new CommandSetTile());
+               event.registerServerCommand(new CommandDeleteItem());
+               event.registerServerCommand(new CommandGenDebugRoom());
+       }
+
+       @Mod.PostInit
+       public void chemiPostLoadMethod(final FMLPostInitializationEvent event) {
+               this.settingProcessing(event);
+               this.apiProcessing(event);
+               this.debug(event);
+       }
+
+       private void settingProcessing(final FMLPostInitializationEvent event) {
+
+               // Blockを追加します
+               this.blockPyrolysisTable = new BlockPyrolysisTable(this.pyrolysisTableID, 0, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("PyrolysisTable");
+               this.blockElectrolysisTable = new BlockElectrolysisTable(this.electrolysisTableID, 0, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ElectrolysisTable");
+               this.blockChemicalCombinationTable = new BlockChemicalCombinationTable(this.chemicalConbinationTableID, 0, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ChemicalCombinationTable");
+               this.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.toolAndWeaponCraftingTableID, 0, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ToolAndWeaponCraftingTable");
+               this.blockChemicalCraftingTable = new BlockChemicalCraftingTable(chemicalCraftingTableID, 0, Material.ground).
+                               setHardness(2.0F).
+                               setResistance(0.0F).
+                               setStepSound(Block.soundStoneFootstep).
+                               setBlockName("ChemicalCraftingTable");
+
+               // Itemを追加します
+               this.itemAtoms = new ItemAtoms(this.atomsID).setItemName("atoms");
+               this.itemCompounds = new ItemCompounds(this.compoundsID).setItemName("compounds");
+               this.itemGasCollectingBottle = new ItemGasCollectingBottle(this.gasCollectingBottleID).setItemName("gasCollectingBottle").setIconIndex(0);
+               this.itemAtomGrenade = new ItemAtomsGrenade(this.atomGrenadeID).setItemName("grenade").setIconIndex(1);
+
+               // BlockをMinecraftに登録します
+               GameRegistry.registerBlock(this.blockPyrolysisTable, "BlockPyrolysisTable");
+               GameRegistry.registerBlock(this.blockElectrolysisTable, "ElectrolysisTable");
+               GameRegistry.registerBlock(this.blockChemicalCombinationTable, "BlockChemicalCombinationTable");
+               GameRegistry.registerBlock(this.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
+               GameRegistry.registerBlock(this.blockChemicalCraftingTable, "BlockMaterialCraftingTable");
+
+               // Blockの名前を設定します
+               this.nameAuxiliary.addName(this.blockPyrolysisTable, "PyrolysisTable");
+               this.nameAuxiliary.addName(this.blockPyrolysisTable, "ja_JP", "熱分解台");
+               this.nameAuxiliary.addName(this.blockElectrolysisTable, "ElectrolysisTable");
+               this.nameAuxiliary.addName(this.blockElectrolysisTable, "ja_JP", "電気分解台");
+               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ChemicalCombinationTable");
+               this.nameAuxiliary.addName(this.blockChemicalCombinationTable, "ja_JP", "化合台");
+               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
+               this.nameAuxiliary.addName(blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
+               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);
+               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "GasCollectingBottle");
+               this.nameAuxiliary.addName(this.itemGasCollectingBottle, "ja_JP", "集気瓶");
+               this.nameAuxiliary.addName(this.itemAtomGrenade, "AtomGrenade");
+               this.nameAuxiliary.addName(this.itemAtomGrenade, "元素手榴弾");
+
+               // TileEntityを追加します
+               GameRegistry.registerTileEntity(TileEntityPyrolysisTable.class, "TileEntityPyrolysisTable");
+               GameRegistry.registerTileEntity(TileEntityElectrolysisTable.class, "TileEntityElectrolysisTable");
+               GameRegistry.registerTileEntity(TileEntityChemicalCombinationTable.class, "TileEntityChemicalCombinationTable");
+               GameRegistry.registerTileEntity(TileEntityToolAndWeaponCraftingTable.class, "TileEntityToolAndWeaponCraftingTable");
+               GameRegistry.registerTileEntity(TileEntityChemicalCraftingTable.class, "TileEntityChemicalCraftingTable");
+
+               // GUIを追加します
+               NetworkRegistry.instance().registerGuiHandler(instance, proxy);
+
+               // 描画関係の読み込み
+               proxy.registerRenderInformation();
+
+               //化学作業台類のレシピを追加します
+               GameRegistry.addRecipe(new ItemStack(this.blockElectrolysisTable),
+                               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.tnt),
+               });
+               GameRegistry.addRecipe(new ItemStack(this.blockPyrolysisTable),
+                               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(Item.bucketLava),
+               });
+               GameRegistry.addRecipe(new ItemStack(this.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),
+               });
+               GameRegistry.addRecipe(new ItemStack(this.blockToolAndWeaponCraftingTable),
+                               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(Item.pickaxeSteel),
+               });
+               GameRegistry.addRecipe(new ItemStack(this.blockChemicalCraftingTable),
+                               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(this.itemAtoms, 1, 0),
+               });
+
+               // 化合物を追加します
+               api.addLangCompound("ja_JP", "CarbonMonoxide", "一酸化炭素");
+               api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");
+               api.addLangCompound("ja_JP", "Water", "水");
+               api.addCompound("Test");
+
+
+               //化合物のHandlerを設定します
+               api.settingCompoundHandler("Water", new CompoundWater());
+
+               //化合物のレシピを追加します
+               api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, api.getCompound("Water")));
+
+               //手榴弾の追加
+               api.addMaterialRecipe(
+                               new ItemStack[]{
+                                               null,
+                                               new ItemStack(Block.stone),
+                                               null,
+                                               new ItemStack(Block.stone),
+                                               new ItemStack(Item.gunpowder),
+                                               new ItemStack(Block.stone),
+                                               null,
+                                               new ItemStack(Block.stone),
+                                               null
+                               },
+                               new ItemStack(this.itemAtomGrenade, 16, 0),
+                               new NBTRecipeGrenade()
+                               );
+               //Tickingの追加
+               this.proxy.registerTickHandler();
+       }
+
+       private void apiProcessing(final FMLPostInitializationEvent event) {
+               // API用の処理
+               this.nameAuxiliary.addName(itemCompounds, api.getInstance().getCompoundsName().toArray());
+               for (int i = 0; i < api.getCompoundsLang().size(); i++) {
+                       this.nameAuxiliary.addName(itemCompounds, api.getCompoundsLang().get(i), api.getInstance().getCompoundsLangName().toArray());
+               }
+       }
+
+       private void debug(final FMLPostInitializationEvent event) {
+       }
+
+}
index 4562eda..bf9ba58 100644 (file)
@@ -25,7 +25,7 @@ public class BlockChemicalCombinationTable extends BlockContainer {
 
        @Override
        public String getTextureFile() {
-               return ChemiCraft.instance.blockChemicalCraftingTableTexture;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
index 7bf1578..cc30be2 100644 (file)
@@ -26,7 +26,7 @@ public class BlockChemicalCraftingTable extends BlockContainer {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.blockChemicalCraftingTableTexture;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
diff --git a/common/chemicraft/block/BlockElectrolysisTable.java b/common/chemicraft/block/BlockElectrolysisTable.java
new file mode 100644 (file)
index 0000000..e4ef985
--- /dev/null
@@ -0,0 +1,36 @@
+package chemicraft.block;
+
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import chemicraft.ChemiCraft;
+import chemicraft.tileentity.TileEntityElectrolysisTable;
+
+public class BlockElectrolysisTable extends BlockContainer
+{
+
+       public BlockElectrolysisTable(int par1, int par2, Material par3Material) {
+               super(par1, par2, par3Material);
+               this.setCreativeTab(ChemiCraft.creativeTab);
+       }
+
+       @Override
+       public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){
+               par5EntityPlayer.openGui(ChemiCraft.instance, ChemiCraft.instance.guiElectrolysisTableID, par1World, par2, par3, par4);
+               return true;
+       }
+
+       @Override
+       public String getTextureFile(){
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
+       }
+
+       @Override
+       public TileEntity createNewTileEntity(World var1)
+       {
+               return new TileEntityElectrolysisTable();
+       }
+
+}
index 728545f..2030eea 100644 (file)
@@ -26,7 +26,7 @@ public class BlockPyrolysisTable extends BlockContainer {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.blockChemicalCraftingTableTexture;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
index 463d2da..f375a01 100644 (file)
@@ -25,7 +25,7 @@ public class BlockToolAndWeaponCraftingTable extends BlockContainer {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.blockChemicalCraftingTableTexture;
+               return ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE;
        }
 
 
index 26ebd93..2244348 100644 (file)
@@ -1,5 +1,6 @@
 package chemicraft.container;
 
+import net.minecraft.block.Block;
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.inventory.Container;
 import net.minecraft.inventory.IInventory;
@@ -12,7 +12,7 @@ import chemicraft.slot.SlotElectrolysisMaterial;
 import chemicraft.slot.SlotElectrolysisResult;
 import chemicraft.tileentity.TileEntityElectrolysisTable;
 
-public class ContainerElectrolysisTable extends Container
+public class ContainerElectrolysis extends Container
 {
 
        private World worldObj;
@@ -27,7 +27,7 @@ public class ContainerElectrolysisTable extends Container
        private InventoryElectrolysisResult invr;
        private InventoryElectrolysisFuel invf;
 
-       public ContainerElectrolysisTable(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
+       public ContainerElectrolysis(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
                super();
                this.worldObj = par2.worldObj;
                this.posX = par2.xCoord;
@@ -62,8 +62,7 @@ public class ContainerElectrolysisTable extends Container
        @Override
        public boolean canInteractWith(EntityPlayer par1EntityPlayer)
        {
-               return true;
-               //return this.worldObj.getBlockId(this.posX, this.posY, this.posZ) != ChemiCraft.instance.electrolysisTableID ? false : par1EntityPlayer.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
+               return this.worldObj.getBlockId(this.posX, this.posY, this.posZ) != ChemiCraft.instance.electrolysisTableID ? false : par1EntityPlayer.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
        }
 
 }
index d7b4bfa..6f649fa 100644 (file)
@@ -1,45 +1,45 @@
-package chemicraft.debug;\r
-\r
-import net.minecraft.block.Block;\r
-import net.minecraft.command.CommandBase;\r
-import net.minecraft.command.ICommandSender;\r
-import net.minecraft.entity.player.EntityPlayer;\r
-import net.minecraft.world.World;\r
-\r
-public class CommandSetTile extends CommandBase {\r
-\r
-       @Override\r
-       public String getCommandName() {\r
-               return "setTile";\r
-       }\r
-\r
-       @Override\r
-       public void processCommand(ICommandSender var1, String[] var2) {\r
-               try{\r
-                       EntityPlayer player = (EntityPlayer)var1;\r
-                       World wolrd = player.worldObj;\r
-                       if(var2.length > 0){\r
-                               try{\r
-                                       if(Integer.parseInt(var2[0]) < 4096 && Block.blocksList[Integer.parseInt(var2[0])] != null || Integer.parseInt(var2[0]) == 0){\r
-                                               if(var2.length == 1){\r
-                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), 12, 12);\r
-                                               }else if(var2.length > 2){\r
-                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), Integer.parseInt(var2[2]), Integer.parseInt(var2[2]));\r
-                                               }else{\r
-                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), 0, 12, 12);\r
-                                               }\r
-                                       }else{\r
-                                               var1.sendChatToPlayer("\u00a7cBlockが存在しないか指定された数が4096を超えています。");\r
-                                       }\r
-                               }catch(NumberFormatException e){\r
-                                       var1.sendChatToPlayer("\u00a7c指定された文字は数値ではありません。");\r
-                               }\r
-                       }else{\r
-                               var1.sendChatToPlayer("\u00a7cBlockIDを指定してください。(Metadata, Sizeも可能)");\r
-                       }\r
-               }catch(ClassCastException e){\r
-\r
-               }\r
-       }\r
-\r
-}\r
+package chemicraft.debug;
+
+import net.minecraft.block.Block;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+public class CommandSetTile extends CommandBase {
+
+       @Override
+       public String getCommandName() {
+               return "setTile";
+       }
+
+       @Override
+       public void processCommand(ICommandSender var1, String[] var2) {
+               try{
+                       EntityPlayer player = (EntityPlayer)var1;
+                       World wolrd = player.worldObj;
+                       if(var2.length > 0){
+                               try{
+                                       if(Integer.parseInt(var2[0]) < 4096 && Block.blocksList[Integer.parseInt(var2[0])] != null || Integer.parseInt(var2[0]) == 0){
+                                               if(var2.length == 1){
+                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), 12, 12);
+                                               }else if(var2.length > 2){
+                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), Integer.parseInt(var2[1]), Integer.parseInt(var2[2]), Integer.parseInt(var2[2]));
+                                               }else{
+                                                       SetBlockSupport.square(wolrd, (int)player.posX, (int)player.posY, (int)player.posZ, Integer.parseInt(var2[0]), 0, 12, 12);
+                                               }
+                                       }else{
+                                               var1.sendChatToPlayer("\u00a7cBlockが存在しないか指定された数が4096を超えています。");
+                                       }
+                               }catch(NumberFormatException e){
+                                       var1.sendChatToPlayer("\u00a7c指定された文字は数値ではありません。");
+                               }
+                       }else{
+                               var1.sendChatToPlayer("\u00a7cBlockIDを指定してください。(Metadata, Sizeも可能)");
+                       }
+               }catch(ClassCastException e){
+
+               }
+       }
+
+}
index 1e1edde..e168e75 100644 (file)
@@ -1,9 +1,11 @@
 package chemicraft.debug;
 
+import java.awt.BasicStroke;
 import java.awt.Color;
 import java.awt.Font;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
+import java.awt.RenderingHints;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Iterator;
index d9aded8..2663d5d 100644 (file)
-package chemicraft.debug;\r
-import java.util.Random;\r
-\r
-import net.minecraft.world.World;\r
-\r
-public class SetBlockSupport\r
-{\r
-\r
-       static Random rand = new Random();\r
-\r
-       /**\r
-        * X方向に線状にBlockを配置します。\r
-        * Directionが0の場合、特殊な計算式で\r
-        * +,-方向:loop-1の長さになります。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param Length 長さ\r
-        * @param Direction 方向(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @return Object\r
-        */\r
-       public static Object lineX(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int Direction)\r
-       {\r
-               int loop2=0;\r
-               Object DataBox=null;\r
-               for(loop2=0;loop2 < Length;loop2++)\r
-               {\r
-                       switch(Direction)\r
-                       {\r
-                       default:\r
-\r
-                       case -1:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y, Z, Block, meta);\r
-                               break;\r
-                       case 0:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X-(Length-1)+loop2,Y,Z,Block,meta);\r
-                               break;\r
-                       case 1:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X+loop2, Y, Z, Block,meta);\r
-                               break;\r
-                       }\r
-               }\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * Y方向に線状にBlockを配置します。\r
-        * Directionが0の場合、特殊な計算式で\r
-        * +,-方向:loop-1の長さになります。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param Length 長さ\r
-        * @param Direction 方向(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @return Object\r
-        */\r
-       public static Object lineY(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int Direction)\r
-       {\r
-               int loop2=0;\r
-               Object DataBox=null;\r
-               for(loop2=0;loop2 < Length;loop2++)\r
-               {\r
-                       switch(Direction)\r
-                       {\r
-                       default:\r
-\r
-                       case -1:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y-loop2, Z, Block,meta);\r
-                               break;\r
-                       case 0:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X,Y-(Length-1)+loop2,Z,Block,meta);\r
-                               break;\r
-                       case 1:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y+loop2, Z, Block,meta);\r
-                               break;\r
-                       }\r
-               }\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * Z方向に線状にBlockを配置します。\r
-        * Directionが0の場合、特殊な計算式で\r
-        * +,-方向:loop-1の長さになります。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param Length 長さ\r
-        * @param Direction 方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @return Object\r
-        */\r
-       public static Object lineZ(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int Direction)\r
-       {\r
-               int loop2=0;\r
-               Object DataBox=null;\r
-               for(loop2=0;loop2 < Length;loop2++)\r
-               {\r
-                       switch(Direction)\r
-                       {\r
-                       default:\r
-\r
-                       case -1:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y, Z-loop2, Block,meta);\r
-                               break;\r
-                       case 0:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X,Y,Z-(Length-1)+loop2,Block,meta);\r
-                               break;\r
-                       case 1:\r
-                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y, Z+loop2, Block,meta);\r
-                               break;\r
-                       }\r
-               }\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * XY方向に線状にBlockを配置します。\r
-        * Directionが0の場合、特殊な計算式で\r
-        * +,-方向:loop-1の長さになります。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param XLength X方向の長さ\r
-        * @param YLength Y方向の長さ\r
-        * @param XDirection X方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @param YDirection Y方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @return Object\r
-        */\r
-       public static Object  lineXY(World par1World,int X,int Y,int Z,int Block,int meta,int XLength,int YLength,int XDirection,int YDirection)\r
-       {\r
-               Object DataBox=null;\r
-               DataBox = lineX(par1World,X,Y,Z,Block,meta,XLength,XDirection);\r
-               DataBox = lineY(par1World,X,Y,Z,Block,YLength,meta,YDirection);\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * XZ方向に線状にBlockを配置します。\r
-        * Directionが0の場合、特殊な計算式で\r
-        * +,-方向:loop-1の長さになります。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param XLength X方向の長さ\r
-        * @param ZLength Y方向の長さ\r
-        * @param XDirection X方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @param ZDirection Z方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @return Object\r
-        */\r
-       public static Object  lineXZ(World par1World,int X,int Y,int Z,int Block,int meta,int XLength,int ZLength,int XDirection,int ZDirection)\r
-       {\r
-               Object DataBox=null;\r
-               DataBox = lineX(par1World,X,Y,Z,Block,meta,XLength,XDirection);\r
-               DataBox = lineZ(par1World,X,Y,Z,Block,meta,ZLength,ZDirection);\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * YZ方向に線状にBlockを配置します。\r
-        * Directionが0の場合、特殊な計算式で\r
-        * +,-方向:loop-1の長さになります。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param YLength X方向の長さ\r
-        * @param ZLength Y方向の長さ\r
-        * @param YDirection Y方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @param ZDirection Z方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @return Object\r
-        */\r
-       public static Object  lineYZ(World par1World,int X,int Y,int Z,int Block,int meta,int YLength,int ZLength,int YDirection,int ZDirection)\r
-       {\r
-               Object DataBox=null;\r
-               DataBox = lineY(par1World,X,Y,Z,Block,meta,YLength,YDirection);\r
-               DataBox = lineZ(par1World,X,Y,Z,Block,meta,ZLength,ZDirection);\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * XYZ方向に線状にBlockを配置します。\r
-        * Directionが0の場合、特殊な計算式で\r
-        * +,-方向:loop-1の長さになります。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param XLength X方向の長さ\r
-        * @param YLength Y方向の長さ\r
-        * @param ZLength Z方向の長さ\r
-        * @param XDirection X方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @param YDirection Y方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @param ZDirection Z方向指定(+方向:1,-方向:-1,中心から-+の方向:0)\r
-        * @return Object\r
-        */\r
-       public static Object  lineXYZ(World par1World,int X,int Y,int Z,int Block,int meta,int XLength,int YLength,int ZLength,int XDirection,int YDirection,int ZDirection)\r
-       {\r
-               Object DataBox=null;\r
-               DataBox = lineX(par1World,X,Y,Z,Block,meta,XLength,XDirection);\r
-               DataBox = lineY(par1World,X,Y,Z,Block,meta,YLength,YDirection);\r
-               DataBox = lineZ(par1World,X,Y,Z,Block,meta,ZLength,ZDirection);\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * X方向の壁を作成します。\r
-        * Directionは1で固定です。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param Length 幅\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object wallX(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int height)\r
-       {\r
-               Object DataBox = null;\r
-               for(int loop = 0;loop < Length;loop++){\r
-                       lineY(par1World, X - (Length/2) + loop, Y, Z, Block,meta, height, 1);\r
-               }\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * Z方向の壁を作成します。\r
-        * Directionは1で固定です。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param Length 幅\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object wallZ(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int height)\r
-       {\r
-               Object DataBox = null;\r
-               for(int loop = 0;loop < Length;loop++){\r
-                       lineY(par1World, X, Y, Z - (Length/2) + loop, Block,meta, height, 1);\r
-               }\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * 辺だけの四角を作成します。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param LengthX X方向の長さ\r
-        * @param LengthZ  Z方向の長さ\r
-        * @return Object\r
-        */\r
-       public static Object spuareFrame(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ)\r
-       {\r
-               Object DataBox = null;\r
-               DataBox = lineX(par1World, X, Y, Z + (LengthZ/2), Block,meta, LengthX/2+1, 0);\r
-               DataBox = lineX(par1World, X, Y, Z - (LengthZ/2), Block,meta, LengthX/2+1, 0);\r
-               DataBox = lineZ(par1World, X + (LengthX/2), Y, Z, Block,meta, LengthZ/2+1, 0);\r
-               DataBox = lineZ(par1World, X - (LengthX/2), Y, Z, Block,meta, LengthZ/2+1, 0);\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * 辺だけの箱を作成します。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param LengthX X方向の長さ\r
-        * @param LengthZ  Z方向の長さ\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object boxFrame(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ,int height)\r
-       {\r
-               Object DataBox=null;\r
-               DataBox = lineX(par1World, X, Y, Z + (LengthZ/2), Block,meta, LengthX/2, 0);\r
-               DataBox = lineX(par1World, X, Y, Z - (LengthZ/2), Block,meta, LengthX/2, 0);\r
-               DataBox = lineX(par1World, X, Y + height-1, Z + (LengthZ/2), Block,meta, LengthX/2, 0);\r
-               DataBox = lineX(par1World, X, Y + height-1, Z - (LengthZ/2), Block,meta, LengthX/2, 0);\r
-\r
-               DataBox = lineY(par1World,X +(LengthX/2),Y,Z +(LengthZ/2),Block,meta,height,1);\r
-               DataBox = lineY(par1World,X -(LengthX/2),Y,Z +(LengthZ/2),Block,meta,height,1);\r
-               DataBox = lineY(par1World,X +(LengthX/2),Y,Z - (LengthZ/2),Block,meta,height,1);\r
-               DataBox = lineY(par1World,X -(LengthX/2),Y,Z - (LengthZ/2),Block,meta,height,1);\r
-\r
-               DataBox = lineZ(par1World, X + (LengthX/2), Y, Z, Block,meta, LengthZ/2, 0);\r
-               DataBox = lineZ(par1World, X - (LengthX/2), Y, Z, Block,meta, LengthZ/2, 0);\r
-               DataBox = lineZ(par1World, X + (LengthX/2), Y + height-1, Z, Block,meta, LengthZ/2, 0);\r
-               DataBox = lineZ(par1World, X - (LengthX/2), Y + height-1, Z, Block,meta, LengthZ/2, 0);\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * 四角を作成します。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param LengthX X方向の長さ\r
-        * @param LengthZ  Z方向の長さ\r
-        * @return Object\r
-        */\r
-       public static Object square(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ)\r
-       {\r
-               Object DataBox = null;\r
-               int loop1 = 0;\r
-               for(loop1=0; loop1 < LengthZ; loop1++){\r
-                       DataBox = lineX(par1World,X - (LengthX/2),Y,Z - (LengthZ/2) + loop1,Block,meta,LengthX,1);\r
-               }\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * 箱を生成します。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param LengthX X方向の長さ\r
-        * @param LengthZ  Z方向の長さ\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object box(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ,int height)\r
-       {\r
-               Object DataBox = null;\r
-               DataBox = square(par1World, X, Y, Z, Block, meta,LengthX,LengthZ);\r
-               DataBox = square(par1World,X,Y+height,Z,Block,meta,LengthX,LengthZ);\r
-               DataBox = wallX(par1World,X,Y,Z-(LengthZ/2),Block,meta,LengthX,height);\r
-               DataBox = wallZ(par1World,X-(LengthX/2),Y,Z,Block,meta,LengthZ,height);\r
-               DataBox = wallX(par1World,X,Y,Z+(LengthZ/2),Block,meta,LengthX,height);\r
-               DataBox = wallZ(par1World,X+(LengthX/2),Y,Z,Block,meta,LengthZ,height);\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * Blockで埋め尽くされた箱を生成します。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param LengthX X方向の長さ\r
-        * @param LengthZ  Z方向の長さ\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object fillBox(World par1World , int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ,int height)\r
-       {\r
-               Object DataBox = null;\r
-               DataBox = square(par1World, X, Y, Z, Block,meta, LengthX,LengthZ);\r
-               DataBox = square(par1World,X,Y+height,Z,Block,meta,LengthX,LengthZ);\r
-               DataBox = wallX(par1World,X,Y,Z-(LengthZ/2),Block,meta,LengthX,height);\r
-               DataBox = wallZ(par1World,X-(LengthX/2),Y,Z,Block,meta,LengthZ,height);\r
-               DataBox = wallX(par1World,X,Y,Z+(LengthZ/2),Block,meta,LengthX,height);\r
-               DataBox = wallZ(par1World,X+(LengthX/2),Y,Z,Block,meta,LengthZ,height);\r
-\r
-               for(int i = 0; i < LengthX - 1; i++)\r
-               {\r
-                       DataBox = wallZ(par1World,X + 1 - LengthX / 2 + i, Y , Z , Block ,meta,LengthZ, height);\r
-               }\r
-\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * 座標ごとにデータを指定して配置します。\r
-        * 配列になっているので、順番に指定してください。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param XPosition 配置する相対X座標\r
-        * @param YPosition 配置する相対Y座標\r
-        * @param ZPosition 配置する相対Z座標\r
-        * @param Option\r
-        * @return Object\r
-        */\r
-       public static Object fineSetBlock(World par1World,int X,int Y,int Z,int[] Block,int[] meta,int[] XPosition,int[] YPosition,int[] ZPosition,Object[] Option){\r
-               Object DataBox = null;\r
-               for(int i=0;i<Block.length;i++){\r
-                       DataBox = par1World.setBlockAndMetadata(X+XPosition[i], Y+YPosition[i], Z+ZPosition[i], Block[i],meta[i]);\r
-               }\r
-\r
-               if(Option!=null){\r
-                       for(int j=0;j<Option.length;j++){\r
-                               DataBox = Option[j];\r
-                       }\r
-               }\r
-               return DataBox;\r
-       }\r
-\r
-       /**\r
-        * X方向に台形を作成します。\r
-        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param upperSide 上辺の長さ\r
-        * @param bottomSide 下辺の長さ\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object trapezoidX(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){\r
-               Object dataBox = null;\r
-               int Rate=0;\r
-               int Math=0;\r
-               int XRate=0;\r
-               int YRate = 0;\r
-               for(int i=0;i<height;i++){\r
-                       YRate++;\r
-                       Math++;\r
-                       XRate++;\r
-                       if(upperSide < bottomSide){\r
-                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){\r
-                                       Rate++;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       if(bottomSide < upperSide){\r
-                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){\r
-                                       Rate--;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       dataBox=lineZ(par1World, X+XRate-1, Y+YRate, Z, Block, meta, upperSide+Rate, 0);\r
-               }\r
-               return dataBox;\r
-       }\r
-\r
-       /**\r
-        * Y方向のXラインに台形を作成します。\r
-        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param upperSide 上辺の長さ\r
-        * @param bottomSide 下辺の長さ\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object trapezoidY_X(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){\r
-               Object dataBox = null;\r
-               int Rate=0;\r
-               int Math=0;\r
-               int YRate = 0;\r
-               for(int i=0;i<height;i++){\r
-                       YRate++;\r
-                       Math++;\r
-                       if(upperSide < bottomSide){\r
-                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){\r
-                                       Rate++;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       if(bottomSide < upperSide){\r
-                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){\r
-                                       Rate--;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       dataBox=lineZ(par1World, X, Y+YRate, Z, Block, meta, upperSide+Rate, 0);\r
-               }\r
-               return dataBox;\r
-       }\r
-\r
-       /**\r
-        * Y方向のZラインに台形を作成します。\r
-        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param upperSide 上辺の長さ\r
-        * @param bottomSide 下辺の長さ\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object trapezoidY_Z(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){\r
-               Object dataBox = null;\r
-               int Rate=0;\r
-               int Math=0;\r
-               int YRate = 0;\r
-               for(int i=0;i<height;i++){\r
-                       YRate++;\r
-                       Math++;\r
-                       if(upperSide < bottomSide){\r
-                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){\r
-                                       Rate++;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       if(bottomSide < upperSide){\r
-                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){\r
-                                       Rate--;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       dataBox=lineX(par1World, X, Y+YRate, Z, Block, meta, upperSide+Rate, 0);\r
-               }\r
-               return dataBox;\r
-       }\r
-\r
-       /**\r
-        * Z方向に台形を作成します。\r
-        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。\r
-        * @param par1World\r
-        * @param X 基準X座標\r
-        * @param Y 基準Y座標\r
-        * @param Z 基準Z座標\r
-        * @param Block 配置するBlock\r
-        * @param meta 配置するMetadata\r
-        * @param upperSide 上辺の長さ\r
-        * @param bottomSide 下辺の長さ\r
-        * @param height 高さ\r
-        * @return Object\r
-        */\r
-       public static Object TrapezoidZ(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){\r
-               Object dataBox = null;\r
-               int Rate=0;\r
-               int Math=0;\r
-               int ZRate=0;\r
-               for(int i=0;i<height;i++){\r
-                       Math++;\r
-                       ZRate++;\r
-                       if(upperSide < bottomSide){\r
-                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){\r
-                                       Rate++;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       if(bottomSide < upperSide){\r
-                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){\r
-                                       Rate--;\r
-                                       Math=0;\r
-                               }\r
-                       }\r
-\r
-                       dataBox=lineX(par1World, X, Y, Z+ZRate, Block, meta, upperSide+Rate, 0);\r
-               }\r
-               return dataBox;\r
-       }\r
-\r
+package chemicraft.debug;
+import java.util.Random;
+
+import net.minecraft.world.World;
+
+public class SetBlockSupport
+{
+
+       static Random rand = new Random();
+
+       /**
+        * X方向に線状にBlockを配置します。
+        * Directionが0の場合、特殊な計算式で
+        * +,-方向:loop-1の長さになります。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param Length 長さ
+        * @param Direction 方向(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @return Object
+        */
+       public static Object lineX(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int Direction)
+       {
+               int loop2=0;
+               Object DataBox=null;
+               for(loop2=0;loop2 < Length;loop2++)
+               {
+                       switch(Direction)
+                       {
+                       default:
+
+                       case -1:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y, Z, Block, meta);
+                               break;
+                       case 0:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X-(Length-1)+loop2,Y,Z,Block,meta);
+                               break;
+                       case 1:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X+loop2, Y, Z, Block,meta);
+                               break;
+                       }
+               }
+               return DataBox;
+       }
+
+       /**
+        * Y方向に線状にBlockを配置します。
+        * Directionが0の場合、特殊な計算式で
+        * +,-方向:loop-1の長さになります。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param Length 長さ
+        * @param Direction 方向(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @return Object
+        */
+       public static Object lineY(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int Direction)
+       {
+               int loop2=0;
+               Object DataBox=null;
+               for(loop2=0;loop2 < Length;loop2++)
+               {
+                       switch(Direction)
+                       {
+                       default:
+
+                       case -1:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y-loop2, Z, Block,meta);
+                               break;
+                       case 0:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X,Y-(Length-1)+loop2,Z,Block,meta);
+                               break;
+                       case 1:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y+loop2, Z, Block,meta);
+                               break;
+                       }
+               }
+               return DataBox;
+       }
+
+       /**
+        * Z方向に線状にBlockを配置します。
+        * Directionが0の場合、特殊な計算式で
+        * +,-方向:loop-1の長さになります。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param Length 長さ
+        * @param Direction 方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @return Object
+        */
+       public static Object lineZ(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int Direction)
+       {
+               int loop2=0;
+               Object DataBox=null;
+               for(loop2=0;loop2 < Length;loop2++)
+               {
+                       switch(Direction)
+                       {
+                       default:
+
+                       case -1:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y, Z-loop2, Block,meta);
+                               break;
+                       case 0:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X,Y,Z-(Length-1)+loop2,Block,meta);
+                               break;
+                       case 1:
+                               DataBox = par1World.setBlockAndMetadataWithNotify(X, Y, Z+loop2, Block,meta);
+                               break;
+                       }
+               }
+               return DataBox;
+       }
+
+       /**
+        * XY方向に線状にBlockを配置します。
+        * Directionが0の場合、特殊な計算式で
+        * +,-方向:loop-1の長さになります。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param XLength X方向の長さ
+        * @param YLength Y方向の長さ
+        * @param XDirection X方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @param YDirection Y方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @return Object
+        */
+       public static Object  lineXY(World par1World,int X,int Y,int Z,int Block,int meta,int XLength,int YLength,int XDirection,int YDirection)
+       {
+               Object DataBox=null;
+               DataBox = lineX(par1World,X,Y,Z,Block,meta,XLength,XDirection);
+               DataBox = lineY(par1World,X,Y,Z,Block,YLength,meta,YDirection);
+               return DataBox;
+       }
+
+       /**
+        * XZ方向に線状にBlockを配置します。
+        * Directionが0の場合、特殊な計算式で
+        * +,-方向:loop-1の長さになります。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param XLength X方向の長さ
+        * @param ZLength Y方向の長さ
+        * @param XDirection X方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @param ZDirection Z方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @return Object
+        */
+       public static Object  lineXZ(World par1World,int X,int Y,int Z,int Block,int meta,int XLength,int ZLength,int XDirection,int ZDirection)
+       {
+               Object DataBox=null;
+               DataBox = lineX(par1World,X,Y,Z,Block,meta,XLength,XDirection);
+               DataBox = lineZ(par1World,X,Y,Z,Block,meta,ZLength,ZDirection);
+               return DataBox;
+       }
+
+       /**
+        * YZ方向に線状にBlockを配置します。
+        * Directionが0の場合、特殊な計算式で
+        * +,-方向:loop-1の長さになります。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param YLength X方向の長さ
+        * @param ZLength Y方向の長さ
+        * @param YDirection Y方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @param ZDirection Z方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @return Object
+        */
+       public static Object  lineYZ(World par1World,int X,int Y,int Z,int Block,int meta,int YLength,int ZLength,int YDirection,int ZDirection)
+       {
+               Object DataBox=null;
+               DataBox = lineY(par1World,X,Y,Z,Block,meta,YLength,YDirection);
+               DataBox = lineZ(par1World,X,Y,Z,Block,meta,ZLength,ZDirection);
+               return DataBox;
+       }
+
+       /**
+        * XYZ方向に線状にBlockを配置します。
+        * Directionが0の場合、特殊な計算式で
+        * +,-方向:loop-1の長さになります。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param XLength X方向の長さ
+        * @param YLength Y方向の長さ
+        * @param ZLength Z方向の長さ
+        * @param XDirection X方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @param YDirection Y方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @param ZDirection Z方向指定(+方向:1,-方向:-1,中心から-+の方向:0)
+        * @return Object
+        */
+       public static Object  lineXYZ(World par1World,int X,int Y,int Z,int Block,int meta,int XLength,int YLength,int ZLength,int XDirection,int YDirection,int ZDirection)
+       {
+               Object DataBox=null;
+               DataBox = lineX(par1World,X,Y,Z,Block,meta,XLength,XDirection);
+               DataBox = lineY(par1World,X,Y,Z,Block,meta,YLength,YDirection);
+               DataBox = lineZ(par1World,X,Y,Z,Block,meta,ZLength,ZDirection);
+               return DataBox;
+       }
+
+       /**
+        * X方向の壁を作成します。
+        * Directionは1で固定です。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param Length 幅
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object wallX(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int height)
+       {
+               Object DataBox = null;
+               for(int loop = 0;loop < Length;loop++){
+                       lineY(par1World, X - (Length/2) + loop, Y, Z, Block,meta, height, 1);
+               }
+               return DataBox;
+       }
+
+       /**
+        * Z方向の壁を作成します。
+        * Directionは1で固定です。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param Length 幅
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object wallZ(World par1World,int X,int Y,int Z,int Block,int meta,int Length,int height)
+       {
+               Object DataBox = null;
+               for(int loop = 0;loop < Length;loop++){
+                       lineY(par1World, X, Y, Z - (Length/2) + loop, Block,meta, height, 1);
+               }
+               return DataBox;
+       }
+
+       /**
+        * 辺だけの四角を作成します。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param LengthX X方向の長さ
+        * @param LengthZ  Z方向の長さ
+        * @return Object
+        */
+       public static Object spuareFrame(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ)
+       {
+               Object DataBox = null;
+               DataBox = lineX(par1World, X, Y, Z + (LengthZ/2), Block,meta, LengthX/2+1, 0);
+               DataBox = lineX(par1World, X, Y, Z - (LengthZ/2), Block,meta, LengthX/2+1, 0);
+               DataBox = lineZ(par1World, X + (LengthX/2), Y, Z, Block,meta, LengthZ/2+1, 0);
+               DataBox = lineZ(par1World, X - (LengthX/2), Y, Z, Block,meta, LengthZ/2+1, 0);
+               return DataBox;
+       }
+
+       /**
+        * 辺だけの箱を作成します。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param LengthX X方向の長さ
+        * @param LengthZ  Z方向の長さ
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object boxFrame(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ,int height)
+       {
+               Object DataBox=null;
+               DataBox = lineX(par1World, X, Y, Z + (LengthZ/2), Block,meta, LengthX/2, 0);
+               DataBox = lineX(par1World, X, Y, Z - (LengthZ/2), Block,meta, LengthX/2, 0);
+               DataBox = lineX(par1World, X, Y + height-1, Z + (LengthZ/2), Block,meta, LengthX/2, 0);
+               DataBox = lineX(par1World, X, Y + height-1, Z - (LengthZ/2), Block,meta, LengthX/2, 0);
+
+               DataBox = lineY(par1World,X +(LengthX/2),Y,Z +(LengthZ/2),Block,meta,height,1);
+               DataBox = lineY(par1World,X -(LengthX/2),Y,Z +(LengthZ/2),Block,meta,height,1);
+               DataBox = lineY(par1World,X +(LengthX/2),Y,Z - (LengthZ/2),Block,meta,height,1);
+               DataBox = lineY(par1World,X -(LengthX/2),Y,Z - (LengthZ/2),Block,meta,height,1);
+
+               DataBox = lineZ(par1World, X + (LengthX/2), Y, Z, Block,meta, LengthZ/2, 0);
+               DataBox = lineZ(par1World, X - (LengthX/2), Y, Z, Block,meta, LengthZ/2, 0);
+               DataBox = lineZ(par1World, X + (LengthX/2), Y + height-1, Z, Block,meta, LengthZ/2, 0);
+               DataBox = lineZ(par1World, X - (LengthX/2), Y + height-1, Z, Block,meta, LengthZ/2, 0);
+               return DataBox;
+       }
+
+       /**
+        * 四角を作成します。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param LengthX X方向の長さ
+        * @param LengthZ  Z方向の長さ
+        * @return Object
+        */
+       public static Object square(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ)
+       {
+               Object DataBox = null;
+               int loop1 = 0;
+               for(loop1=0; loop1 < LengthZ; loop1++){
+                       DataBox = lineX(par1World,X - (LengthX/2),Y,Z - (LengthZ/2) + loop1,Block,meta,LengthX,1);
+               }
+               return DataBox;
+       }
+
+       /**
+        * 箱を生成します。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param LengthX X方向の長さ
+        * @param LengthZ  Z方向の長さ
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object box(World par1World,int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ,int height)
+       {
+               Object DataBox = null;
+               DataBox = square(par1World, X, Y, Z, Block, meta,LengthX,LengthZ);
+               DataBox = square(par1World,X,Y+height,Z,Block,meta,LengthX,LengthZ);
+               DataBox = wallX(par1World,X,Y,Z-(LengthZ/2),Block,meta,LengthX,height);
+               DataBox = wallZ(par1World,X-(LengthX/2),Y,Z,Block,meta,LengthZ,height);
+               DataBox = wallX(par1World,X,Y,Z+(LengthZ/2),Block,meta,LengthX,height);
+               DataBox = wallZ(par1World,X+(LengthX/2),Y,Z,Block,meta,LengthZ,height);
+               return DataBox;
+       }
+
+       /**
+        * Blockで埋め尽くされた箱を生成します。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param LengthX X方向の長さ
+        * @param LengthZ  Z方向の長さ
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object fillBox(World par1World , int X,int Y,int Z,int Block,int meta,int LengthX,int LengthZ,int height)
+       {
+               Object DataBox = null;
+               DataBox = square(par1World, X, Y, Z, Block,meta, LengthX,LengthZ);
+               DataBox = square(par1World,X,Y+height,Z,Block,meta,LengthX,LengthZ);
+               DataBox = wallX(par1World,X,Y,Z-(LengthZ/2),Block,meta,LengthX,height);
+               DataBox = wallZ(par1World,X-(LengthX/2),Y,Z,Block,meta,LengthZ,height);
+               DataBox = wallX(par1World,X,Y,Z+(LengthZ/2),Block,meta,LengthX,height);
+               DataBox = wallZ(par1World,X+(LengthX/2),Y,Z,Block,meta,LengthZ,height);
+
+               for(int i = 0; i < LengthX - 1; i++)
+               {
+                       DataBox = wallZ(par1World,X + 1 - LengthX / 2 + i, Y , Z , Block ,meta,LengthZ, height);
+               }
+
+               return DataBox;
+       }
+
+       /**
+        * 座標ごとにデータを指定して配置します。
+        * 配列になっているので、順番に指定してください。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param XPosition 配置する相対X座標
+        * @param YPosition 配置する相対Y座標
+        * @param ZPosition 配置する相対Z座標
+        * @param Option
+        * @return Object
+        */
+       public static Object fineSetBlock(World par1World,int X,int Y,int Z,int[] Block,int[] meta,int[] XPosition,int[] YPosition,int[] ZPosition,Object[] Option){
+               Object DataBox = null;
+               for(int i=0;i<Block.length;i++){
+                       DataBox = par1World.setBlockAndMetadata(X+XPosition[i], Y+YPosition[i], Z+ZPosition[i], Block[i],meta[i]);
+               }
+
+               if(Option!=null){
+                       for(int j=0;j<Option.length;j++){
+                               DataBox = Option[j];
+                       }
+               }
+               return DataBox;
+       }
+
+       /**
+        * X方向に台形を作成します。
+        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param upperSide 上辺の長さ
+        * @param bottomSide 下辺の長さ
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object trapezoidX(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){
+               Object dataBox = null;
+               int Rate=0;
+               int Math=0;
+               int XRate=0;
+               int YRate = 0;
+               for(int i=0;i<height;i++){
+                       YRate++;
+                       Math++;
+                       XRate++;
+                       if(upperSide < bottomSide){
+                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){
+                                       Rate++;
+                                       Math=0;
+                               }
+                       }
+
+                       if(bottomSide < upperSide){
+                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){
+                                       Rate--;
+                                       Math=0;
+                               }
+                       }
+
+                       dataBox=lineZ(par1World, X+XRate-1, Y+YRate, Z, Block, meta, upperSide+Rate, 0);
+               }
+               return dataBox;
+       }
+
+       /**
+        * Y方向のXラインに台形を作成します。
+        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param upperSide 上辺の長さ
+        * @param bottomSide 下辺の長さ
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object trapezoidY_X(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){
+               Object dataBox = null;
+               int Rate=0;
+               int Math=0;
+               int YRate = 0;
+               for(int i=0;i<height;i++){
+                       YRate++;
+                       Math++;
+                       if(upperSide < bottomSide){
+                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){
+                                       Rate++;
+                                       Math=0;
+                               }
+                       }
+
+                       if(bottomSide < upperSide){
+                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){
+                                       Rate--;
+                                       Math=0;
+                               }
+                       }
+
+                       dataBox=lineZ(par1World, X, Y+YRate, Z, Block, meta, upperSide+Rate, 0);
+               }
+               return dataBox;
+       }
+
+       /**
+        * Y方向のZラインに台形を作成します。
+        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param upperSide 上辺の長さ
+        * @param bottomSide 下辺の長さ
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object trapezoidY_Z(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){
+               Object dataBox = null;
+               int Rate=0;
+               int Math=0;
+               int YRate = 0;
+               for(int i=0;i<height;i++){
+                       YRate++;
+                       Math++;
+                       if(upperSide < bottomSide){
+                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){
+                                       Rate++;
+                                       Math=0;
+                               }
+                       }
+
+                       if(bottomSide < upperSide){
+                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){
+                                       Rate--;
+                                       Math=0;
+                               }
+                       }
+
+                       dataBox=lineX(par1World, X, Y+YRate, Z, Block, meta, upperSide+Rate, 0);
+               }
+               return dataBox;
+       }
+
+       /**
+        * Z方向に台形を作成します。
+        * 必ずbottom/(upper*3)*(height/upper)かupper/(bottom*3)*(height/buttom)が整数になるようにしてください。
+        * @param par1World
+        * @param X 基準X座標
+        * @param Y 基準Y座標
+        * @param Z 基準Z座標
+        * @param Block 配置するBlock
+        * @param meta 配置するMetadata
+        * @param upperSide 上辺の長さ
+        * @param bottomSide 下辺の長さ
+        * @param height 高さ
+        * @return Object
+        */
+       public static Object TrapezoidZ(World par1World,int X,int Y,int Z,int Block,int meta,int upperSide,int bottomSide,int height){
+               Object dataBox = null;
+               int Rate=0;
+               int Math=0;
+               int ZRate=0;
+               for(int i=0;i<height;i++){
+                       Math++;
+                       ZRate++;
+                       if(upperSide < bottomSide){
+                               if(Math == bottomSide/(upperSide*3)*(height/upperSide)){
+                                       Rate++;
+                                       Math=0;
+                               }
+                       }
+
+                       if(bottomSide < upperSide){
+                               if(Math == upperSide/(bottomSide*3)*(height/bottomSide)){
+                                       Rate--;
+                                       Math=0;
+                               }
+                       }
+
+                       dataBox=lineX(par1World, X, Y, Z+ZRate, Block, meta, upperSide+Rate, 0);
+               }
+               return dataBox;
+       }
+
 }
\ No newline at end of file
index 7daf181..9fdab59 100644 (file)
@@ -33,7 +33,7 @@ public class GuiChemicalCombinationTable extends GuiContainer {
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiChemicalCombinationTexture));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUICHEMICALCOMBINATIONTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index a25ad96..9164481 100644 (file)
@@ -19,7 +19,7 @@ public class GuiChemicalCraftingTable extends GuiContainer {
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3){
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiChemicalCraftingTexture));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUICHEMICALCRAFTINGTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index 5fe55f8..0051383 100644 (file)
@@ -3,21 +3,21 @@ package chemicraft.gui;
 import net.minecraft.client.gui.inventory.GuiContainer;
 import net.minecraft.entity.player.EntityPlayer;
 import chemicraft.ChemiCraft;
-import chemicraft.container.ContainerElectrolysisTable;
+import chemicraft.container.ContainerElectrolysis;
 import chemicraft.tileentity.TileEntityElectrolysisTable;
 
 public class GuiElectrolysisTable extends GuiContainer
 {
 
        public GuiElectrolysisTable(EntityPlayer par1EntityPlayer, TileEntityElectrolysisTable par2) {
-               super(new ContainerElectrolysisTable(par1EntityPlayer, par2));
+               super(new ContainerElectrolysis(par1EntityPlayer, par2));
                this.ySize = 204;
        }
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
        {
-               //this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiElectrolysisTableTexture));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUIELECTROLYSISTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index 903740c..0c7686d 100644 (file)
@@ -18,7 +18,7 @@ public class GuiPyrolysisTable extends GuiContainer{
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiPyrolysisTexture));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUIPYROLYSISTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index d3e9288..7440007 100644 (file)
@@ -14,7 +14,7 @@ public class GuiToolAndWeaponCraftingTable extends GuiContainer {
 
        @Override
        protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
-               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.guiToolAndWeaponCraftingTexture));
+               this.mc.renderEngine.bindTexture(this.mc.renderEngine.getTexture(ChemiCraft.instance.GUITOOLANDWEAPONCRAFTINGTEXTURE));
                this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
        }
 
index fab443c..ada8aa4 100644 (file)
@@ -109,4 +109,5 @@ public class InventoryPyrolysisTableMaterial implements IInventory {
        @Override
        public void closeChest() {
        }
+
 }
index ea14e17..f8ca9fd 100644 (file)
@@ -94,7 +94,6 @@ public class InventoryPyrolysisTableResult implements IInventory {
 
        @Override
        public void onInventoryChanged() {
-               if(this.eventHandler != null) this.eventHandler.onCraftMatrixChanged(this);
        }
 
        @Override
@@ -109,4 +108,5 @@ public class InventoryPyrolysisTableResult implements IInventory {
        @Override
        public void closeChest() {
        }
+
 }
index 2c2894e..b5aec03 100644 (file)
@@ -1,19 +1,19 @@
-package chemicraft.item;\r
-\r
-import net.minecraft.item.Item;\r
-import chemicraft.util.AtomInfo;\r
-\r
-public class ItemAtomInfoContainer extends Item {\r
-\r
-       /**\r
-        * AtonInfoのインスタンス\r
-        */\r
-       public AtomInfo atomInfo = new AtomInfo();\r
-\r
-\r
-\r
-       public ItemAtomInfoContainer(int par1){\r
-               super(par1);\r
-       }\r
-\r
-}\r
+package chemicraft.item;
+
+import net.minecraft.item.Item;
+import chemicraft.util.AtomInfo;
+
+public class ItemAtomInfoContainer extends Item {
+
+       /**
+        * AtonInfoのインスタンス
+        */
+       public AtomInfo atomInfo = new AtomInfo();
+
+
+
+       public ItemAtomInfoContainer(int par1){
+               super(par1);
+       }
+
+}
index b766426..3ec489c 100644 (file)
@@ -43,7 +43,7 @@ public class ItemAtoms extends Item {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.itemAtomsTexture;
+               return ChemiCraft.instance.ITEMATOMSTEXTURE;
        }
 
 
index 18df605..8628675 100644 (file)
@@ -79,7 +79,7 @@ public class ItemCompounds extends Item {
 
        @Override
        public String getTextureFile(){
-               return ChemiCraft.instance.itemCompoundsTexture;
+               return ChemiCraft.instance.ITEMCOMPOUNDSTEXTURE;
        }
 
 
index ee8d2a4..2547632 100644 (file)
-package chemicraft.item;\r
-\r
-import net.minecraft.block.Block;\r
-import net.minecraft.block.BlockFire;\r
-import net.minecraft.entity.player.EntityPlayer;\r
-import net.minecraft.item.ItemStack;\r
-import net.minecraft.world.World;\r
-import chemicraft.ChemiCraft;\r
-import chemicraft.ChemiCraftAPI;\r
-import chemicraft.util.MathHelperPlus;\r
-\r
-public class ItemGasCollectingBottle extends ItemAtomInfoContainer\r
-{\r
-\r
-       public ItemGasCollectingBottle(int id) {\r
-               super(id);\r
-               this.setMaxStackSize(1);\r
-               this.setMaxDamage(2);\r
-               this.setCreativeTab(ChemiCraft.instance.creativeTab);\r
-       }\r
-\r
-       @Override\r
-       public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)\r
-       {\r
-               par1ItemStack.damageItem(1, par3EntityPlayer);\r
-\r
-               this.atomInfo.update(par2World, par3EntityPlayer);\r
-\r
-               int heightValue = par2World.getHeightValue((int) par3EntityPlayer.posX, (int) par3EntityPlayer.posZ);\r
-\r
-               int result1 = MathHelperPlus.probability(99, 1);\r
-               int result2 = MathHelperPlus.probability(78, 21, 1);\r
-               int result3 = MathHelperPlus.probability(0.032, 0.0018, 0.000012, 0.00052);\r
-               if (this.atomInfo.isOverY(heightValue)) {\r
-                       if (result1 == 0) {\r
-                               if (result2 == 0) {\r
-                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 6), par3EntityPlayer);\r
-                               } else if (result2 == 1) {\r
-                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 7), par3EntityPlayer);\r
-                               } else {\r
-                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 17), par3EntityPlayer);\r
-                               }\r
-                       } else {\r
-                               if (result3 == 0) {\r
-                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonDioxide")), par3EntityPlayer);\r
-                               } else if (result3 == 1) {\r
-                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 9), par3EntityPlayer);\r
-                               } else if (result3 == 2) {\r
-                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, 1), par3EntityPlayer);\r
-                               } else {\r
-                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 1), par3EntityPlayer);\r
-                               }\r
-                       }\r
-               }\r
-\r
-               // デバッグ用\r
-               if (par2World.isRemote) {\r
-                       par3EntityPlayer.addChatMessage("result1=" + result1 + " result2=" + result2 + " result3=" + result3);\r
-                       par3EntityPlayer.addChatMessage("このメッセージは開発版のみの表示ですが、もし製品版で表示されていた場合はご連絡ください。");\r
-               }\r
-\r
-               return par1ItemStack;\r
-       }\r
-\r
-       protected void isStackOrDrop(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer)\r
-       {\r
-               if (!par2EntityPlayer.inventory.addItemStackToInventory(par1ItemStack)) {\r
-                       par2EntityPlayer.dropPlayerItem(par1ItemStack);\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)\r
-       {\r
-               int blockID = par3World.getBlockId(par4, par5, par6);\r
-               Block block = Block.blocksList[blockID];\r
-\r
-               int uniqueBlockID = par3World.getBlockId(par4, par5 + 1, par6);\r
-               Block uniqueBlock = Block.blocksList[uniqueBlockID];\r
-\r
-               if (uniqueBlock instanceof BlockFire){\r
-                       par1ItemStack.damageItem(1, par2EntityPlayer);\r
-\r
-                       int result1 = MathHelperPlus.probability(90, 10);\r
-\r
-                       if (result1 == 0) {\r
-                               this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonDioxide")), par2EntityPlayer);\r
-                       } else {\r
-                               this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonMonoxide")), par2EntityPlayer);\r
-                       }\r
-\r
-                       return true;\r
-               }\r
-               return false;\r
-       }\r
-\r
-       @Override\r
-       public String getTextureFile()\r
-       {\r
-               return "/chemicraft/items/items.png";\r
-       }\r
-\r
-}\r
+package chemicraft.item;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFire;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import chemicraft.ChemiCraft;
+import chemicraft.ChemiCraftAPI;
+import chemicraft.util.MathHelperPlus;
+
+public class ItemGasCollectingBottle extends ItemAtomInfoContainer
+{
+
+       public ItemGasCollectingBottle(int id) {
+               super(id);
+               this.setMaxStackSize(1);
+               this.setMaxDamage(2);
+               this.setCreativeTab(ChemiCraft.instance.creativeTab);
+       }
+
+       @Override
+       public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
+       {
+               par1ItemStack.damageItem(1, par3EntityPlayer);
+
+               this.atomInfo.update(par2World, par3EntityPlayer);
+
+               int heightValue = par2World.getHeightValue((int) par3EntityPlayer.posX, (int) par3EntityPlayer.posZ);
+
+               int result1 = MathHelperPlus.probability(99, 1);
+               int result2 = MathHelperPlus.probability(78, 21, 1);
+               int result3 = MathHelperPlus.probability(0.032, 0.0018, 0.000012, 0.00052);
+               if (this.atomInfo.isOverY(heightValue)) {
+                       if (result1 == 0) {
+                               if (result2 == 0) {
+                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 6), par3EntityPlayer);
+                               } else if (result2 == 1) {
+                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 7), par3EntityPlayer);
+                               } else {
+                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 17), par3EntityPlayer);
+                               }
+                       } else {
+                               if (result3 == 0) {
+                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonDioxide")), par3EntityPlayer);
+                               } else if (result3 == 1) {
+                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 9), par3EntityPlayer);
+                               } else if (result3 == 2) {
+                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, 1), par3EntityPlayer);
+                               } else {
+                                       this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemAtoms, 1, 1), par3EntityPlayer);
+                               }
+                       }
+               }
+
+               // デバッグ用
+               if (par2World.isRemote) {
+                       par3EntityPlayer.addChatMessage("result1=" + result1 + " result2=" + result2 + " result3=" + result3);
+               }
+
+               return par1ItemStack;
+       }
+
+       protected void isStackOrDrop(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer)
+       {
+               if (!par2EntityPlayer.inventory.addItemStackToInventory(par1ItemStack)) {
+                       par2EntityPlayer.dropPlayerItem(par1ItemStack);
+               }
+       }
+
+       @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 blockID = par3World.getBlockId(par4, par5, par6);
+               Block block = Block.blocksList[blockID];
+
+               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);
+
+                       if (result1 == 0) {
+                               this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonDioxide")), par2EntityPlayer);
+                       } else {
+                               this.isStackOrDrop(new ItemStack(ChemiCraft.instance.itemCompounds, 1, ChemiCraftAPI.getInstance().getCompound("CarbonMonoxide")), par2EntityPlayer);
+                       }
+
+                       return true;
+               }
+               return false;
+       }
+
+       @Override
+       public String getTextureFile()
+       {
+               return "/chemicraft/items/items.png";
+       }
+
+}
index 916a86f..d8b549d 100644 (file)
@@ -30,7 +30,7 @@ public class RenderAtomsGrenade extends Render {
                float var10 = this.field_77002_a;
                GL11.glScalef(var10 / 1.0F, var10 / 1.0F, var10 / 1.0F);
                byte var11 = 1;
-               this.loadTexture(ChemiCraft.instance.itemTexture);
+               this.loadTexture(ChemiCraft.instance.ITEMTEXTURE);
                Tessellator var12 = Tessellator.instance;
                float var13 = (float)(var11 % 16 * 16 + 0) / 256.0F;
                float var14 = (float)(var11 % 16 * 16 + 16) / 256.0F;
index fb83ba6..0d9ae9a 100644 (file)
@@ -5,8 +5,8 @@ import net.minecraft.inventory.Slot;
 
 public class SlotPyrolysisTableMaterial extends Slot {
 
-       public SlotPyrolysisTableMaterial(IInventory par1IInventory, int par2, int par3, int par4) {
-               super(par1IInventory, par2, par3, par4);
+       public SlotPyrolysisTableMaterial(IInventory par1iInventory, int par2, int par3, int par4) {
+               super(par1iInventory, par2, par3, par4);
        }
 
 }
index 41d25e0..29412ea 100644 (file)
@@ -6,12 +6,12 @@ import net.minecraft.item.ItemStack;
 
 public class SlotPyrolysisTableResult extends Slot {
 
-       public SlotPyrolysisTableResult(IInventory par1IInventory, int par2, int par3, int par4) {
-               super(par1IInventory, par2, par3, par4);
+       public SlotPyrolysisTableResult(IInventory par1iInventory, int par2,    int par3, int par4) {
+               super(par1iInventory, par2, par3, par4);
        }
 
-       public boolean isItemValid(ItemStack par1ItemStack)
-       {
+       @Override
+       public boolean isItemValid(ItemStack par1ItemStack){
                return false;
        }
 
index 7edcb3a..58f4c0a 100644 (file)
@@ -5,13 +5,11 @@ import net.minecraft.tileentity.TileEntity;
 import net.minecraft.world.World;
 import chemicraft.container.ContainerChemicalCombinationTable;
 import chemicraft.container.ContainerChemicalCraftingTable;
-import chemicraft.container.ContainerElectrolysisTable;
 import chemicraft.container.ContainerPyrolysisTable;
 import chemicraft.container.ContainerToolAndWeaponCraftingTable;
 import chemicraft.debug.DebugTick;
 import chemicraft.tileentity.TileEntityChemicalCombinationTable;
 import chemicraft.tileentity.TileEntityChemicalCraftingTable;
-import chemicraft.tileentity.TileEntityElectrolysisTable;
 import chemicraft.tileentity.TileEntityPyrolysisTable;
 import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
 import cpw.mods.fml.common.network.IGuiHandler;
@@ -34,16 +32,14 @@ public class CommonProxy implements IGuiHandler {
                        return null;
 
                TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
-               if(tileEntity instanceof TileEntityChemicalCombinationTable){
+               if (tileEntity instanceof TileEntityPyrolysisTable) {
+                       return new ContainerPyrolysisTable(player, (TileEntityPyrolysisTable) tileEntity);
+               }else if(tileEntity instanceof TileEntityChemicalCombinationTable){
                        return new ContainerChemicalCombinationTable(player, (TileEntityChemicalCombinationTable) tileEntity);
                }else if(tileEntity instanceof TileEntityToolAndWeaponCraftingTable){
                        return new ContainerToolAndWeaponCraftingTable(player, (TileEntityToolAndWeaponCraftingTable) tileEntity);
                }else if(tileEntity instanceof TileEntityChemicalCraftingTable){
                        return new ContainerChemicalCraftingTable(player, (TileEntityChemicalCraftingTable) tileEntity);
-               }else if(tileEntity instanceof TileEntityElectrolysisTable){
-                       return new ContainerElectrolysisTable(player, (TileEntityElectrolysisTable)tileEntity);
-               } else if(tileEntity instanceof TileEntityPyrolysisTable) {
-                       return new ContainerPyrolysisTable(player, (TileEntityPyrolysisTable)tileEntity);
                }
                return null;
        }
index fa6d9ae..b7c7b1a 100644 (file)
-package chemicraft.system;\r
-\r
-import java.io.ByteArrayOutputStream;\r
-import java.io.DataOutputStream;\r
-import java.io.IOException;\r
-\r
-import net.minecraft.entity.player.EntityPlayer;\r
-import net.minecraft.network.INetworkManager;\r
-import net.minecraft.network.packet.Packet;\r
-import net.minecraft.network.packet.Packet250CustomPayload;\r
-import net.minecraft.tileentity.TileEntity;\r
-import net.minecraft.world.World;\r
-import chemicraft.ChemiCraft;\r
-import chemicraft.tileentity.TileEntityChemicalCombinationTable;\r
-import chemicraft.tileentity.TileEntityChemicalCraftingTable;\r
-import chemicraft.tileentity.TileEntityPyrolysisTable;\r
-import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;\r
-\r
-import com.google.common.io.ByteArrayDataInput;\r
-import com.google.common.io.ByteStreams;\r
-\r
-import cpw.mods.fml.common.network.IPacketHandler;\r
-import cpw.mods.fml.common.network.Player;\r
-\r
-/**\r
- * サーバーとクライアントのデータの同期に必要なクラス\r
- *\r
- * @author Lilly\r
- *\r
- */\r
-public class PacketHandler implements IPacketHandler {\r
-\r
-       @Override\r
-       public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) {\r
-               if (packet.channel.equals("chemicraft")) {\r
-                       ByteArrayDataInput badi = ByteStreams.newDataInput(packet.data);\r
-\r
-                       World worldClient;\r
-                       World worldServer;\r
-                       TileEntity var1;\r
-\r
-                       // TileEntityのx, y, z座標\r
-                       int x, y, z;\r
-\r
-                       // 座標読み込み\r
-                       x = badi.readInt();\r
-                       y = badi.readInt();\r
-                       z = badi.readInt();\r
-\r
-                       worldClient = ChemiCraft.proxy.getClientWorld();\r
-                       worldServer = ((EntityPlayer)player).worldObj;\r
-                       if(worldClient != null && worldServer == null){\r
-                               var1 = worldClient.getBlockTileEntity(x, y, z);\r
-                               if(var1 instanceof TileEntityChemicalCombinationTable) ((TileEntityChemicalCombinationTable)var1).readPacket(badi);\r
-                               if(var1 instanceof TileEntityChemicalCraftingTable) ((TileEntityChemicalCraftingTable)var1).readPacket(badi);\r
-                               if(var1 instanceof TileEntityPyrolysisTable) ((TileEntityPyrolysisTable)var1).readPacket(badi);\r
-                               if(var1 instanceof TileEntityToolAndWeaponCraftingTable) ((TileEntityToolAndWeaponCraftingTable)var1).readPacket(badi);\r
-                               return;\r
-                       }\r
-                       if(worldServer != null){\r
-                               var1 = worldServer.getBlockTileEntity(x, y, z);\r
-                               if(var1 instanceof TileEntityChemicalCombinationTable) ((TileEntityChemicalCombinationTable)var1).readPacket(badi);\r
-                               if(var1 instanceof TileEntityChemicalCraftingTable) ((TileEntityChemicalCraftingTable)var1).readPacket(badi);\r
-                               if(var1 instanceof TileEntityPyrolysisTable) ((TileEntityPyrolysisTable)var1).readPacket(badi);\r
-                               if(var1 instanceof TileEntityToolAndWeaponCraftingTable) ((TileEntityToolAndWeaponCraftingTable)var1).readPacket(badi);\r
-                       }\r
-                       return;\r
-               }\r
-       }\r
-\r
-\r
-       public static Packet getPacket(TileEntityPyrolysisTable tileEntity) {\r
-               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);\r
-               DataOutputStream var2 = new DataOutputStream(var1);\r
-\r
-               // Blockのx, y, z座標\r
-               int x, y, z;\r
-\r
-               // x, y, z座標を代入\r
-               x = tileEntity.xCoord;\r
-               y = tileEntity.yCoord;\r
-               z = tileEntity.zCoord;\r
-\r
-               try {\r
-                       // 座標書き込み\r
-                       var2.writeInt(x);\r
-                       var2.writeInt(y);\r
-                       var2.writeInt(z);\r
-                       tileEntity.writePacket(var2);\r
-               } catch (IOException e) {\r
-                       e.printStackTrace();\r
-               }\r
-\r
-               // パケットの作成\r
-               Packet250CustomPayload packet = new Packet250CustomPayload();\r
-               packet.channel = "chemicraft";\r
-               packet.data = var1.toByteArray();\r
-               packet.length = var1.size();\r
-               packet.isChunkDataPacket = true;\r
-               return packet;\r
-       }\r
-\r
-       public static Packet getPacket(TileEntityChemicalCombinationTable tileEntity) {\r
-               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);\r
-               DataOutputStream var2 = new DataOutputStream(var1);\r
-\r
-               // Blockのx, y, z座標\r
-               int x, y, z;\r
-\r
-               // x, y, z座標を代入\r
-               x = tileEntity.xCoord;\r
-               y = tileEntity.yCoord;\r
-               z = tileEntity.zCoord;\r
-\r
-               try {\r
-                       // 座標書き込み\r
-                       var2.writeInt(x);\r
-                       var2.writeInt(y);\r
-                       var2.writeInt(z);\r
-                       tileEntity.writePacket(var2);\r
-               } catch (IOException e) {\r
-                       e.printStackTrace();\r
-               }\r
-\r
-               // パケットの作成\r
-               Packet250CustomPayload packet = new Packet250CustomPayload();\r
-               packet.channel = "chemicraft";\r
-               packet.data = var1.toByteArray();\r
-               packet.length = var1.size();\r
-               packet.isChunkDataPacket = true;\r
-               return packet;\r
-       }\r
-\r
-       public static Packet getPacket(TileEntityToolAndWeaponCraftingTable tileEntity) {\r
-               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);\r
-               DataOutputStream var2 = new DataOutputStream(var1);\r
-\r
-               // Blockのx, y, z座標\r
-               int x, y, z;\r
-\r
-               // x, y, z座標を代入\r
-               x = tileEntity.xCoord;\r
-               y = tileEntity.yCoord;\r
-               z = tileEntity.zCoord;\r
-\r
-               try {\r
-                       // 座標書き込み\r
-                       var2.writeInt(x);\r
-                       var2.writeInt(y);\r
-                       var2.writeInt(z);\r
-                       tileEntity.writePacket(var2);\r
-               } catch (IOException e) {\r
-                       e.printStackTrace();\r
-               }\r
-\r
-               // パケットの作成\r
-               Packet250CustomPayload packet = new Packet250CustomPayload();\r
-               packet.channel = "chemicraft";\r
-               packet.data = var1.toByteArray();\r
-               packet.length = var1.size();\r
-               packet.isChunkDataPacket = true;\r
-               return packet;\r
-       }\r
-\r
-       public static Packet getPacket(TileEntityChemicalCraftingTable tileEntity) {\r
-               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);\r
-               DataOutputStream var2 = new DataOutputStream(var1);\r
-\r
-               // Blockのx, y, z座標\r
-               int x, y, z;\r
-\r
-               // x, y, z座標を代入\r
-               x = tileEntity.xCoord;\r
-               y = tileEntity.yCoord;\r
-               z = tileEntity.zCoord;\r
-\r
-               try {\r
-                       // 座標書き込み\r
-                       var2.writeInt(x);\r
-                       var2.writeInt(y);\r
-                       var2.writeInt(z);\r
-                       tileEntity.writePacket(var2);\r
-               } catch (IOException e) {\r
-                       e.printStackTrace();\r
-               }\r
-\r
-               // パケットの作成\r
-               Packet250CustomPayload packet = new Packet250CustomPayload();\r
-               packet.channel = "chemicraft";\r
-               packet.data = var1.toByteArray();\r
-               packet.length = var1.size();\r
-               packet.isChunkDataPacket = true;\r
-               return packet;\r
-       }\r
-\r
-}\r
+package chemicraft.system;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet250CustomPayload;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import chemicraft.ChemiCraft;
+import chemicraft.tileentity.TileEntityChemicalCombinationTable;
+import chemicraft.tileentity.TileEntityChemicalCraftingTable;
+import chemicraft.tileentity.TileEntityPyrolysisTable;
+import chemicraft.tileentity.TileEntityToolAndWeaponCraftingTable;
+
+import com.google.common.io.ByteArrayDataInput;
+import com.google.common.io.ByteStreams;
+
+import cpw.mods.fml.common.network.IPacketHandler;
+import cpw.mods.fml.common.network.Player;
+
+/**
+ * サーバーとクライアントのデータの同期に必要なクラス
+ *
+ * @author Lilly
+ *
+ */
+public class PacketHandler implements IPacketHandler {
+
+       @Override
+       public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) {
+               if (packet.channel.equals("chemicraft")) {
+                       ByteArrayDataInput badi = ByteStreams.newDataInput(packet.data);
+
+                       World worldClient;
+                       World worldServer;
+                       TileEntity var1;
+
+                       // TileEntityのx, y, z座標
+                       int x, y, z;
+
+                       // 座標読み込み
+                       x = badi.readInt();
+                       y = badi.readInt();
+                       z = badi.readInt();
+
+                       worldClient = ChemiCraft.proxy.getClientWorld();
+                       worldServer = ((EntityPlayer)player).worldObj;
+                       if(worldClient != null && worldServer == null){
+                               var1 = worldClient.getBlockTileEntity(x, y, z);
+                               if(var1 instanceof TileEntityChemicalCombinationTable) ((TileEntityChemicalCombinationTable)var1).readPacket(badi);
+                               if(var1 instanceof TileEntityChemicalCraftingTable) ((TileEntityChemicalCraftingTable)var1).readPacket(badi);
+                               if(var1 instanceof TileEntityPyrolysisTable) ((TileEntityPyrolysisTable)var1).readPacket(badi);
+                               if(var1 instanceof TileEntityToolAndWeaponCraftingTable) ((TileEntityToolAndWeaponCraftingTable)var1).readPacket(badi);
+                               return;
+                       }
+                       if(worldServer != null){
+                               var1 = worldServer.getBlockTileEntity(x, y, z);
+                               if(var1 instanceof TileEntityChemicalCombinationTable) ((TileEntityChemicalCombinationTable)var1).readPacket(badi);
+                               if(var1 instanceof TileEntityChemicalCraftingTable) ((TileEntityChemicalCraftingTable)var1).readPacket(badi);
+                               if(var1 instanceof TileEntityPyrolysisTable) ((TileEntityPyrolysisTable)var1).readPacket(badi);
+                               if(var1 instanceof TileEntityToolAndWeaponCraftingTable) ((TileEntityToolAndWeaponCraftingTable)var1).readPacket(badi);
+                       }
+                       return;
+               }
+       }
+
+
+       public static Packet getPacket(TileEntityPyrolysisTable tileEntity) {
+               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);
+               DataOutputStream var2 = new DataOutputStream(var1);
+
+               // Blockのx, y, z座標
+               int x, y, z;
+
+               // x, y, z座標を代入
+               x = tileEntity.xCoord;
+               y = tileEntity.yCoord;
+               z = tileEntity.zCoord;
+
+               try {
+                       // 座標書き込み
+                       var2.writeInt(x);
+                       var2.writeInt(y);
+                       var2.writeInt(z);
+                       tileEntity.writePacket(var2);
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+
+               // パケットの作成
+               Packet250CustomPayload packet = new Packet250CustomPayload();
+               packet.channel = "chemicraft";
+               packet.data = var1.toByteArray();
+               packet.length = var1.size();
+               packet.isChunkDataPacket = true;
+               return packet;
+       }
+
+       public static Packet getPacket(TileEntityChemicalCombinationTable tileEntity) {
+               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);
+               DataOutputStream var2 = new DataOutputStream(var1);
+
+               // Blockのx, y, z座標
+               int x, y, z;
+
+               // x, y, z座標を代入
+               x = tileEntity.xCoord;
+               y = tileEntity.yCoord;
+               z = tileEntity.zCoord;
+
+               try {
+                       // 座標書き込み
+                       var2.writeInt(x);
+                       var2.writeInt(y);
+                       var2.writeInt(z);
+                       tileEntity.writePacket(var2);
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+
+               // パケットの作成
+               Packet250CustomPayload packet = new Packet250CustomPayload();
+               packet.channel = "chemicraft";
+               packet.data = var1.toByteArray();
+               packet.length = var1.size();
+               packet.isChunkDataPacket = true;
+               return packet;
+       }
+
+       public static Packet getPacket(TileEntityToolAndWeaponCraftingTable tileEntity) {
+               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);
+               DataOutputStream var2 = new DataOutputStream(var1);
+
+               // Blockのx, y, z座標
+               int x, y, z;
+
+               // x, y, z座標を代入
+               x = tileEntity.xCoord;
+               y = tileEntity.yCoord;
+               z = tileEntity.zCoord;
+
+               try {
+                       // 座標書き込み
+                       var2.writeInt(x);
+                       var2.writeInt(y);
+                       var2.writeInt(z);
+                       tileEntity.writePacket(var2);
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+
+               // パケットの作成
+               Packet250CustomPayload packet = new Packet250CustomPayload();
+               packet.channel = "chemicraft";
+               packet.data = var1.toByteArray();
+               packet.length = var1.size();
+               packet.isChunkDataPacket = true;
+               return packet;
+       }
+
+       public static Packet getPacket(TileEntityChemicalCraftingTable tileEntity) {
+               ByteArrayOutputStream var1 = new ByteArrayOutputStream(128);
+               DataOutputStream var2 = new DataOutputStream(var1);
+
+               // Blockのx, y, z座標
+               int x, y, z;
+
+               // x, y, z座標を代入
+               x = tileEntity.xCoord;
+               y = tileEntity.yCoord;
+               z = tileEntity.zCoord;
+
+               try {
+                       // 座標書き込み
+                       var2.writeInt(x);
+                       var2.writeInt(y);
+                       var2.writeInt(z);
+                       tileEntity.writePacket(var2);
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+
+               // パケットの作成
+               Packet250CustomPayload packet = new Packet250CustomPayload();
+               packet.channel = "chemicraft";
+               packet.data = var1.toByteArray();
+               packet.length = var1.size();
+               packet.isChunkDataPacket = true;
+               return packet;
+       }
+
+}
index 02b592d..40fd89e 100644 (file)
@@ -11,6 +11,8 @@ import net.minecraft.nbt.NBTTagCompound;
 import net.minecraft.nbt.NBTTagList;
 import net.minecraft.network.packet.Packet;
 import net.minecraft.tileentity.TileEntity;
+import chemicraft.debug.DebugData;
+import chemicraft.debug.DebugTick;
 import chemicraft.inventory.InventoryPyrolysisTableFuel;
 import chemicraft.inventory.InventoryPyrolysisTableMaterial;
 import chemicraft.inventory.InventoryPyrolysisTableResult;
@@ -18,6 +20,10 @@ import chemicraft.system.PacketHandler;
 
 import com.google.common.io.ByteArrayDataInput;
 
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
 public class TileEntityPyrolysisTable extends TileEntity {
 
        private InventoryPyrolysisTableMaterial invm = new InventoryPyrolysisTableMaterial();
index 484fef1..ccc5f01 100644 (file)
-package chemicraft.util;\r
-\r
-import net.minecraft.entity.player.EntityPlayer;\r
-import net.minecraft.world.World;\r
-import cpw.mods.fml.relauncher.Side;\r
-import cpw.mods.fml.relauncher.SideOnly;\r
-\r
-/**\r
- * いろいろなデータを格納しメソッドによってチェックするクラス\r
- * 使用する場合はItemAtomInfoContainerを継承することを推奨\r
- * @author ponkotate\r
- *\r
- */\r
-public class AtomInfo {\r
-\r
-       /**\r
-        * X, Y, Z座標\r
-        */\r
-       private  int posX;\r
-       private  int posY;\r
-       private  int posZ;\r
-\r
-\r
-       /**\r
-        * biomeの名前\r
-        */\r
-       private  String biomeName;\r
-\r
-\r
-       /**\r
-        * 天候\r
-        */\r
-       private  String weather;\r
-\r
-\r
-       /**\r
-        * EntityPlayerのインスタンス\r
-        */\r
-       private EntityPlayer entityPlayer;\r
-\r
-\r
-       /**\r
-        * Worldのインスタンス\r
-        */\r
-       private World world;\r
-\r
-\r
-\r
-       /**\r
-        * AtomInfoのデータをupdateします\r
-        * @param par1World Worldのインスタンス\r
-        * @param par2EntityPlayer EntityPlayerのインスタンス\r
-        */\r
-       public void update(World par1World, EntityPlayer par2EntityPlayer){\r
-               //this.world = par1World;\r
-               //this.entityPlayer = par2EntityPlayer;\r
-\r
-               this.posX = (int) par2EntityPlayer.posX;\r
-               this.posY = (int) par2EntityPlayer.posY;\r
-               this.posZ = (int) par2EntityPlayer.posZ;\r
-\r
-               this.biomeName = par1World.getBiomeGenForCoords(posX, posZ).biomeName;\r
-\r
-               if (par1World.isThundering()){\r
-                       this.weather = "Thunder";\r
-               }else if(par1World.isRaining()){\r
-                       this.weather = "Rain";\r
-               }else{\r
-                       this.weather = "Sun";\r
-               }\r
-       }\r
-\r
-\r
-\r
-       /**\r
-        * 引数に指定されたBiomeと同等か比較します\r
-        * @param biomeName 比較するBiomeの名前\r
-        * @return Biomeが一致しているか\r
-        */\r
-       public boolean isEquivalentBiome(String biomeName){\r
-               if(this.biomeName != null){\r
-                       if(this.biomeName.equals(biomeName)){\r
-                               return true;\r
-                       }else{\r
-                               return false;\r
-                       }\r
-               }else{\r
-                       System.err.println("AtonInfo:データが入っていません。updateメソッドでデータを入れてください");\r
-                       return false;\r
-               }\r
-       }\r
-\r
-\r
-\r
-       /**\r
-        * 引数に指定された天候と同等か比較します\r
-        * 晴れ:Sun, 雨:Rain, 雷雨:Thunder\r
-        * @param weather 比較する天候\r
-        * @return 天候が一致しているか\r
-        */\r
-       public boolean isEquivalentWeather(String weather){\r
-               if(this.weather != null){\r
-                       if(this.weather.equals(weather)){\r
-                               return true;\r
-                       }else{\r
-                               return false;\r
-                       }\r
-               }else{\r
-                       System.err.println("AtonInfo:データが入っていません。updateメソッドでデータを入れてください");\r
-                       return false;\r
-               }\r
-       }\r
-\r
-\r
-\r
-       /**\r
-        * 引数に指定されたY軸より高いか判定します\r
-        * @param par1\r
-        * @return 指定されたY軸より高いか\r
-        */\r
-       @SideOnly(Side.CLIENT)\r
-       public boolean isOverY(int par1){\r
-               if(this.posY >= par1){\r
-                       return true;\r
-               }else{\r
-                       return false;\r
-               }\r
-       }\r
-\r
-\r
-\r
-       /**\r
-        * 引数に指定されたY軸と同等か判定します\r
-        * @param par1\r
-        * @return 指定されたY軸と同等かどうか\r
-        */\r
-       @SideOnly(Side.CLIENT)\r
-       public boolean isEquivalentY(int par1){\r
-               if(this.posY == par1){\r
-                       return true;\r
-               }else{\r
-                       return false;\r
-               }\r
-       }\r
-\r
-\r
-\r
-       /**\r
-        * 引数に指定されたY軸より低いか判定します\r
-        * @param par1\r
-        * @return 指定されたY軸より低いか\r
-        */\r
-       @SideOnly(Side.CLIENT)\r
-       public boolean isBelowY(int par1){\r
-               if(this.posY <= par1){\r
-                       return true;\r
-               }else{\r
-                       return false;\r
-               }\r
-       }\r
-\r
-}\r
+package chemicraft.util;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+/**
+ * いろいろなデータを格納しメソッドによってチェックするクラス
+ * 使用する場合はItemAtomInfoContainerを継承することを推奨
+ * @author ponkotate
+ *
+ */
+public class AtomInfo {
+
+       /**
+        * X, Y, Z座標
+        */
+       private  int posX;
+       private  int posY;
+       private  int posZ;
+
+
+       /**
+        * biomeの名前
+        */
+       private  String biomeName;
+
+
+       /**
+        * 天候
+        */
+       private  String weather;
+
+
+       /**
+        * EntityPlayerのインスタンス
+        */
+       private EntityPlayer entityPlayer;
+
+
+       /**
+        * Worldのインスタンス
+        */
+       private World world;
+
+
+
+       /**
+        * AtomInfoのデータをupdateします
+        * @param par1World Worldのインスタンス
+        * @param par2EntityPlayer EntityPlayerのインスタンス
+        */
+       public void update(World par1World, EntityPlayer par2EntityPlayer){
+               //this.world = par1World;
+               //this.entityPlayer = par2EntityPlayer;
+
+               this.posX = (int) par2EntityPlayer.posX;
+               this.posY = (int) par2EntityPlayer.posY;
+               this.posZ = (int) par2EntityPlayer.posZ;
+
+               this.biomeName = par1World.getBiomeGenForCoords(posX, posZ).biomeName;
+
+               if (par1World.isThundering()){
+                       this.weather = "Thunder";
+               }else if(par1World.isRaining()){
+                       this.weather = "Rain";
+               }else{
+                       this.weather = "Sun";
+               }
+       }
+
+
+
+       /**
+        * 引数に指定されたBiomeと同等か比較します
+        * @param biomeName 比較するBiomeの名前
+        * @return Biomeが一致しているか
+        */
+       public boolean isEquivalentBiome(String biomeName){
+               if(this.biomeName != null){
+                       if(this.biomeName.equals(biomeName)){
+                               return true;
+                       }else{
+                               return false;
+                       }
+               }else{
+                       System.err.println("AtonInfo:データが入っていません。updateメソッドでデータを入れてください");
+                       return false;
+               }
+       }
+
+
+
+       /**
+        * 引数に指定された天候と同等か比較します
+        * 晴れ:Sun, 雨:Rain, 雷雨:Thunder
+        * @param weather 比較する天候
+        * @return 天候が一致しているか
+        */
+       public boolean isEquivalentWeather(String weather){
+               if(this.weather != null){
+                       if(this.weather.equals(weather)){
+                               return true;
+                       }else{
+                               return false;
+                       }
+               }else{
+                       System.err.println("AtonInfo:データが入っていません。updateメソッドでデータを入れてください");
+                       return false;
+               }
+       }
+
+
+
+       /**
+        * 引数に指定されたY軸より高いか判定します
+        * @param par1
+        * @return 指定されたY軸より高いか
+        */
+       @SideOnly(Side.CLIENT)
+       public boolean isOverY(int par1){
+               if(this.posY >= par1){
+                       return true;
+               }else{
+                       return false;
+               }
+       }
+
+
+
+       /**
+        * 引数に指定されたY軸と同等か判定します
+        * @param par1
+        * @return 指定されたY軸と同等かどうか
+        */
+       @SideOnly(Side.CLIENT)
+       public boolean isEquivalentY(int par1){
+               if(this.posY == par1){
+                       return true;
+               }else{
+                       return false;
+               }
+       }
+
+
+
+       /**
+        * 引数に指定されたY軸より低いか判定します
+        * @param par1
+        * @return 指定されたY軸より低いか
+        */
+       @SideOnly(Side.CLIENT)
+       public boolean isBelowY(int par1){
+               if(this.posY <= par1){
+                       return true;
+               }else{
+                       return false;
+               }
+       }
+
+}
index 7560c60..fbd32a4 100644 (file)
-package chemicraft.util;\r
-\r
-import net.minecraft.block.Block;\r
-import net.minecraft.item.Item;\r
-import net.minecraft.item.ItemStack;\r
-import cpw.mods.fml.common.registry.LanguageRegistry;\r
-\r
-public class Auxiliary {\r
-\r
-       /**\r
-        * 補助クラス\r
-        * @author mozipi\r
-        *\r
-        */\r
-       public static class NameAuxiliary {\r
-\r
-               /**\r
-                * 名前を設定します\r
-                * @param object\r
-                * @param Name\r
-                */\r
-               public void addName(Object object,Object name){\r
-                       LanguageRegistry.addName(object, (String) name);\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * 名前を設定します(ItemStack版)\r
-                * @param object\r
-                * @param name\r
-                * @param meta\r
-                */\r
-               public void addName(ItemStack itemstack,Object name){\r
-                       LanguageRegistry.addName(itemstack, (String) name);\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * 指定言語にそって名前を追加します\r
-                * @param object\r
-                * @param lang\r
-                * @param name\r
-                */\r
-               public void addName(Object object,String lang,Object name){\r
-                       LanguageRegistry.instance().addNameForObject(object, lang, (String) name);\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * 指定言語にそって名前を追加します(ItemStack版)\r
-                * @param object\r
-                * @param lang\r
-                * @param name\r
-                */\r
-               public void addName(ItemStack object,String lang,Object name){\r
-                       LanguageRegistry.instance().addNameForObject(object, lang, (String) name);\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * メタデータごとに名前を追加します(Block版)\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Block object,Object[] name){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
-                       }\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * メタデータごとに名前を追加します(Item版)\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Item object,Object[] name){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);\r
-                       }\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * 指定された言語にそってメタデータごとに名前を設定します(Block版)\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Block object,String lang,Object[] name){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
-                       }\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * 指定された言語にそってメタデータごとに名前を設定します(Item版)\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Item object,String lang, Object[] name){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);\r
-                       }\r
-               }\r
-\r
-               /**\r
-                * 指定された言語にそってメタデータごとに名前を設定します(Block版)\r
-                * また、配列の前に任意の文字列を追加できます。\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Block object,String lang, String string, Object[] name){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, string + (String) name[i]);\r
-                       }\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * 指定された言語にそってメタデータごとに名前を設定します(Item版)\r
-                * また、配列の前に任意の文字列を追加できます。\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Item object,String lang, String string, Object[] name){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, string + (String) name[i]);\r
-                       }\r
-               }\r
-\r
-               /**\r
-                * 指定された言語にそってメタデータごとに名前を設定します(Block版)\r
-                * また、配列の後ろに任意の文字列を追加できます。\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Block object,String lang, Object[] name, String string){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i] + string);\r
-                       }\r
-               }\r
-\r
-\r
-\r
-               /**\r
-                * 指定された言語にそってメタデータごとに名前を設定します(Item版)\r
-                * また、配列の後ろに任意の文字列を追加できます。\r
-                * @param object\r
-                * @param name\r
-                */\r
-               public void addName(Item object,String lang, Object[] name, String string){\r
-                       for(int i=0;i<name.length;i++){\r
-                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i] + string);\r
-                       }\r
-               }\r
-\r
-       }\r
-\r
-       public static class ArrayAuxiliary{\r
-\r
-               public ItemStack[] deleteNull(ItemStack[] array){\r
-                       int count = 0;\r
-                       ItemStack[] arrayCopy;\r
-                       for(int i = 0;i < array.length;i++){\r
-                               if(array[array.length - 1 - i] == null){\r
-                                       count++;\r
-                               }else{\r
-                                       break;\r
-                               }\r
-                       }\r
-                       arrayCopy = new ItemStack[array.length - count];\r
-                       for(int i = 0;i < arrayCopy.length;i++){\r
-                               arrayCopy[i] = array[i];\r
-                       }\r
-                       array = arrayCopy.clone();\r
-                       return array;\r
-               }\r
-\r
-       }\r
-\r
-}\r
+package chemicraft.util;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+
+public class Auxiliary {
+
+       /**
+        * 補助クラス
+        * @author mozipi
+        *
+        */
+       public static class NameAuxiliary {
+
+               /**
+                * 名前を設定します
+                * @param object
+                * @param Name
+                */
+               public void addName(Object object,Object name){
+                       LanguageRegistry.addName(object, (String) name);
+               }
+
+
+
+               /**
+                * 名前を設定します(ItemStack版)
+                * @param object
+                * @param name
+                * @param meta
+                */
+               public void addName(ItemStack itemstack,Object name){
+                       LanguageRegistry.addName(itemstack, (String) name);
+               }
+
+
+
+               /**
+                * 指定言語にそって名前を追加します
+                * @param object
+                * @param lang
+                * @param name
+                */
+               public void addName(Object object,String lang,Object name){
+                       LanguageRegistry.instance().addNameForObject(object, lang, (String) name);
+               }
+
+
+
+               /**
+                * 指定言語にそって名前を追加します(ItemStack版)
+                * @param object
+                * @param lang
+                * @param name
+                */
+               public void addName(ItemStack object,String lang,Object name){
+                       LanguageRegistry.instance().addNameForObject(object, lang, (String) name);
+               }
+
+
+
+               /**
+                * メタデータごとに名前を追加します(Block版)
+                * @param object
+                * @param name
+                */
+               public void addName(Block object,Object[] name){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);
+                       }
+               }
+
+
+
+               /**
+                * メタデータごとに名前を追加します(Item版)
+                * @param object
+                * @param name
+                */
+               public void addName(Item object,Object[] name){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.addName(new ItemStack(object,0,i), (String) name[i]);
+                       }
+               }
+
+
+
+               /**
+                * 指定された言語にそってメタデータごとに名前を設定します(Block版)
+                * @param object
+                * @param name
+                */
+               public void addName(Block object,String lang,Object[] name){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);
+                       }
+               }
+
+
+
+               /**
+                * 指定された言語にそってメタデータごとに名前を設定します(Item版)
+                * @param object
+                * @param name
+                */
+               public void addName(Item object,String lang, Object[] name){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i]);
+                       }
+               }
+
+               /**
+                * 指定された言語にそってメタデータごとに名前を設定します(Block版)
+                * また、配列の前に任意の文字列を追加できます。
+                * @param object
+                * @param name
+                */
+               public void addName(Block object,String lang, String string, Object[] name){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, string + (String) name[i]);
+                       }
+               }
+
+
+
+               /**
+                * 指定された言語にそってメタデータごとに名前を設定します(Item版)
+                * また、配列の前に任意の文字列を追加できます。
+                * @param object
+                * @param name
+                */
+               public void addName(Item object,String lang, String string, Object[] name){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, string + (String) name[i]);
+                       }
+               }
+
+               /**
+                * 指定された言語にそってメタデータごとに名前を設定します(Block版)
+                * また、配列の後ろに任意の文字列を追加できます。
+                * @param object
+                * @param name
+                */
+               public void addName(Block object,String lang, Object[] name, String string){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i] + string);
+                       }
+               }
+
+
+
+               /**
+                * 指定された言語にそってメタデータごとに名前を設定します(Item版)
+                * また、配列の後ろに任意の文字列を追加できます。
+                * @param object
+                * @param name
+                */
+               public void addName(Item object,String lang, Object[] name, String string){
+                       for(int i=0;i<name.length;i++){
+                               LanguageRegistry.instance().addNameForObject(new ItemStack(object,0,i), lang, (String) name[i] + string);
+                       }
+               }
+
+       }
+
+       public static class ArrayAuxiliary{
+
+               public ItemStack[] deleteNull(ItemStack[] array){
+                       int count = 0;
+                       ItemStack[] arrayCopy;
+                       for(int i = 0;i < array.length;i++){
+                               if(array[array.length - 1 - i] == null){
+                                       count++;
+                               }else{
+                                       break;
+                               }
+                       }
+                       arrayCopy = new ItemStack[array.length - count];
+                       for(int i = 0;i < arrayCopy.length;i++){
+                               arrayCopy[i] = array[i];
+                       }
+                       array = arrayCopy.clone();
+                       return array;
+               }
+
+       }
+
+}
index 9e2ac27..745bc2c 100644 (file)
@@ -1,53 +1,53 @@
-package chemicraft.util;\r
-\r
-import net.minecraft.entity.Entity;\r
-import net.minecraft.entity.player.EntityPlayer;\r
-import net.minecraft.item.ItemStack;\r
-import net.minecraft.world.World;\r
-\r
-public interface ICompoundHandler {\r
-\r
-       /**\r
-        * 右クリック時のHandler\r
-        * @param par1ItemStack\r
-        * @param par2World\r
-        * @param par3EntityPlayer\r
-        * @return\r
-        */\r
-       public ItemStack onItemRightClickHandler(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer);\r
-\r
-\r
-       /**\r
-        * Itemを使用したときのHandler\r
-        * @param par1ItemStack\r
-        * @param par2EntityPlayer\r
-        * @param par3World\r
-        * @param par4\r
-        * @param par5\r
-        * @param par6\r
-        * @param par7\r
-        * @param par8\r
-        * @param par9\r
-        * @param par10\r
-        * @return\r
-        */\r
-       public boolean onItemUseHandler(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10);\r
-\r
-\r
-       /**\r
-        * 毎Tick呼ばれるHandler\r
-        * @param par1ItemStack\r
-        * @param par2World\r
-        * @param par3Entity\r
-        * @param par4\r
-        * @param par5\r
-        */\r
-       public void onUpdateHandler(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5);\r
-\r
-       /**\r
-        * iconIndexの指定\r
-        * @return iconIndex\r
-        */\r
-       public int getIconIndexHandler();\r
-\r
-}\r
+package chemicraft.util;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public interface ICompoundHandler {
+
+       /**
+        * 右クリック時のHandler
+        * @param par1ItemStack
+        * @param par2World
+        * @param par3EntityPlayer
+        * @return
+        */
+       public ItemStack onItemRightClickHandler(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer);
+
+
+       /**
+        * Itemを使用したときのHandler
+        * @param par1ItemStack
+        * @param par2EntityPlayer
+        * @param par3World
+        * @param par4
+        * @param par5
+        * @param par6
+        * @param par7
+        * @param par8
+        * @param par9
+        * @param par10
+        * @return
+        */
+       public boolean onItemUseHandler(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10);
+
+
+       /**
+        * 毎Tick呼ばれるHandler
+        * @param par1ItemStack
+        * @param par2World
+        * @param par3Entity
+        * @param par4
+        * @param par5
+        */
+       public void onUpdateHandler(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5);
+
+       /**
+        * iconIndexの指定
+        * @return iconIndex
+        */
+       public int getIconIndexHandler();
+
+}
index c1cd215..5b856df 100644 (file)
@@ -26,14 +26,14 @@ public class ClientProxy extends CommonProxy {
 
        @Override
        public void registerRenderInformation() {
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.blockChemicalCraftingTableTexture);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.itemAtomsTexture);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.itemCompoundsTexture);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.itemTexture);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.guiChemicalCombinationTexture);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.guiPyrolysisTexture);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.guiChemicalCraftingTexture);
-               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.guiToolAndWeaponCraftingTexture);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.BLOCKCHEMICALCRAFTINGTABLETEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEMATOMSTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEMCOMPOUNDSTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.ITEMTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUICHEMICALCOMBINATIONTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUIPYROLYSISTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUICHEMICALCRAFTINGTEXTURE);
+               MinecraftForgeClient.preloadTexture(ChemiCraft.instance.GUITOOLANDWEAPONCRAFTINGTEXTURE);
                RenderingRegistry.registerEntityRenderingHandler(EntityAtomsGrenade.class, new RenderAtomsGrenade(0.5F));
        }