Examples: Chest
Textures
Block
/* myChest.js */
id = config.getBlockId("myChestId");
name = "myChest";
creativeTab = "decorations";
material = "wood";
displayName[0] = "My Chest";
addToCreative[0] = true;
hardness[0] = 1.5;
resistance[0] = 5.0;
onActivated[0] = "player.openGui('myChestGUI', position); result = true;";
hasTileEntity[0] = true;
tileEntity[0] = "myChestTE";
modelTexture = "myChest.png";
textureFileYP[0] = "chest.png";
textureFileYN[0] = "chest.png";
textureFileXP[0] = "chest.png";
textureFileXN[0] = "chest.png";
textureFileZP[0] = "chest.png";
textureFileZN[0] = "chest.png";
id = config.getBlockId("myChestId");
name = "myChest";
creativeTab = "decorations";
material = "wood";
displayName[0] = "My Chest";
addToCreative[0] = true;
hardness[0] = 1.5;
resistance[0] = 5.0;
onActivated[0] = "player.openGui('myChestGUI', position); result = true;";
hasTileEntity[0] = true;
tileEntity[0] = "myChestTE";
modelTexture = "myChest.png";
textureFileYP[0] = "chest.png";
textureFileYN[0] = "chest.png";
textureFileXP[0] = "chest.png";
textureFileXN[0] = "chest.png";
textureFileZP[0] = "chest.png";
textureFileZN[0] = "chest.png";
GUI
/* myChestGUI.js */
name = "myChestGUI";
guiFile = "myChestGUI.png";
chestX = 8;
chestY = 8;
inventoryX = 8;
inventoryY = 94;
height = 176;
width = 176;
name = "myChestGUI";
guiFile = "myChestGUI.png";
chestX = 8;
chestY = 8;
inventoryX = 8;
inventoryY = 94;
height = 176;
width = 176;
Tile Entity
/* myChestTE.js */
name = "myChestTE";
colLength = 4;
rowLength = 9;
name = "myChestTE";
colLength = 4;
rowLength = 9;
mod.js
config.addBlockIdProperty("myChestId", 1502);
mod.addTileEntity("myChestTE.js", "chest");
mod.addGui("myChestGUI.js", "chest");
mod.addBlock("myChest.js", "chest");
mod.addTileEntity("myChestTE.js", "chest");
mod.addGui("myChestGUI.js", "chest");
mod.addBlock("myChest.js", "chest");