mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-21 18:16:09 +01:00
Fix color issue and fix cli-webserver not working
This commit is contained in:
parent
e2f1f10fdb
commit
057d25bd15
@ -88,7 +88,7 @@ public HiresTileMeta render(World world, Vector3i modelMin, Vector3i modelMax, H
|
|||||||
//update color and height (only if not 100% translucent)
|
//update color and height (only if not 100% translucent)
|
||||||
if (blockColor.a > 0) {
|
if (blockColor.a > 0) {
|
||||||
maxHeight = y;
|
maxHeight = y;
|
||||||
columnColor.overlay(blockColor);
|
columnColor.overlay(blockColor.premultiplied());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ public void build(BlockNeighborhood<?> block, Variant variant, BlockModelView bl
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (color.a > 0) {
|
if (color.a > 0) {
|
||||||
color.flatten();
|
color.flatten().straight();
|
||||||
color.a = blockColorOpacity;
|
color.a = blockColorOpacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,10 +142,10 @@ public Color straight() {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Color{" +
|
return "Color{" +
|
||||||
"r=" + r +
|
"r=" + r + " (" + (int) (r * 255) + ")" +
|
||||||
", g=" + g +
|
", g=" + g + " (" + (int) (g * 255) + ")" +
|
||||||
", b=" + b +
|
", b=" + b + " (" + (int) (b * 255) + ")" +
|
||||||
", a=" + a +
|
", a=" + a + " (" + (int) (a * 255) + ")" +
|
||||||
", premultiplied=" + premultiplied +
|
", premultiplied=" + premultiplied +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -189,13 +189,13 @@ public void startWebserver(BlueMapService blueMap, boolean verbose) throws IOExc
|
|||||||
routingRequestHandler.register(".*", new FileRequestHandler(config.getWebroot()));
|
routingRequestHandler.register(".*", new FileRequestHandler(config.getWebroot()));
|
||||||
|
|
||||||
// map route
|
// map route
|
||||||
for (var mapId : blueMap.getConfigs().getMapConfigs().keySet()) {
|
for (var mapConfigEntry : blueMap.getConfigs().getMapConfigs().entrySet()) {
|
||||||
Storage storage = blueMap.getStorage(mapId);
|
Storage storage = blueMap.getStorage(mapConfigEntry.getValue().getStorage());
|
||||||
|
|
||||||
routingRequestHandler.register(
|
routingRequestHandler.register(
|
||||||
"maps/" + Pattern.quote(mapId) + "/(.*)",
|
"maps/" + Pattern.quote(mapConfigEntry.getKey()) + "/(.*)",
|
||||||
"$1",
|
"$1",
|
||||||
new MapRequestHandler(mapId, storage)
|
new MapRequestHandler(mapConfigEntry.getKey(), storage)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user