void LuckyBlocks::initBlocks() { luckyBlock = new LuckyBlock("lucky_block", getNewRandomBlockID()); luckyBlockItem = new LuckyBlockItem(luckyBlock->getDescriptionId(), luckyBlock->blockId - 0x100); registerBlock(luckyBlock, luckyBlockItem); dropperBlock = new DropperBlock("dropper", 158); registerBlock(dropperBlock, new BlockItem(dropperBlock->getDescriptionId(), 158 - 0x100););
void tnt_init() { blockEntry entry; entry.renderBlock = render; registerBlock(46, entry); tex_tnt_top = getTexture(9, 0); tex_tnt_bott = getTexture(10, 0); tex_tnt_side = getTexture(8, 0); }
Block * createBlock(int x, int y, int z) { Block* newBlock; newBlock = calloc(1, sizeof(Block)); if (newBlock == NULL) return newBlock; newBlock->id = nextBlockId++; newBlock->x = x; newBlock->y = y; newBlock->z = z; newBlock->simLEDr = 120; newBlock->simLEDg = 120; newBlock->simLEDb = 120; newBlock->simLEDi = 200; newBlock->msgTargetsDelta = 0; newBlock->msgTargets = 0; newBlock->destroyed = 0; newBlock->localTime = globalTimeStamp; newBlock->lastSimTime = globalTimeStamp-1; int i; for (i=0; i<NUM_PORTS; i++) { newBlock->neighborhood[i] = NULL; } //fprintf(stderr, "made block, inserting into Q\n"); registerBlock(newBlock); msg2vm(newBlock, CMD_CREATE, newBlock->localTime, 1, newBlock->id); return newBlock; }
void leaves_init() { blockEntry entry; entry.renderBlock = render; registerBlock(18, entry); tex_leaves = getTexture(6, 1); }
void cloth_green_init() { blockEntry entry; entry.renderBlock = render; registerBlock(25, entry); tex_cloth_green = getTexture(4, 4); }
void cloth_yellow_init() { blockEntry entry; entry.renderBlock = render; registerBlock(23, entry); tex_cloth_yellow = getTexture(2, 4); }
void ore_coal_init() { blockEntry entry; entry.renderBlock = render; registerBlock(16, entry); tex_ore_coal = getTexture(2, 2); }
void bedrock_init() { blockEntry entry; entry.renderBlock = render; registerBlock(7, entry); tex_bedrock = getTexture(1, 1); }
void ore_gold_init() { blockEntry entry; entry.renderBlock = render; registerBlock(14, entry); tex_ore_gold = getTexture(0, 2); }
void cloth_white_init() { blockEntry entry; entry.renderBlock = render; registerBlock(36, entry); tex_cloth_white = getTexture(15, 4); }
void sponge_init() { blockEntry entry; entry.renderBlock = render; registerBlock(19, entry); tex_sponge = getTexture(0, 3); }
void cloth_orange_init() { blockEntry entry; entry.renderBlock = render; registerBlock(22, entry); tex_cloth_orange = getTexture(1, 4); }
void ore_iron_init() { blockEntry entry; entry.renderBlock = render; registerBlock(15, entry); tex_ore_iron = getTexture(1, 2); }
void brick_init() { blockEntry entry; entry.renderBlock = render; registerBlock(45, entry); tex_brick = getTexture(7, 0); }
void cloth_pink_init() { blockEntry entry; entry.renderBlock = render; registerBlock(33, entry); tex_cloth_pink = getTexture(11, 4); }
void cloth_red_init() { blockEntry entry; entry.renderBlock = render; registerBlock(21, entry); tex_cloth_red = getTexture(0, 4); }