-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathauto_antixray.py
More file actions
83 lines (69 loc) · 2.03 KB
/
auto_antixray.py
File metadata and controls
83 lines (69 loc) · 2.03 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
from utils import *
script_license()
hide_air_block = ask("隐藏空气中的矿石(可能会导致性能问题)")
def hide_air(config):
if hide_air_block:
config["anticheat"]["anti-xray"]["hidden-blocks"].append("air")
def antixray_config(config):
config["anticheat"] = {"anti-xray": {}}
@handler(r'config/paper-world-defaults.yml')
def config_paper_world(paper):
antixray_config(paper)
paper["anticheat"]["anti-xray"] = {
"enabled": True,
"engine-mode": 1,
"hidden-blocks": [
"chest",
"coal_ore",
"deepslate_coal_ore",
"copper_ore",
"deepslate_copper_ore",
"raw_copper_block",
"diamond_ore",
"deepslate_diamond_ore",
"emerald_ore",
"deepslate_emerald_ore",
"gold_ore",
"deepslate_gold_ore",
"iron_ore",
"deepslate_iron_ore",
"raw_iron_block",
"lapis_ore",
"deepslate_lapis_ore",
"redstone_ore",
"deepslate_redstone_ore"
],
"lava-obscures": False,
"max-block-height": 64,
"replacement-blocks": [],
"update-radius": 2,
"use-permission": False
}
hide_air(paper)
@handler(r'world_nether/paper-world.yml')
def config_paper_nether(paper):
antixray_config(paper)
paper["anticheat"]["anti-xray"] = {
"enabled": True,
"engine-mode": 1,
"hidden-blocks": [
"ancient_debris",
"nether_gold_ore",
"nether_quartz_ore"
],
"lava-obscures": False,
"max-block-height": 128,
"replacement-blocks": [],
"update-radius": 2,
"use-permission": False
}
hide_air(paper)
@handler(r'world_the_end/paper-world.yml')
def config_paper_end(paper):
antixray_config(paper)
paper["anticheat"]["anti-xray"]["enabled"] = False
if __name__ == "__main__":
config_paper_world()
config_paper_nether()
config_paper_end()
exit_()