the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "../../../Minecraft.World/CustomPayloadPacket.h"
3#include "MultiPlayerLocalPlayer.h"
4#include "ClientConnection.h"
5#include "IUIScene_CommandBlockMenu.h"
6
7void IUIScene_CommandBlockMenu::Initialise(CommandBlockEntity *commandBlock)
8{
9 m_commandBlock = commandBlock;
10 SetCommand(m_commandBlock->getCommand());
11}
12
13void IUIScene_CommandBlockMenu::ConfirmButtonClicked()
14{
15 ByteArrayOutputStream baos;
16 DataOutputStream dos(&baos);
17
18 dos.writeInt(m_commandBlock->x);
19 dos.writeInt(m_commandBlock->y);
20 dos.writeInt(m_commandBlock->z);
21 dos.writeUTF(GetCommand());
22
23 Minecraft::GetInstance()->localplayers[GetPad()]->connection->send(shared_ptr<CustomPayloadPacket>(new CustomPayloadPacket(CustomPayloadPacket::SET_ADVENTURE_COMMAND_PACKET, baos.toByteArray())));
24}
25