import pcc.chemicraft.ChemiCraftConfiguration;
import pcc.chemicraft.ChemiCraftRegister;
import pcc.chemicraft.base.creativetab.CreativeTabAtomOres;
+import pcc.chemicraft.base.gen.WorldGenAtomsOre;
import pcc.chemicraft.base.system.CommonProxy;
import pcc.chemicraft.base.system.PacketHandler;
import pcc.chemicraft.core.ChemiCraftAPI;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
+import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = "ChemiCraftBase", name = "ChemiCraftBase", version = "beta")
@NetworkMod(clientSideRequired = true, serverSideRequired = true, versionBounds = "1.4.6", channels = "chemicraftbase", packetHandler = PacketHandler.class)
{
this.nameAuxiliary.addName(new ItemStack(blockAtomOres[i / 16], 0, i - i / 16 * 16), apiBase.getAtomOresLanguage().get(apiBase.getAtomOresName().getKeyList(i), j), apiBase.getAtomOresName().get(apiBase.getAtomOresName().getKeyList(i), j));
OreDictionary.registerOre("ore" + apiBase.getAtomOresName().getKeyList(i), new ItemStack(blockAtomOres[i / 16], 1, i - i / 16 * 16));
+ GameRegistry.registerWorldGenerator(apiBase.getAtomOres().get(i));
}
}
import pcc.chemicraft.base.gen.EnumOreSpawnFrequency;
import pcc.chemicraft.base.gen.WorldGenAtomsOre;
+import pcc.chemicraft.util.AtomInfo;
import pcc.chemicraft.util.Formula;
import pcc.chemicraft.util.ListHash;
/*
* 既存物のレシピ
*/
- this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.dirt), new Formula("SiI2O2"));
- this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.sand), new Formula("SiIO"));
+ // Block
this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.stone), new Formula("SiO2"));
- this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.glass), new Formula("SiCO2"));
- this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal), new Formula("C"));
- this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal), new Formula("C"));
- this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.bucketWater), new Formula("H2O"));
+ this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.dirt), new Formula("SiI2O2"));
this.mod.api.addReversibleOfElectrolysis(new ItemStack(Block.wood), new Formula("C6H10O5"));
+ this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.glass), new Formula("SiCO2"));
this.mod.api.addReversibleOfPyrolysis(new ItemStack(Block.tnt), new Formula("C7H5N3O6"));
- this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald), new Formula("Be3Al2Si6O18"));
+
+ // Item
+ this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.bucketWater), new Formula("H2O"));
+ this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0), new Formula("H2O"));
+ this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.sugar), new Formula("C12H22O11"));
+
+ // 鉱石
+ this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Block.oreCoal), new Formula("C"));
+ this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(Item.coal), new Formula("C"));
this.mod.api.addChemicalCombinationRecipe(new ItemStack(Item.diamond), new Formula("C64Si16"));
+ this.mod.api.addReversibleOfPyrolysis(new ItemStack(Item.emerald), new Formula("Be3Al2Si6O18"));
/*
* 他Mod使用時レシピ
);
/*
- * 熱分解台のレシピ
+ * 分解台のレシピ
*/
- this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(Item.potion, 1, 0), new Formula("H2O"));
-
this.mod.api.addElectrolysisDecompositionRecipe(new ItemStack(ChemiCraftCore.instance.itemCompounds, 1, this.mod.api.getCompound("Water")),
new Formula("H2O"));
for (int i = 0; i < this.mod.apiBase.getAtomOresName().sizeKeysList(); i++){
this.mod.api.addPyrolysisDecompositionRecipe(new ItemStack(this.mod.blockAtomOres[i / 16], 1, i - i / 16 * 16),
- this.mod.apiBase.getAtomOresFormulas().get(this.mod.apiBase.getAtomOresName().getKeyList(i)));
+ this.mod.apiBase.getAtomOresFormulas().get(this.mod.apiBase.getAtomOresName().getKeyList(i)));
}
import net.minecraft.block.Block;
import net.minecraftforge.common.MinecraftForge;
+import pcc.chemicraft.base.gen.WorldGenAtomsOre;
import pcc.chemicraft.base.ore.BlockAtomOres;
import pcc.chemicraft.base.ore.ItemAtomOres;
import cpw.mods.fml.common.registry.GameRegistry;
MinecraftForge.setBlockHarvestLevel(this.mod.blockAtomOres[i], "pickaxe", 2);
}
- /*
- * Minecraftに登録
- */
-
-
- /*
- * 名前登録
- */
-
-
}
}
{
// 元素入手手段
- //鉱石郡
+ // 鉱石群
for (int i = 0; i < this.mod.chemicalData.ATOMSLIST.length; i++)
{
if (AtomInfo.isSolid(i + 1) && !AtomInfo.isLanthanoid(i + 1) && !AtomInfo.isActinoid(i + 1))
{
- String var1 = ChemiCraftCore.ATOMSNAME[i] + "Ore";
+ String var1 = ChemiCraftCore.ATOMSNAME[i] + " Ore";
this.mod.apiBase.addAtomOres(
var1,
new Formula(this.mod.chemicalData.ATOMSLIST[i]),
// ランタノイド鉱石
this.mod.apiBase.addAtomOres(
- "LanthanoidOre",
+ "Lanthanoid Ore",
new Formula("LaCePrNdPmSmEuGdTbDyHoErTmYbLu"),
this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
EnumOreSpawnFrequency.RARE);
// アクチノイド鉱石
this.mod.apiBase.addAtomOres(
- "ActinoidOre",
+ "Actinoid Ore",
new Formula("AcThPaUNpPuAmCmBkCfEsFmMdNoLr"),
this.mod.atomOresID[this.mod.apiBase.getAtomOresLastIndex()],
EnumOreSpawnFrequency.RARE);
/**
- * 電池
- */
- private HashMap<ItemStack, Integer> chemicalCellsList = new HashMap<ItemStack, Integer>();
-
-
- /**
- * 電池名リスト
- */
- private ListHash<String, String> chemicalCellsNameListHash = new ListHash<String, String>();
-
-
- /**
* 化合台の原子の数のリスト
*/
private ArrayList<Integer[]> chemicalCombinationAmounts = new ArrayList<Integer[]>();
/**
+ * 電気分解燃料のリスト。
+ */
+ private HashMap<ItemStack, Integer> electrolysisFuelList = new HashMap<ItemStack, Integer>();
+
+
+ /**
* 電気分解レシピのリスト
*/
private HashMap<ItemStack, ItemStack[]> electrolysisRecipeList = new HashMap<ItemStack, ItemStack[]>();
private ArrayList<Boolean> toolAndWeaponSharpless = new ArrayList<Boolean>();
- /**
- * 電池を追加します
- * @param par1Name
- */
- public void addChemicalCell(Item par1ChemicalCell, String par2Name, int par3OperationTime){
- chemicalCellsList.put(
- new ItemStack(
- par1ChemicalCell,
- 1,
- chemicalCellsNameListHash.sizeKeysList()),
- par3OperationTime);
- addChemicalCellLanguage(
- "en_US",
- par2Name);
- }
-
-
- /**
- * 既に登録した電池の新しい名前・言語を追加します
- * @param par1Name 英語名
- * @param par2NewName 新しい名前
- * @param par3Language 言語
- */
- public void addChemicalCellLanguage(String par1NewLanguage, String par2NewName){
- chemicalCellsNameListHash.add(par1NewLanguage, par2NewName);
- }
-
-
/**
* 化合レシピを追加します。materialの要素数は0<= n <= 16にしてください。
+ /**
+ * 電気分解台の燃料を追加します
+ * @param itemstack 燃料のItemStack
+ * @param burnTime 燃焼時間(tick * rate)
+ */
+ public void addElectrolysisDecompositionFuel(ItemStack itemstack, int burnTime) {
+ this.electrolysisFuelList.put(
+ itemstack,
+ burnTime);
+ }
+
+
+
public void addElectrolysisDecompositionRecipe(ArrayList<ItemStack> material, Formula formula) {
for (ItemStack item : material)
{
- public HashMap<ItemStack, Integer> getChemicalCellsList(){
- return chemicalCellsList;
- }
-
-
- public ListHash<String, String> getChemicalCellsName(){
- return chemicalCellsNameListHash;
- }
-
-
//以下システム関連//////////////////////////////////////////////////////
public ArrayList<Integer[]> getChemicalCombinationAmounts(){
+ public HashMap<ItemStack, Integer> getElectrolysisFuelList()
+ {
+ return electrolysisFuelList;
+ }
+
+
+
public HashMap<ItemStack, ItemStack[]> getElectrolysisRecipeList()
{
return electrolysisRecipeList;
import pcc.chemicraft.core.debug.CommandDeleteItem;
import pcc.chemicraft.core.debug.CommandGenDebugRoom;
import pcc.chemicraft.core.debug.CommandSetTile;
+import pcc.chemicraft.core.item.ItemChemiCell;
import pcc.chemicraft.core.system.CommonProxy;
import pcc.chemicraft.core.system.PacketHandler;
import cpw.mods.fml.common.Loader;
// GUIを追加します
NetworkRegistry.instance().registerGuiHandler(instance, proxy);
- //電池を追加します
- this.api.addChemicalCell(this.itemChemicalCells, "ChemicalCell", 1000);
- this.api.addChemicalCellLanguage("ja_JP", "化学電池");
-
this.api.addPyrolysisDecompositionFuel(new ItemStack(Item.coal), 2000*8);
}
private void apiProcessing(final FMLInitializationEvent event) {
- Iterator<String> langItr = this.api.getCompoundsName().keySet().iterator();
- while (langItr.hasNext()) {
- String lang = langItr.next();
+ Iterator<String> langcompoundsItr = this.api.getCompoundsName().keySet().iterator();
+ while (langcompoundsItr.hasNext()) {
+ String lang = langcompoundsItr.next();
ArrayList<String> names = this.api.getCompoundsName().get(lang);
for (int i = 0; i < names.size(); i++) {
LanguageRegistry.instance().addNameForObject(
}
}
- Iterator<String> langCellItr = this.api.getChemicalCellsName().keySet().iterator();
- while (langCellItr.hasNext()) {
- String langCell = langCellItr.next();
- ArrayList<String> names = this.api.getChemicalCellsName().get(langCell);
- for (int i = 0; i < names.size(); i++) {
- LanguageRegistry.instance().addNameForObject(
- new ItemStack(this.itemChemicalCells, 1, i),
- langCell,
- names.get(i));
- }
- }
-
}
setResistance(0.0F).
setStepSound(Block.soundStoneFootstep).
setBlockName("ChemicalCombinationTable");
+ /*
this.mod.blockToolAndWeaponCraftingTable = new BlockToolAndWeaponCraftingTable(this.mod.toolAndWeaponCraftingTableID, 3, Material.ground).
setHardness(2.0F).
setResistance(0.0F).
setStepSound(Block.soundStoneFootstep).
setBlockName("ToolAndWeaponCraftingTable");
+ */
this.mod.blockChemicalCraftingTable = new BlockChemicalCraftingTable(this.mod.chemicalCraftingTableID, 4, Material.ground).
setHardness(2.0F).
setResistance(0.0F).
*/
GameRegistry.registerBlock(this.mod.blockPyrolysisTable, "BlockPyrolysisTable");
GameRegistry.registerBlock(this.mod.blockChemicalCombinationTable, "BlockChemicalCombinationTable");
- GameRegistry.registerBlock(this.mod.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
+ // GameRegistry.registerBlock(this.mod.blockToolAndWeaponCraftingTable, "BlockToolAndWeaponCraftingTable");
GameRegistry.registerBlock(this.mod.blockChemicalCraftingTable, "BlockMaterialCraftingTable");
GameRegistry.registerBlock(this.mod.blockElectrolysisTable, "BlockElectrolysisTable");
this.mod.nameAuxiliary.addName(this.mod.blockPyrolysisTable, "ja_JP", "熱分解台");
this.mod.nameAuxiliary.addName(this.mod.blockChemicalCombinationTable, "ChemicalCombinationTable");
this.mod.nameAuxiliary.addName(this.mod.blockChemicalCombinationTable, "ja_JP", "化合台");
- this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
- this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
+ // this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ToolAndWeaponCraftingTable");
+ // this.mod.nameAuxiliary.addName(this.mod.blockToolAndWeaponCraftingTable, "ja_JP", "ツール&武器製作台");
this.mod.nameAuxiliary.addName(this.mod.blockChemicalCraftingTable, "ChemicalCraftingTable");
this.mod.nameAuxiliary.addName(this.mod.blockChemicalCraftingTable, "ja_JP", "素材製作台");
this.mod.nameAuxiliary.addName(this.mod.blockElectrolysisTable, "ElectrolysisTable");
Character.valueOf('A'), new ItemStack(Block.obsidian),
});
+ /*
GameRegistry.addRecipe(new ItemStack(this.mod.blockToolAndWeaponCraftingTable),
new Object[]{
"XYX", "ZAZ", "ZZZ",
Character.valueOf('Z'), new ItemStack(Block.stone),
Character.valueOf('A'), new ItemStack(Item.pickaxeSteel),
});
+ */
GameRegistry.addRecipe(new ItemStack(this.mod.blockChemicalCraftingTable),
new Object[]{
/*
* 素材制作代のレシピ
*/
-
//化学電池の追加
this.mod.api.addMaterialRecipe(new ItemStack[] {
null,
this.mod.nameAuxiliary.addName(this.mod.itemAtoms, "ja_JP", ChemiCraftCore.ATOMSNAMEJP);
this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "GasCollectingBottle");
this.mod.nameAuxiliary.addName(this.mod.itemGasCollectingBottle, "ja_JP", "集気瓶");
+ this.mod.nameAuxiliary.addName(this.mod.itemChemicalCells, "ChemicalCell");
+ this.mod.nameAuxiliary.addName(this.mod.itemChemicalCells, "ja_JP", "化学電池");
+ this.mod.api.addElectrolysisDecompositionFuel(new ItemStack(this.mod.itemChemicalCells), 1000);
this.mod.nameAuxiliary.addName(this.mod.itemPear, "Pear");
this.mod.nameAuxiliary.addName(this.mod.itemPear, "ja_JP", "梨");
{
super(par1);
this.maxStackSize = 64;
- this.setHasSubtypes(true);
- this.setMaxDamage(0);
this.setCreativeTab(ChemiCraftCore.instance.creativeTabChemiCraft);
}
@Override
- public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List){
- for(int type = 0; type < ChemiCraftAPI.instance().getChemicalCellsName().sizeKeysList(); type++)
- {
- par3List.add(new ItemStack(par1, 1, type));
- this.setIconIndex(type);
- }
- }
-
-
-
- @Override
- public String getItemNameIS(ItemStack par1ItemStack){
- return super.getItemName() + "." + ChemiCraftAPI.instance().getChemicalCellsName().getKeyList(par1ItemStack.getItemDamage());
- }
-
-
-
- @Override
public String getTextureFile(){
return ChemiCraft.ITEM_TEXTURE;
}
if (itemstackMaterial.itemID == materialItem.itemID && itemstackMaterial.getItemDamage() == materialItem.getItemDamage()) {
var1 = true;
if (this.fuelRestTime <= 0) {
- Iterator<ItemStack> itFuel = ChemiCraftAPI.instance().getChemicalCellsList().keySet().iterator();
+ Iterator<ItemStack> itFuel = ChemiCraftAPI.instance().getElectrolysisFuelList().keySet().iterator();
while (itFuel.hasNext()) {
ItemStack itemstackFuel = itFuel.next();
ItemStack fuelItem = this.invf.getStackInSlot(0);
if (fuelItem != null) {
if (itemstackFuel.itemID == fuelItem.itemID && itemstackFuel.getItemDamage() == fuelItem.getItemDamage()) {
- this.fuelRestTime = ChemiCraftAPI.instance().getChemicalCellsList().get(itemstackFuel);
+ this.fuelRestTime = ChemiCraftAPI.instance().getElectrolysisFuelList().get(itemstackFuel);
if (fuelItem.stackSize > 1) {
this.invf.setInventorySlotContents(0, new ItemStack(fuelItem.itemID, --fuelItem.stackSize, fuelItem.getItemDamage()));
break;
package pcc.chemicraft.util;
+import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
+import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+ public static boolean isExisting(String par1){
+ return false;
+ }
+
+
+
/**
* 引数に指定されたBiomeと同等か比較します
* @param biomeName 比較するBiomeの名前