mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-07-14 02:39:56 +00:00
fix(PlayerConnection): /tp fix
fix(PlayerConnection): pointer fix(PlayerConnection): bytearray fix(PlayerConnection): bytearray fix(PlayerConnection): bytearray fix(TeleportCommand): crash on coords fix(TeleportCommand): crash on coords fix: sunflower randomly spawning
This commit is contained in:
@@ -61,6 +61,7 @@ extern bool g_Win64DedicatedServer;
|
||||
|
||||
//neo: added
|
||||
#include "ItemNameMap.h"
|
||||
#include "../Minecraft.World/ByteArrayOutputStream.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -1131,19 +1132,10 @@ if (cmd == L"tp" || cmd == L"teleport")
|
||||
? static_cast<byte>(tpTarget->xRot)
|
||||
: static_cast<byte>(stoi(sXRot) & 0xFF);
|
||||
|
||||
TeleportEntityPacket packet(
|
||||
tpTarget->entityId,
|
||||
static_cast<int>(x),
|
||||
static_cast<int>(y),
|
||||
static_cast<int>(z),
|
||||
yRot,
|
||||
xRot
|
||||
);
|
||||
DataOutputStream ds(OutputStream::createMemoryStream());
|
||||
packet.write(&ds);
|
||||
shared_ptr<GameCommandPacket> gamePacket = make_shared<GameCommandPacket>(eGameCommand_Teleport, ds.getData());
|
||||
shared_ptr<GameCommandPacket> gamePacket = TeleportCommand::preparePacket(
|
||||
tpTarget->getXuid(), x, y, z, yRot, xRot);
|
||||
server->getCommandDispatcher()->performCommand(tpTarget, eGameCommand_Teleport, gamePacket->data);
|
||||
}
|
||||
}
|
||||
} else if (cmd == L"time")
|
||||
{
|
||||
if (!player->hasPermission(eGameCommand_Time))
|
||||
|
||||
Reference in New Issue
Block a user