From 1547ecbeb3b0e022b42783c8861cf456c63fa467 Mon Sep 17 00:00:00 2001 From: SquidDev Date: Mon, 4 May 2020 10:26:20 +0100 Subject: [PATCH] Fix incorrect palette serialisation --- src/main/java/dan200/computercraft/shared/util/Palette.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dan200/computercraft/shared/util/Palette.java b/src/main/java/dan200/computercraft/shared/util/Palette.java index e7c296388..6493f9c21 100644 --- a/src/main/java/dan200/computercraft/shared/util/Palette.java +++ b/src/main/java/dan200/computercraft/shared/util/Palette.java @@ -91,7 +91,7 @@ public class Palette { for( double[] colour : colours ) { - for( int i = 0; i < colour.length; i++ ) colour[i] = buffer.readByte() * 255; + for( int i = 0; i < colour.length; i++ ) colour[i] = (buffer.readByte() & 0xFF) / 255.0; } }