finish rewrite; port to cmake, loads of other changes

Theres documentation at https://sylvessa.zip/fourkit/ now. And a bunch of other changes. Check the discord server for a more comprehensive list
This commit is contained in:
sylvessa 2026-03-21 13:52:26 -05:00
parent ecb3f00bd6
commit f5f9aa1cf5
107 changed files with 14289 additions and 40 deletions

View file

@ -8,6 +8,9 @@
#include "..\Minecraft.World\net.minecraft.world.level.h"
#include "..\Minecraft.World\net.minecraft.world.level.dimension.h"
#include "TeleportCommand.h"
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
#include "..\Minecraft.Server\FourKitBridge.h"
#endif
EGameCommand TeleportCommand::getId()
{
@ -32,7 +35,21 @@ void TeleportCommand::execute(shared_ptr<CommandSender> source, byteArray comman
if(subject != nullptr && destination != nullptr && subject->level->dimension->id == destination->level->dimension->id && subject->isAlive() )
{
subject->ride(nullptr);
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
{
double outX, outY, outZ;
bool cancelled = FourKitBridge::FirePlayerTeleport(subject->entityId,
subject->x, subject->y, subject->z, subject->dimension,
destination->x, destination->y, destination->z, destination->dimension,
1 /* COMMAND */,
&outX, &outY, &outZ);
if (cancelled)
return;
subject->connection->teleport(outX, outY, outZ, destination->yRot, destination->xRot);
}
#else
subject->connection->teleport(destination->x, destination->y, destination->z, destination->yRot, destination->xRot);
#endif
//logAdminAction(source, "commands.tp.success", subject->getAName(), destination->getAName());
logAdminAction(source, ChatPacket::e_ChatCommandTeleportSuccess, subject->getName(), eTYPE_SERVERPLAYER, destination->getName());