MinecraftConsoles/Minecraft.World/SharedConstants.h
DrPerkyLegit 14f8d793dd
Add Chat Formatting Support For Servers (#1483)
* add chat support for html formatting

* html character serialization, normal color format support

* change for chat input handling on color

has a bug where the text after the cursor gets stripped of its color, need to make a function to backstep on a string and find the last used color codes, or get all color codes used before the string is split, and apply them to the start of the next string

* expose jukebox label as action bar like java

* prevent players from sending chat color

* restore non styled chat size check
2026-04-12 23:17:45 -05:00

34 lines
981 B
C++

#pragma once
using namespace std;
#include "Class.h"
class SharedConstants
{
public:
static void staticCtor();
static const wstring VERSION_STRING;
static const int NETWORK_PROTOCOL_VERSION = 78;
static const bool INGAME_DEBUG_OUTPUT = false;
// NOT texture resolution. How many sub-blocks each block face is made up of.
// 4J Added for texture packs
static const int WORLD_RESOLUTION = 16;
static bool isAllowedChatCharacter(char ch);
private:
static wstring readAcceptableChars();
public:
static const int maxChatLength = 255;
static const int maxVisibleLength = 100; //to be changed
static wstring acceptableLetters;
static const int ILLEGAL_FILE_CHARACTERS_LENGTH = 15;
static const wchar_t ILLEGAL_FILE_CHARACTERS[ILLEGAL_FILE_CHARACTERS_LENGTH];
static const bool TEXTURE_LIGHTING; // 4J - change brought forward from 1.8.2
static const int TICKS_PER_SECOND = 20;
static const int FULLBRIGHT_LIGHTVALUE = 15 << 20 | 15 << 4;
};