-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminecraft.js
More file actions
43 lines (37 loc) · 1.27 KB
/
minecraft.js
File metadata and controls
43 lines (37 loc) · 1.27 KB
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
33
34
35
36
37
38
39
40
41
42
43
import "./globalVeriable.js";
window.addEventListener("contextmenu", e => { if (e.cancelable) e.preventDefault(); }, true);
const updatePixelRatio = () => {
let dpr = window.devicePixelRatio;
document.documentElement.style.setProperty("--device-pixel-ratio", dpr);
window.dispatchEvent(new Event("dprchange"));
matchMedia(`(resolution: ${dpr}dppx)`).addEventListener("change", updatePixelRatio, { once: true });
};
updatePixelRatio();
import "./UI.js";
import "./processingPictures.js";
localStorage.setItem("mcStorageVer", "v0.0.0");
/*
mcStorageVer v0.0.0:
localStorage: {
mcStorageVer: 储存格式的版本,
worlds: {
[storageID 一般情况下等于数字型的种子]: {
chunks: {
[chunkID]: {
存放的是和生成出来的原始地形有差异的方块ID
[linearBlockIndex]: longID, ...
}, ...
},
entities: [{
实体的信息
}, ...],
mainPlayer: 实体的uid,
name: 世界的名称,
seed: 世界的种子,
type: 世界的类型,
createAt: 创建世界时的时间戳,
modityAt: 最后一次修改世界时的时间戳,
}, ...
},
}
*/