Add Block Formspec Hack

This commit is contained in:
realOneplustwo 2020-10-22 17:36:31 -07:00
parent 62cf9b4660
commit 6652d7ac2a
5 changed files with 9 additions and 1 deletions

View File

@ -51,6 +51,7 @@ core.cheats = {
["PointLiquids"] = "point_liquids",
["PrivBypass"] = "priv_bypass",
["AutoRespawn"] = "autorespawn",
["BlockFormspec"] = "block_formspec"
},
["Chat"] = {
["IgnoreStatus"] = "ignore_status_messages",

View File

@ -2299,6 +2299,8 @@ replace (Replace) bool false
crystal_pvp (CrystalPvP) bool false
block_formspec (BlockFormSpec) bool false
[Cheat Menu]
# Font to use for cheat menu

View File

@ -118,6 +118,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("crystal_pvp", "false");
settings->setDefault("autototem", "false");
settings->setDefault("dont_point_nodes", "false");
settings->setDefault("block_formspec", "false");
// Keymap
settings->setDefault("remote_port", "30000");

View File

@ -72,7 +72,7 @@ private:
video::SColor m_font_color = video::SColor(195, 255, 255, 255);
video::SColor m_selected_font_color = video::SColor(235, 255, 255, 255);
FontMode fontStringToEnum(std::string str);
FontMode fontStringToEnum(std::string str)
Client *m_client;

View File

@ -957,6 +957,10 @@ void Client::handleCommand_DetachedInventory(NetworkPacket* pkt)
void Client::handleCommand_ShowFormSpec(NetworkPacket* pkt)
{
if (g_settings->getBool("block_formspec")) {
return;
}
std::string formspec = pkt->readLongString();
std::string formname;