Examples: Crafting table
Textures
Block
/* myCraftingTable.js */
id = config.getBlockId("myCraftingTableId");
name = "myCraftingTable";
creativeTab = "decorations";
material = "wood";
displayName[0] = "My Crafting Table";
addToCreative[0] = true;
hardness[0] = 1.5;
resistance[0] = 5.0;
textureIndexYP[0] = "craftingTableTop.png";
textureIndexYN[0] = "craftingTableSide.png";
textureIndexXP[0] = "craftingTableSide.png";
textureIndexXN[0] = "craftingTableSide.png";
textureIndexZP[0] = "craftingTableSide.png";
textureIndexZN[0] = "craftingTableSide.png";
onActivated[0] = "player.openGui('myCraftingTableGUI', position); result = true;";
id = config.getBlockId("myCraftingTableId");
name = "myCraftingTable";
creativeTab = "decorations";
material = "wood";
displayName[0] = "My Crafting Table";
addToCreative[0] = true;
hardness[0] = 1.5;
resistance[0] = 5.0;
textureIndexYP[0] = "craftingTableTop.png";
textureIndexYN[0] = "craftingTableSide.png";
textureIndexXP[0] = "craftingTableSide.png";
textureIndexXN[0] = "craftingTableSide.png";
textureIndexZP[0] = "craftingTableSide.png";
textureIndexZN[0] = "craftingTableSide.png";
onActivated[0] = "player.openGui('myCraftingTableGUI', position); result = true;";
GUI
/* myCraftingTableGUI.js */
name = "myCraftingTableGUI";
name = "myCraftingTableGUI";
mod.js
config.addBlockIdProperty("myCraftingTableId", 1501);
mod.addGui("myCraftingTableGUI.js", "crafting");
mod.addBlock("myCraftingTable.js", "normal");
mod.addGui("myCraftingTableGUI.js", "crafting");
mod.addBlock("myCraftingTable.js", "normal");