Skip to content

Instantly share code, notes, and snippets.

@Minikloon
Minikloon / Definition
Created July 24, 2019 01:54
Slime World Format
“Blob” file format
2 bytes - magic = 0xB10B
1 byte (ubyte) - version, current = 0x03
2 bytes (short) - xPos of chunk lowest x & lowest z
2 bytes (short) - zPos
2 bytes (ushort) - width
2 bytes (ushort) - depth
[depends] - chunk bitmask
-> each chunk is 1 bit: 0 if all air (missing), 1 if present
-> chunks are ordered zx, meaning
@gpchelkin
gpchelkin / shadowsocks-rust-server.sh
Last active October 28, 2024 22:45
How to Setup shadowsocks-rust Server with xray-plugin (like v2ray-plugin) on Any Linux Host
#!/usr/bin/env bash
# https://github.com/shadowsocks/shadowsocks-rust/releases
export SSVERSION=v1.21.2
export SSPORT=443
export SSPASSWORD="CHANGEME"
export SSARCHIVE="shadowsocks-${SSVERSION}.x86_64-unknown-linux-gnu.tar.xz"
#export SSARCHIVE="shadowsocks-${SSVERSION}.aarch64-unknown-linux-gnu.tar.xz"
export PREFIX=/usr/local/bin
@Minikloon
Minikloon / ComponentWrapper.java
Last active October 15, 2024 21:46
Kyori Adventure Component Word Wrapping
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextDecoration;
import net.minestom.server.utils.StringUtils;
import java.util.*;
public class ComponentWrapper {