-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcpreloader
More file actions
executable file
·52 lines (45 loc) · 2.14 KB
/
mcpreloader
File metadata and controls
executable file
·52 lines (45 loc) · 2.14 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
#!/bin/bash
# This is supposed to "pre-generate" a Minecraft world. However, it doesn't seem to work, at least on the Bedrock edition of the game. It might work on the Java edition, I believe it's basically a conversion of the AutoHotKey script in this video: https://youtu.be/eA35S2GW-jI
##############
### CONFIG ###
##############
# Delay between each TP
tpdelay="10" # Seconds
# Delay between each keypress (when typing the commands)
keydelay="100" # Milliseconds
# Delay between when the chat is opened and the script starts typing things
chatdelay="1" # Seconds
# Delay before the script starts actually doing anything (so that you can tab into your minecraft or whatever)
startupdelay="3" # Seconds
##############
sleep "$startupdelay"
# TP to the first position
xdotool key t; sleep "$chatdelay"
xdotool type --delay "$keydelay" "/tp @p -2880 192 -2880"; xdotool key Return
# C style for loops because the regular BASH ones wern't working :P
for ((i=0;i<3;i++)); do
for ((x=0;x<4;x++)); do
# Rotation commands
sleep "$tpdelay"
xdotool key t; sleep "$chatdelay"
xdotool type --delay "$keydelay" "/tp @p ~ ~ ~ -90 20"; xdotool key Return
sleep "$tpdelay"
xdotool key t; sleep "$chatdelay"
xdotool type --delay "$keydelay" "/tp @p ~ ~ ~ 0 20"; xdotool key Return
sleep "$tpdelay"
xdotool key t; sleep "$chatdelay"
xdotool type --delay "$keydelay" "/tp @p ~ ~ ~ 90 20"; xdotool key Return
sleep "$tpdelay"
xdotool key t; sleep "$chatdelay"
xdotool type --delay "$keydelay" "/tp @p ~ ~ ~ 180 20"; xdotool key Return
# Move us along in the chain
sleep "$tpdelay"
xdotool key t; sleep "$chatdelay"
# Sleeping in between the commands on this one because occasionally MC will miss the last tilde with this one. Only this line though, so I'm not doing for the rest.
xdotool type --delay "$keydelay" "/tp @p ~240 ~ ~"; sleep "0.1"; xdotool key Return
done
# Step down to the next chain
sleep "$tpdelay"
xdotool key t; sleep "$chatdelay"
xdotool type --delay "$keydelay" "/tp @p -2880 192 ~240"; xdotool key Return
done