add lighting color, fix later!

This commit is contained in:
Sen 2025-07-11 00:45:15 +02:00
parent 3a38411e13
commit d996d36742
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
2 changed files with 6 additions and 6 deletions

View file

@ -590,7 +590,7 @@ public abstract class UniverseRegistry {
.addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false), "tianxin");
registerDomain("digital", "Digital");
registerArea("cyberspace", "Cyberspace", new Area(0x000000, 0x000000, 293.15f, 15)
registerArea("cyberspace", "Cyberspace", new Area(0x000000, 0x000000, 293.15f, 15).setLightColor(0x00ff00).setBlockColor(0x00ff00)
.setFlatGen(Blocks.green_clay.getState(), 2)
.enableMobs(), "digital");

View file

@ -42,11 +42,11 @@ import common.util.Vec3;
public abstract class World implements IWorldAccess {
public static final float[][] BRIGHTNESS = new float[16][16];
static {
for(int l = 0; l < 16; l++) {
float f = (float)l / 15.0f;
for(int i = 0; i <= 15; ++i) {
float f1 = 1.0F - (float)i / 15.0F;
BRIGHTNESS[l][i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f;
for(int bright = 0; bright < 16; bright++) {
float br = (float)bright / 15.0f;
for(int idx = 0; idx <= 15; idx++) {
float sub = 1.0F - (float)idx / 15.0F;
BRIGHTNESS[bright][idx] = (1.0F - sub) / (sub * 3.0F + 1.0F) * (1.0F - br) + br;
}
}
}