Skip to content

Commit

Permalink
change color codec to string
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Mar 14, 2024
1 parent cb129f4 commit a2488a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/java/de/teamlapen/lib/util/Color.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
public class Color {

public static final Codec<Color> CODEC = Codec.INT.xmap(Color::new, Color::getRGB);
public static final Codec<Color> CODEC = Codec.STRING.xmap(s -> new Color(Integer.parseInt(s)), l -> String.valueOf(l.getRGB()));
public static final Color WHITE = new Color(255, 255, 255);
public static final Color BLUE = new Color(0, 0, 255);
public static final Color MAGENTA = new Color(255, 0, 255);
Expand Down

0 comments on commit a2488a0

Please sign in to comment.