first commit

This commit is contained in:
murdle
2026-03-01 02:38:58 +02:00
commit 19250b9db4
19111 changed files with 4358159 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#include "stdafx.h"
#include "..\Minecraft.Client\MinecraftServer.h"
#include "..\Minecraft.Client\ServerLevel.h"
#include "net.minecraft.commands.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.storage.h"
#include "net.minecraft.network.packet.h"
#include "ToggleDownfallCommand.h"
EGameCommand ToggleDownfallCommand::getId()
{
return eGameCommand_ToggleDownfall;
}
void ToggleDownfallCommand::execute(shared_ptr<CommandSender> source, byteArray commandData)
{
doToggleDownfall();
logAdminAction(source, ChatPacket::e_ChatCustom, L"commands.downfall.success");
}
void ToggleDownfallCommand::doToggleDownfall()
{
MinecraftServer::getInstance()->levels[0]->toggleDownfall();
MinecraftServer::getInstance()->levels[0]->getLevelData()->setThundering(true);
}
shared_ptr<GameCommandPacket> ToggleDownfallCommand::preparePacket()
{
return shared_ptr<GameCommandPacket>( new GameCommandPacket(eGameCommand_ToggleDownfall, byteArray() ));
}