mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 02:26:00 +01:00
Add support for emissive textures (#601)
This commit is contained in:
parent
d5fe7175c6
commit
bca6647670
@ -305,8 +305,9 @@ private void createElementFace(Element element, Direction faceDir, VectorM3f c0,
|
||||
}
|
||||
|
||||
// ####### blocklight
|
||||
tileModel.setBlocklight(face1, blockLight);
|
||||
tileModel.setBlocklight(face2, blockLight);
|
||||
int emissiveBlockLight = Math.max(blockLight, element.getLightEmission());
|
||||
tileModel.setBlocklight(face1, emissiveBlockLight);
|
||||
tileModel.setBlocklight(face2, emissiveBlockLight);
|
||||
|
||||
// ####### sunlight
|
||||
tileModel.setSunlight(face1, sunLight);
|
||||
|
@ -46,6 +46,7 @@ public class Element {
|
||||
private Vector3f from = FULL_BLOCK_MIN, to = FULL_BLOCK_MAX;
|
||||
private Rotation rotation = Rotation.ZERO;
|
||||
private boolean shade = true;
|
||||
private int lightEmission = 0;
|
||||
private EnumMap<Direction, Face> faces = new EnumMap<>(Direction.class);
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ -56,6 +57,7 @@ private Element(Element copyFrom) {
|
||||
this.to = copyFrom.to;
|
||||
this.rotation = copyFrom.rotation;
|
||||
this.shade = copyFrom.shade;
|
||||
this.lightEmission = copyFrom.lightEmission;
|
||||
|
||||
copyFrom.faces.forEach((direction, face) -> this.faces.put(direction, face.copy()));
|
||||
}
|
||||
@ -132,6 +134,10 @@ public boolean isShade() {
|
||||
return shade;
|
||||
}
|
||||
|
||||
public int getLightEmission() {
|
||||
return lightEmission;
|
||||
}
|
||||
|
||||
public EnumMap<Direction, Face> getFaces() {
|
||||
return faces;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user