-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path500ise_blocktest.js
More file actions
32 lines (31 loc) · 975 Bytes
/
Copy path500ise_blocktest.js
File metadata and controls
32 lines (31 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//initialize
var initialized = false;
var RENDER_LADDER = 8;
var RENDER_NORMAL = 0;
var VINE_ID = 187;
function selectLevelHook() {
if (!initialized) {
//TEMP API: Will change
//params:
//block ID, name, texture array (either a single integer array, or a multiple of 6)
//material block ID (to copy material from; e.g stone material = 1
//is opaque
//render type
//e.g. the following call defines a block with ID 187,
//block name "Vine",
//texture of 5,4,3,2,1,0 for all damage values
//using material from dirt (NOT WORKING YET)
//not opaque (i.e. transparent to light) (NOT WORKING YET)
//render type of 10 (NOT WORKING YET)
Block.defineBlock(VINE_ID, "Evil dirt", [5, 4, 3, 2, 1, 0], 2, false, 10);
Block.setLightLevel(VINE_ID, 15);
Block.setDestroyTime(VINE_ID, 1);
initialized = true;
print("Init");
}
}
function useItem(x, y, z, itemId, blockId, side) {
//preventDefault();
//setTile(x, y, z, 187);
addItemInventory(187, 1);
}