Skip to content

Commit 245a54d

Browse files
committed
Fix black colored RGB Blocks not appearing on map.
1 parent 631dd1f commit 245a54d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ org.gradle.debug=false
66

77
#version info
88
minecraft_version=1.20.4
9-
mod_version=1.1.9.0
9+
mod_version=1.1.9.1
1010

1111
neogradle.subsystems.parchment.minecraftVersion=1.20.4
1212
neogradle.subsystems.parchment.mappingsVersion=2024.02.25

src/main/java/platinpython/rgbblocks/util/Color.java

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public static int squaredColorDistance(int rgb1, int rgb2) {
168168
public static MapColor getNearestMapColor(int rgb) {
169169
return Stream.of(MapColor.MATERIAL_COLORS)
170170
.filter(Objects::nonNull)
171+
.filter(mapColor -> mapColor != MapColor.NONE)
171172
.min(Comparator.comparing(mapColor -> Color.squaredColorDistance(mapColor.col, rgb)))
172173
.orElse(MapColor.NONE);
173174
}

0 commit comments

Comments
 (0)