mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Updated comments with useful info for future updates.
This commit is contained in:
parent
83c4f5ad66
commit
387319b353
1 changed files with 3 additions and 4 deletions
|
|
@ -201,9 +201,7 @@ namespace MinecraftClient.ChatBots
|
||||||
|
|
||||||
class MapColors
|
class MapColors
|
||||||
{
|
{
|
||||||
// Currently only 1.18 colors
|
// When colors are updated in a new update, you can get them using the game code: net\minecraft\world\level\material\MaterialColor.java
|
||||||
// Note: This is a wrong color scheme, doesn't really work well, but it is decent enough
|
|
||||||
// We need to find a working one.
|
|
||||||
public static Dictionary<byte, byte[]> Colors = new()
|
public static Dictionary<byte, byte[]> Colors = new()
|
||||||
{
|
{
|
||||||
//Color ID R G B
|
//Color ID R G B
|
||||||
|
|
@ -273,8 +271,9 @@ namespace MinecraftClient.ChatBots
|
||||||
|
|
||||||
public static ColorRGBA ColorByteToRGBA(byte receivedColorId)
|
public static ColorRGBA ColorByteToRGBA(byte receivedColorId)
|
||||||
{
|
{
|
||||||
|
// Divide received color id by 4 to get the base color id
|
||||||
// Much thanks to DevBobcorn
|
// Much thanks to DevBobcorn
|
||||||
byte baseColorId = (byte)(receivedColorId >> 2); // Divide received color id by 4 to get the base color id
|
byte baseColorId = (byte)(receivedColorId >> 2);
|
||||||
|
|
||||||
// Any new colors that we haven't added will be purple like in the missing CS: Source Texture
|
// Any new colors that we haven't added will be purple like in the missing CS: Source Texture
|
||||||
if (!Colors.ContainsKey(baseColorId))
|
if (!Colors.ContainsKey(baseColorId))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue