Examples: Crafting table
Textures
Block
/* myCraftingTable.js */
id = config.getBlockId("myCraftingTableId");
name = "myCraftingTable";
creativeTab = "decorations";
textureFile = "myBlocks.png";
material = "wood";
displayName[0] = "My Crafting Table";
addToCreative[0] = true;
hardness[0] = 1.5;
resistance[0] = 5.0;
textureIndexYP[0] = 4
textureIndexYN[0] = 3
textureIndexXP[0] = 3
textureIndexXN[0] = 3
textureIndexZP[0] = 3
textureIndexZN[0] = 3
onActivated[0] = "player.openGui('myCraftingTableGUI', position); result = true;";
id = config.getBlockId("myCraftingTableId");
name = "myCraftingTable";
creativeTab = "decorations";
textureFile = "myBlocks.png";
material = "wood";
displayName[0] = "My Crafting Table";
addToCreative[0] = true;
hardness[0] = 1.5;
resistance[0] = 5.0;
textureIndexYP[0] = 4
textureIndexYN[0] = 3
textureIndexXP[0] = 3
textureIndexXN[0] = 3
textureIndexZP[0] = 3
textureIndexZN[0] = 3
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");