mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-14 10:55:20 +01:00
Make this more readable with the base colors
This commit is contained in:
parent
478e663506
commit
63d3dcb31b
@ -235,31 +235,31 @@ public class BlockItemPackets1_16 extends nl.matsv.viabackwards.api.rewriters.It
|
||||
wrapper.passthrough(Type.BYTE); // Z
|
||||
byte[] data = wrapper.passthrough(Type.BYTE_ARRAY_PRIMITIVE);
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
int color = data[i] & 0xFF;
|
||||
int color = (data[i] & 0xFF) / 4;
|
||||
int newColor = -1;
|
||||
switch (color) {
|
||||
case 208:
|
||||
newColor = 112;
|
||||
case 52:
|
||||
newColor = 28;
|
||||
break;
|
||||
case 212:
|
||||
newColor = 152;
|
||||
case 53:
|
||||
newColor = 38;
|
||||
break;
|
||||
case 216:
|
||||
newColor = 140;
|
||||
case 54:
|
||||
newColor = 35;
|
||||
break;
|
||||
case 220:
|
||||
newColor = 128;
|
||||
case 55:
|
||||
newColor = 32;
|
||||
break;
|
||||
case 224:
|
||||
case 232:
|
||||
newColor = 92;
|
||||
case 56:
|
||||
case 58:
|
||||
newColor = 23;
|
||||
break;
|
||||
case 228:
|
||||
newColor = 96;
|
||||
case 57:
|
||||
newColor = 24;
|
||||
break;
|
||||
}
|
||||
if (newColor != -1) {
|
||||
data[i] = (byte) newColor;
|
||||
data[i] = (byte) (newColor * 4);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user