mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 02:56:17 -10:00
Datafix scene: boss bar, scoreboard, team and a trip to the nether and the end for worlds before 1.17
This commit is contained in:
1 parent
c8370d8e29
commit
67caf1d2ab
2 files changed
+23
No files matched your search
@@ -372,6 +372,26 @@ def entities(e, version):
|
||||
return out
|
||||
|
||||
|
||||
def world_commands(version):
|
||||
"""(command, seconds to wait) for the scoreboard, a boss bar and a trip through the other
|
||||
dimensions, before 1.17: what makes level.dat, the scoreboard and the other dimension folders carry data."""
|
||||
if version >= 2586:
|
||||
return []
|
||||
return [
|
||||
('bossbar add upgrade:boss {"text":"Boss"}', 0),
|
||||
('bossbar set upgrade:boss players @a', 0),
|
||||
('scoreboard objectives add kills dummy {"text":"Kills"}', 0),
|
||||
('scoreboard objectives add zombies minecraft.killed:minecraft.zombie', 0),
|
||||
('scoreboard players set Upgrader kills 3', 0),
|
||||
('team add red {"text":"Red"}', 0),
|
||||
('team modify red prefix {"text":"[R]"}', 0),
|
||||
('team join red Upgrader', 0),
|
||||
('advancement grant @a only minecraft:story/root', 0),
|
||||
('execute in minecraft:the_end run tp Upgrader 100 60 0', 20),
|
||||
('execute in minecraft:the_nether run tp Upgrader 0 80 0', 15),
|
||||
]
|
||||
|
||||
|
||||
def blocks(version):
|
||||
"""Plain blocks whose states changed over the versions."""
|
||||
if version < 2586:
|
||||
|
||||
@@ -412,6 +412,9 @@ def build(name, force=False):
|
||||
for command in scene.player_commands(era, BOT, data_version):
|
||||
run(command)
|
||||
time.sleep(3)
|
||||
for command, wait in ([] if props else scene.world_commands(data_version)):
|
||||
run(command)
|
||||
time.sleep(wait)
|
||||
run('save-all flush')
|
||||
time.sleep(2)
|
||||
bot.leave()
|
||||
|
||||
Reference in new issue
Block a user