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

Lighting #21

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

Craft supports light levels on any block, bridge some lighting blocks (easiest probably: Glowstone), using the "L," command. Be sure to delete the light level when the block is removed (actions per block type on place/destroy? for lighting: set light to 15, set light to 0). Lamps, torches

L command format, (p,q) chunk coords, (x,y,z) block coords, and w (brightness, 0 to 15 (ctrl-click toggles between 0 and 15))

        if (sscanf(line, "L,%d,%d,%d,%d,%d,%d",
            &bp, &bq, &bx, &by, &bz, &bw) == 6)
        {
            set_light(bp, bq, bx, by, bz, bw);
        }