add lighting color, fix later!
This commit is contained in:
parent
3a38411e13
commit
d996d36742
2 changed files with 6 additions and 6 deletions
|
@ -590,7 +590,7 @@ public abstract class UniverseRegistry {
|
||||||
.addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false), "tianxin");
|
.addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false), "tianxin");
|
||||||
|
|
||||||
registerDomain("digital", "Digital");
|
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)
|
.setFlatGen(Blocks.green_clay.getState(), 2)
|
||||||
.enableMobs(), "digital");
|
.enableMobs(), "digital");
|
||||||
|
|
||||||
|
|
|
@ -42,11 +42,11 @@ import common.util.Vec3;
|
||||||
public abstract class World implements IWorldAccess {
|
public abstract class World implements IWorldAccess {
|
||||||
public static final float[][] BRIGHTNESS = new float[16][16];
|
public static final float[][] BRIGHTNESS = new float[16][16];
|
||||||
static {
|
static {
|
||||||
for(int l = 0; l < 16; l++) {
|
for(int bright = 0; bright < 16; bright++) {
|
||||||
float f = (float)l / 15.0f;
|
float br = (float)bright / 15.0f;
|
||||||
for(int i = 0; i <= 15; ++i) {
|
for(int idx = 0; idx <= 15; idx++) {
|
||||||
float f1 = 1.0F - (float)i / 15.0F;
|
float sub = 1.0F - (float)idx / 15.0F;
|
||||||
BRIGHTNESS[l][i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f;
|
BRIGHTNESS[bright][idx] = (1.0F - sub) / (sub * 3.0F + 1.0F) * (1.0F - br) + br;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue