@Mod.PostInit\r
public void chemiPostLoadMethod(FMLPostInitializationEvent event) {\r
// API用の処理\r
- this.NameAuxiliary.addName(itemCompounds, ChemiCraftAPI.getCompoundsName().toArray());\r
- this.NameAuxiliary.addName(itemCompounds, "ja_JP", ChemiCraftAPI.getCompoundsLangName().toArray());\r
+ this.NameAuxiliary.addName(itemCompounds, ChemiCraftAPI.instance.getCompoundsName().toArray());\r
+ this.NameAuxiliary.addName(itemCompounds, "ja_JP", ChemiCraftAPI.instance.getCompoundsLangName().toArray());\r
\r
// Blockを追加します\r
this.blockDecompositionTable = new BlockDecompositionTable(this.decompositionTableID, 0, Material.ground).setHardness(2.0F).setResistance(0.0F).setStepSound(Block.soundStoneFootstep).setBlockName("DecompositionTable");\r
@Override
public void onCraftMatrixChanged(IInventory par1IInventory){
- for(int i = 0;i < ChemiCraftAPI.getCraftingManager().getDecompositionResults(this.inv).length;i++){
- this.inv.setInventorySlotContents(i, ChemiCraftAPI.getCraftingManager().getDecompositionResults(this.inv)[i]);
+ for(int i = 0;i < ChemiCraftAPI.instance.getCraftingManager().getDecompositionResults(this.inv).length;i++){
+ this.inv.setInventorySlotContents(i, ChemiCraftAPI.instance.getCraftingManager().getDecompositionResults(this.inv)[i]);
}
this.inv.setFlag(true);
}
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5){
- for(int i=0;i < ChemiCraftAPI.getCompoundsName().size();i++){
- for(int j=0;j < ChemiCraftAPI.getCompoundHandlerItemName().size();j++){
- if(ChemiCraftAPI.getCompoundsName().get(i).equals(ChemiCraftAPI.getCompoundHandlerItemName().get(i))){
- ChemiCraftAPI.getCompoundHandler().get(j).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
+ for(int i=0;i < ChemiCraftAPI.instance.getCompoundsName().size();i++){
+ for(int j=0;j < ChemiCraftAPI.instance.getCompoundHandlerItemName().size();j++){
+ if(ChemiCraftAPI.instance.getCompoundsName().get(i).equals(ChemiCraftAPI.instance.getCompoundHandlerItemName().get(i))){
+ ChemiCraftAPI.instance.getCompoundHandler().get(j).onUpdateHandler(par1ItemStack, par2World, par3Entity, par4, par5);
}
}
}
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List){
- for(int type = 0; type < ChemiCraftAPI.getCompoundsName().toArray().length; type++)
+ for(int type = 0; type < ChemiCraftAPI.instance.getCompoundsName().toArray().length; type++)
{
par3List.add(new ItemStack(par1, 1, type));
this.setIconIndex(type);
@Override
public String getItemNameIS(ItemStack par1ItemStack){
- return super.getItemName() + "." + ChemiCraftAPI.getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
+ return super.getItemName() + "." + ChemiCraftAPI.instance.getCompoundsName().toArray()[par1ItemStack.getItemDamage()];
}