Skip to content

Commit a339247

Browse files
committed
Allow configuration of edge-light strength
1 parent 0ae438e commit a339247

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

common/src/main/java/de/bluecolored/bluemap/common/config/MapConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
package de.bluecolored.bluemap.common.config;
2626

2727
import com.flowpowered.math.vector.Vector2i;
28-
import com.flowpowered.math.vector.Vector3i;
2928
import com.google.gson.FieldNamingPolicy;
3029
import com.google.gson.Gson;
3130
import com.google.gson.GsonBuilder;
@@ -79,6 +78,7 @@ public class MapConfig implements MapSettings {
7978
private int minInhabitedTimeRadius = 0;
8079

8180
private boolean renderEdges = true;
81+
private int edgeLightStrength = 15;
8282

8383
private boolean enablePerspectiveView = true;
8484
private boolean enableFlatView = true;

common/src/main/resources/de/bluecolored/bluemap/config/maps/map.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ min-inhabited-time: 0
105105
# Default is true
106106
render-edges: true
107107

108+
# The sun-light strength that blocks at map-edges will recieve if render-edges is enabled.
109+
# Should be a value between 0 and 15
110+
# Default is 15
111+
edge-light-strength: 8
112+
108113
# Whether the perspective view will be enabled for this map.
109114
# Changing this to true requires a re-render of the map, only if the hires-layer is enabled and free-flight view is disabled.
110115
# Default is true

core/src/main/java/de/bluecolored/bluemap/core/map/hires/RenderSettings.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ default boolean isRenderEdges() {
6060
return true;
6161
}
6262

63+
/**
64+
* The sunlight-strength that the air blocks produced by {@link #isRenderEdges()} will have.
65+
*/
66+
default int getEdgeLightStrength() { return 15; }
67+
6368
default boolean isIgnoreMissingLightData() {
6469
return false;
6570
}

core/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/biome/DatapackBiome.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public static class Effects {
9292
@PostDeserialize
9393
private void init() {
9494
waterColor.a = 1f;
95-
Logger.global.logInfo("Biome-Effects Initialized!");
9695
}
9796

9897
}

core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public BlockState getBlockState() {
109109
@Override
110110
public LightData getLightData() {
111111
LightData ld = blockAccess.getLightData();
112-
if (renderSettings.isRenderEdges() && !isInsideRenderBounds()) ld.set(dimensionType.hasSkylight() ? 16 : 0, ld.getBlockLight());
112+
if (renderSettings.isRenderEdges() && !isInsideRenderBounds()) ld.set(dimensionType.hasSkylight() ? renderSettings.getEdgeLightStrength() : 0, ld.getBlockLight());
113113
return ld;
114114
}
115115

0 commit comments

Comments
 (0)