-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblocks.js
More file actions
30 lines (27 loc) · 707 Bytes
/
Copy pathblocks.js
File metadata and controls
30 lines (27 loc) · 707 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
const blocks = {
bedrock: '#010101',
fire: 'rgba(255, 0, 0, 0.7)',
stone: '#807E79',
iron: '#61666A',
power_iron: 'rgba(255, 0, 0, 0.7)',
wood: '#9F763B',
dirt: '#AE9A73',
water: 'rgba(0,72,151,0.5)',
cloud: 'rgba(255,255,255,0.7)',
leaves: 'rgba(100, 200, 50, 0.8)',
};
let BLOCK_INTS = {};
let BLOCK_COLORS = [];
Object.keys(blocks).forEach((block, i) => {
BLOCK_INTS[block] = i;
BLOCK_COLORS[i] = blocks[block];
});
export { BLOCK_INTS, BLOCK_COLORS };
export function isShadowProductingBlock(obj) {
return (
obj !== BLOCK_INTS.bedrock &&
obj !== BLOCK_INTS.cloud &&
obj !== false &&
obj !== BLOCK_INTS.fire
);
}