mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-22 06:53:51 +00:00
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
parent
a9be52c41a
commit
087b7e7abf
1373 changed files with 19449 additions and 19903 deletions
|
|
@ -32,7 +32,7 @@ int CommandBlockEntity::performCommand(Level *level)
|
|||
}
|
||||
|
||||
MinecraftServer *instance = MinecraftServer::getInstance();
|
||||
if (instance != nullptr && instance->isCommandBlockEnabled())
|
||||
if (instance != NULL && instance->isCommandBlockEnabled())
|
||||
{
|
||||
CommandDispatcher *commandDispatcher = instance->getCommandDispatcher();
|
||||
return commandDispatcher->performCommand(dynamic_pointer_cast<CommandSender>(shared_from_this()), command, byteArray() );
|
||||
|
|
@ -94,7 +94,7 @@ shared_ptr<Packet> CommandBlockEntity::getUpdatePacket()
|
|||
{
|
||||
CompoundTag *tag = new CompoundTag();
|
||||
save(tag);
|
||||
return std::make_shared<TileEntityDataPacket>(x, y, z, TileEntityDataPacket::TYPE_ADV_COMMAND, tag);
|
||||
return shared_ptr<TileEntityDataPacket>( new TileEntityDataPacket(x, y, z, TileEntityDataPacket::TYPE_ADV_COMMAND, tag) );
|
||||
}
|
||||
|
||||
int CommandBlockEntity::getSuccessCount()
|
||||
|
|
@ -110,7 +110,7 @@ void CommandBlockEntity::setSuccessCount(int successCount)
|
|||
// 4J Added
|
||||
shared_ptr<TileEntity> CommandBlockEntity::clone()
|
||||
{
|
||||
shared_ptr<CommandBlockEntity> result = std::make_shared<CommandBlockEntity>();
|
||||
shared_ptr<CommandBlockEntity> result = shared_ptr<CommandBlockEntity>( new CommandBlockEntity() );
|
||||
TileEntity::clone(result);
|
||||
|
||||
result->successCount = successCount;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue