satoshinm / WebSandboxMC

Bukkit plugin providing a web-based interface with an interactive WebGL 3D preview or glimpse of your server 🕷⏳📦 ⛺
https://www.spigotmc.org/resources/websandboxmc.39415/
MIT License
19 stars 5 forks source link

Signs #20

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

Craft allows writing text on any block (S, command); bridge "signs"

satoshinm commented 7 years ago

SignChangeEvent

src/main.c "S," command format: (p,q) chunk, (x,y,z) block, face (0-7), text (until end-of-line, nifty sscanf format string specifier [^\n])

        snprintf(
            format, sizeof(format),
            "S,%%d,%%d,%%d,%%d,%%d,%%d,%%%d[^\n]", MAX_SIGN_LENGTH - 1);
        int face;
        char text[MAX_SIGN_LENGTH] = {0};
        if (sscanf(line, format,
            &bp, &bq, &bx, &by, &bz, &face, text) >= 6)
        {
            _set_sign(bp, bq, bx, by, bz, face, text, 0);
        }