});\r
\r
// 化合物を追加します\r
- ChemiCraftAPI.getInstance().addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");\r
- ChemiCraftAPI.getInstance().addLangCompound("ja_JP", "Water", "水");\r
+ api.addLangCompound("ja_JP", "CarbonDioxide", "二酸化炭素");\r
+ api.addLangCompound("ja_JP", "Water", "水");\r
\r
//化合物のHandlerを設定します\r
- ChemiCraftAPI.getInstance().settingCompoundHandler("Water", new CompoundWater());\r
+ api.settingCompoundHandler("Water", new CompoundWater());\r
+\r
+ //化合物のレシピを追加します\r
+ api.addChemicalCombinationRecipe(new String[]{"H", "O"}, new Integer[]{2, 1}, new ItemStack(this.itemCompounds, 1, 1));\r
\r
//手榴弾の追加\r
- ChemiCraftAPI.getInstance().addMaterialRecipe(\r
+ api.addMaterialRecipe(\r
new ItemStack[]{\r
null,\r
new ItemStack(Block.stone),\r
}\r
\r
private void debug(final FMLPostInitializationEvent event) {\r
- //デバッグ処理\r
- api.addChemicalCombinationRecipe(\r
- new String[]{ChemiCraftData.HYDROGEN_SIGN, ChemiCraftData.OXYGEN_SIGN},\r
- new Integer[]{2, 1},\r
- new ItemStack(Block.dirt)\r
- );\r
}\r
\r
}
\ No newline at end of file
@Override
public ItemStack slotClick(int par1, int par2, boolean par3, EntityPlayer par4EntityPlayer) {
- if (par1 == 16) {
+ if (par1 == 15) {
if (this.invr.getStackInSlot(0) != null) {
this.tileentity.emptytoAtomsList();
- return super.slotClick(par1, par2, par3, par4EntityPlayer);
}
}
return super.slotClick(par1, par2, par3, par4EntityPlayer);
import net.minecraft.src.NBTTagList;
import net.minecraft.src.Packet;
import net.minecraft.src.TileEntity;
+import net.minecraft.src.WorldServer;
import chemicraft.ChemiCraft;
import chemicraft.ChemiCraftData;
import chemicraft.inventory.InventoryChemicalCombinationTableMaterial;
this.isProvidePower = false;
PacketDispatcher.sendPacketToAllPlayers(this.getDescriptionPacket());
}
+ if (this.worldObj instanceof WorldServer) {
+ System.out.println(this.atomsList + ":Server");
+ System.out.println(this.atomsAmountList + ":Server");
+ } else {
+ System.out.println(this.atomsList + ":Client");
+ System.out.println(this.atomsAmountList + ":Client");
+ }
}
@Override
this.atomsList.add(par1);
this.atomsAmountList.add(par2);
}
+ PacketDispatcher.sendPacketToAllPlayers(this.getDescriptionPacket());
}
public void setDropItems(ItemStack par1ItemStack){