Minecraft Consoles latest changes + Better shadow for water in Extra mode

Culling for water need more work in extra graphics mode.
This commit is contained in:
GabsPuNs
2026-04-08 23:47:27 -04:00
parent 23102c65b6
commit 4dfedbffd1
12 changed files with 453 additions and 102 deletions

View File

@@ -159,7 +159,7 @@ namespace ServerRuntime
}
IServerCliCommand *command = m_registry->FindMutable(parsed.tokens[0]);
if (command == NULL)
if (command == nullptr)
{
LogWarn("Unknown command: " + parsed.tokens[0]);
return false;
@@ -170,7 +170,7 @@ namespace ServerRuntime
void ServerCliEngine::BuildCompletions(const std::string &line, std::vector<std::string> *out) const
{
if (out == NULL)
if (out == nullptr)
{
return;
}
@@ -211,7 +211,7 @@ namespace ServerRuntime
else
{
const IServerCliCommand *command = m_registry->Find(commandToken);
if (command != NULL)
if (command != nullptr)
{
command->Complete(context, this, out);
}
@@ -254,13 +254,13 @@ namespace ServerRuntime
{
std::vector<std::string> result;
MinecraftServer *server = MinecraftServer::getInstance();
if (server == NULL)
if (server == nullptr)
{
return result;
}
PlayerList *players = server->getPlayers();
if (players == NULL)
if (players == nullptr)
{
return result;
}
@@ -268,7 +268,7 @@ namespace ServerRuntime
for (size_t i = 0; i < players->players.size(); ++i)
{
std::shared_ptr<ServerPlayer> player = players->players[i];
if (player != NULL)
if (player != nullptr)
{
result.push_back(StringUtils::WideToUtf8(player->getName()));
}
@@ -280,13 +280,13 @@ namespace ServerRuntime
std::shared_ptr<ServerPlayer> ServerCliEngine::FindPlayerByNameUtf8(const std::string &name) const
{
MinecraftServer *server = MinecraftServer::getInstance();
if (server == NULL)
if (server == nullptr)
{
return nullptr;
}
PlayerList *players = server->getPlayers();
if (players == NULL)
if (players == nullptr)
{
return nullptr;
}
@@ -295,7 +295,7 @@ namespace ServerRuntime
for (size_t i = 0; i < players->players.size(); ++i)
{
std::shared_ptr<ServerPlayer> player = players->players[i];
if (player != NULL && equalsIgnoreCase(player->getName(), target))
if (player != nullptr && equalsIgnoreCase(player->getName(), target))
{
return player;
}
@@ -345,28 +345,28 @@ namespace ServerRuntime
return GameType::CREATIVE;
}
char *end = NULL;
char *end = nullptr;
long id = strtol(lowered.c_str(), &end, 10);
if (end != NULL && *end == 0)
if (end != nullptr && *end == 0)
{
// Numeric fallback supports extended ids handled by level settings.
return LevelSettings::validateGameType((int)id);
}
return NULL;
return nullptr;
}
bool ServerCliEngine::DispatchWorldCommand(EGameCommand command, byteArray commandData, const std::shared_ptr<CommandSender> &sender) const
{
MinecraftServer *server = MinecraftServer::getInstance();
if (server == NULL)
if (server == nullptr)
{
LogWarn("MinecraftServer instance is not available.");
return false;
}
CommandDispatcher *dispatcher = server->getCommandDispatcher();
if (dispatcher == NULL)
if (dispatcher == nullptr)
{
LogWarn("Command dispatcher is not available.");
return false;