Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

Commit

Permalink
fixed crash with cbe (#4512)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDiamond64 authored Sep 11, 2021
1 parent ad69b1c commit 29ec16c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Horion/Command/Commands/CommandBlockExploitCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ bool CommandBlockExploitCommand::execute(std::vector<std::string>* args) {
std::string tag = R"({Count:1b,Damage:0s,Name:"minecraft:movingblock",tag:{movingEntity:{id:"Beehive",Occupants:[{ActorIdentifier:"minecraft:command_block_minecart<>",SaveData:{Command:")" + cmd + R"(",definitions:["+minecraft:moving_block"],identifier:"minecraft:command_block_minecart",Persistent:1b,Ticking:1b,TicksLeftToStay:1}}]},pistonPosX:0,movingBlock:{name:"minecraft:air"},pistonPosY:0,pistonPosZ:0,ench:[{id:28s,lvl:1s}],display:{Name:"§g§lInvisible Beehive Command",Lore:[")" + cmd + R"("]}}})";
item->fromTag(*Mojangson::parseTag(tag));
}

else return false;

g_Data.getLocalPlayer()->getTransactionManager()->addInventoryAction(C_InventoryAction(0, nullptr, nullptr, item, nullptr, 1, 507, 99999));
g_Data.getLocalPlayer()->getSupplies()->inventory->addItemToFirstEmptySlot(item);
Expand Down

1 comment on commit 29ec16c

@Intoprelised
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how did nobody think of this

Please sign in to comment.