- some verbose debug
This commit is contained in:
parent
7a451b67be
commit
e865a0e165
|
@ -26,7 +26,6 @@ function hook_chunks() {
|
|||
local ore
|
||||
local plane
|
||||
|
||||
log "hooking chunks"
|
||||
rm -R $TEMP/world/*
|
||||
chunk_header
|
||||
|
||||
|
@ -145,10 +144,6 @@ function dig_async() {
|
|||
}
|
||||
|
||||
function hook_dig() {
|
||||
log $x
|
||||
log $y
|
||||
log $z
|
||||
log $a
|
||||
ore=$(cat $TEMP/players/$nick/oremap | awk '{print $'"$((y+64))"'}' | sed -E 's/.{32}/&\n/g' | head -n $((z+1)) | tail -n 1 | sed -E 's/(.{16})(.{16})/\2\1/g;s/.{2}/&\n/g' | tail -n $((x+2)) | head -n1)
|
||||
block=${palette[$((0x$ore))]}
|
||||
if [[ $a == "1a02"* ]]; then # finished digging?
|
||||
|
@ -182,6 +177,5 @@ function hook_ping() {
|
|||
function hook_inventory() {
|
||||
items=($(repeat 36 "0 "))
|
||||
items+=("721")
|
||||
log ${items[1]}
|
||||
pkt_inventory items
|
||||
}
|
||||
|
|
29
demos/v.sh
29
demos/v.sh
|
@ -16,7 +16,6 @@ spawn_pos=(8 -63 5)
|
|||
gamemode=00
|
||||
|
||||
function hook_chunks() {
|
||||
log "hooking chunks"
|
||||
|
||||
if [[ $nick != 'selfisekai' && $nick != 'MaeIsBadAtDev' && $nick != 'Domi_UwU' ]]; then
|
||||
pkt_disconnect "§asomething something hmu if you wanna go in"
|
||||
|
@ -45,22 +44,8 @@ ________________'
|
|||
mmmap="$(echo -n "$mmm" | chunkfix | sed -E 's/\./25/g;s/#/02/g;s/,/27/g;s/_/00/g;s/@/26/g;s/\^/28/g')"
|
||||
chunk_header
|
||||
|
||||
#chunk+="$mmmap"
|
||||
#for (( j=0; j<15; j++ )); do
|
||||
# for (( i=0; i<256; i++ )); do
|
||||
# chunk+="$(printf '%02x' 00)"
|
||||
# done
|
||||
#done
|
||||
|
||||
for (( y=0; y<16; y++ )); do
|
||||
if [[ $y == 0 ]]; then
|
||||
#for (( x=0; x<16; x++ )); do
|
||||
# if [[ $x == 8 ]]; then
|
||||
# chunk+="08"
|
||||
# else
|
||||
# chunk+="02"
|
||||
# fi
|
||||
#done
|
||||
chunk+="$(repeat 256 "02")"
|
||||
elif [[ $y == 1 ]]; then
|
||||
for (( i=0; i<$((256-16)); i++ )); do
|
||||
|
@ -75,7 +60,6 @@ ________________'
|
|||
for (( x=0; x<16; x++ )); do
|
||||
if [[ $x == 15 ]]; then
|
||||
chunk+="$(echo -n "$mmmap" | tail -n $((y+1)) | head -n1)"
|
||||
log "Y: $y, X: $x, $(echo -n "$mmmap" | tail -n $y | head -n1)"
|
||||
else
|
||||
for (( z=0; z<16; z++ )); do
|
||||
chunk+="00"
|
||||
|
@ -85,14 +69,10 @@ ________________'
|
|||
fi
|
||||
done
|
||||
|
||||
#for (( i=0; i<256; i++ )); do
|
||||
# chunk+="00"
|
||||
#done
|
||||
|
||||
chunk_footer
|
||||
|
||||
echo "$chunk" > $TEMP/world/0000000000000000
|
||||
#log "$chunk"
|
||||
|
||||
chunk_header
|
||||
chunk+="$(repeat 256 "02")"
|
||||
|
@ -163,7 +143,6 @@ function async_particles() {
|
|||
function hook_swing() {
|
||||
pkt_particle 4 -60 12 33 128
|
||||
pkt_particle 12 -60 12 33 128
|
||||
log "received Arm Swing"
|
||||
}
|
||||
|
||||
function hook_ping() {
|
||||
|
@ -184,14 +163,6 @@ function hook_start() {
|
|||
sleep 2
|
||||
pkt_title "Thanks for being awesome ^^"
|
||||
pkt_subtitle "I love you <3"
|
||||
elif [[ $nick == "Domi_UwU" ]]; then
|
||||
pkt_title "§ddomi §cDEBUG"
|
||||
sleep 2
|
||||
pkt_title "Thanks for being here for me ^^"
|
||||
pkt_subtitle "You mean a lot to me <3"
|
||||
pkt_subtitle uwu
|
||||
pkt_subtitle uwu
|
||||
pkt_subtitle uwu
|
||||
fi
|
||||
async_particles &
|
||||
}
|
||||
|
|
8
mc.sh
8
mc.sh
|
@ -41,9 +41,6 @@ function position_delta() {
|
|||
local deltaY
|
||||
local deltaZ
|
||||
|
||||
# pos[0]=0
|
||||
# pos[1]=0
|
||||
# pos[2]=0
|
||||
pos_old[0]=0
|
||||
pos_old[1]=0
|
||||
pos_old[2]=0
|
||||
|
@ -135,7 +132,6 @@ while true; do
|
|||
|
||||
# random uuid string len string (nick)
|
||||
res="0000000000000000000000000000$eid$(str_len "$nick")$(echo -n "$nick" | xxd -p)"
|
||||
log "$(hexpacket_len "$res")02$res"
|
||||
echo -n "$(hexpacket_len "$res")02$res" | xxd -p -r
|
||||
|
||||
res="0100$eid" # entity id
|
||||
|
@ -160,10 +156,6 @@ while true; do
|
|||
res+="00" # is debug (surprisingly, no)
|
||||
res+="01" # is flat (yeah, sure)
|
||||
|
||||
#rhexlog "$(hexpacket_len "$res")26$res"
|
||||
#echo -n "$(hexpacket_len "$res")26$res" | xxd -p -r
|
||||
#log "sent join game"
|
||||
|
||||
|
||||
echo -n "$(hexpacket_len "$res")26$res" | xxd -p -r
|
||||
log "sent join game"
|
||||
|
|
|
@ -84,9 +84,6 @@ function pkt_particle() {
|
|||
res+="" # data (left blank)
|
||||
echo -n "$(hexpacket_len "$res")24$res" | xxd -p -r
|
||||
|
||||
log $(to_ieee754 $1) $(to_ieee754 $2) $(to_ieee754 $3)
|
||||
|
||||
rhexlog "$res"
|
||||
log "sending particle"
|
||||
}
|
||||
|
||||
|
@ -121,7 +118,6 @@ function pkt_spawnplayer() {
|
|||
res+="00" # Pitch (...)
|
||||
|
||||
echo -n "$(hexpacket_len "$res")04$res" | xxd -p -r
|
||||
rhexlog "$(hexpacket_len "$res")04$res"
|
||||
log "sent spawnplayer"
|
||||
}
|
||||
|
||||
|
@ -223,7 +219,6 @@ function pkt_subtitle() {
|
|||
function pkt_disconnect() {
|
||||
txt='{"text":"'"$1"'"}'
|
||||
res="$(str_len "$txt")$(echo -n "$txt" | xxd -p)"
|
||||
log "$txt"
|
||||
echo -n "$(hexpacket_len "$res")1a$res" | xxd -p -r
|
||||
|
||||
pkill -P $$
|
||||
|
|
Loading…
Reference in a new issue