chore: format Minecraft.World

This commit is contained in:
Tropical
2026-03-13 17:06:56 -05:00
parent bd6284025d
commit 33d0737d1d
1511 changed files with 108661 additions and 115521 deletions

View File

@@ -6,13 +6,19 @@
const std::wstring SharedConstants::VERSION_STRING = L"1.2.3";
const bool SharedConstants::TEXTURE_LIGHTING = true;
std::wstring SharedConstants::readAcceptableChars()
{
// 4J-PB - I've added ã in (for Portuguese in bed string) and added the character at the same place in the default.png font
std::wstring result = L" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»ã";
#if 0 // 4J - do we actually really need to get this from a file?
//try {
//BufferedReader br = new BufferedReader(new InputStreamReader(SharedConstants.class.getResourceAsStream("/font.txt"), "UTF-8"));
std::wstring SharedConstants::readAcceptableChars() {
// 4J-PB - I've added ã in (for Portuguese in bed string) and added the
// character at the same place in the default.png font
std::wstring result =
L" !\"#$%&'()*+,-./"
L"0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'"
L"abcdefghijklmnopqrstuvwxyz{|}~"
L" ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»ã";
#if 0 // 4J - do we actually really need to get this from a file?
// try {
// BufferedReader br = new BufferedReader(new
// InputStreamReader(SharedConstants.class.getResourceAsStream("/font.txt"),
// "UTF-8"));
BufferedReader *br = new BufferedReader(new InputStreamReader( new FileInputStream( new File( std::wstring(L"/font.txt") ) ) ) );
std::wstring line;
while ( !(line = br->readLine()).empty())
@@ -27,25 +33,25 @@ std::wstring SharedConstants::readAcceptableChars()
// TODO 4J Stu - Exception handling?
//}
#endif
return result;
return result;
}
bool SharedConstants::isAllowedChatCharacter(char ch)
{
//return ch != '§' && (acceptableLetters.indexOf(ch) >= 0 || (int) ch > 32);
// 4J Unused
return true;
bool SharedConstants::isAllowedChatCharacter(char ch) {
// return ch != '§' && (acceptableLetters.indexOf(ch) >= 0 || (int) ch >
// 32);
// 4J Unused
return true;
}
std::wstring SharedConstants::acceptableLetters = SharedConstants::readAcceptableChars();
std::wstring SharedConstants::acceptableLetters =
SharedConstants::readAcceptableChars();
void SharedConstants::staticCtor()
{
acceptableLetters = readAcceptableChars();
void SharedConstants::staticCtor() {
acceptableLetters = readAcceptableChars();
}
const wchar_t SharedConstants::ILLEGAL_FILE_CHARACTERS[ILLEGAL_FILE_CHARACTERS_LENGTH] =
{
// 4J-PB - corrected
L'/', L'\n', L'\r', L'\t', L'\0', L'\f', L'`', L'?', L'*', L'\\', L'<', L'>', L'|', L'\"', L':'
};
const wchar_t
SharedConstants::ILLEGAL_FILE_CHARACTERS[ILLEGAL_FILE_CHARACTERS_LENGTH] = {
// 4J-PB - corrected
L'/', L'\n', L'\r', L'\t', L'\0', L'\f', L'`', L'?',
L'*', L'\\', L'<', L'>', L'|', L'\"', L':'};