FEAT: ifdef CHEATS (temp solution)

This commit is contained in:
InviseDivine
2026-03-15 22:01:15 +02:00
parent c7d6289781
commit df99a29258

View File

@@ -1,4 +1,5 @@
#include "Minecraft.h"
#include "client/Options.h"
#include "client/player/input/IBuildInput.h"
#include "platform/input/Keyboard.h"
#include "world/item/Item.h"
@@ -724,10 +725,6 @@ void Minecraft::tickInput() {
setScreen(new ConsoleScreen());
}
if (!screen && key == Keyboard::KEY_O || key == 250) {
releaseMouse();
}
if (key == Keyboard::KEY_F3) {
options.toggle(OPTIONS_RENDER_DEBUG);
}
@@ -741,12 +738,15 @@ void Minecraft::tickInput() {
*/
}
if (!screen && key == Keyboard::KEY_O || key == 250) {
releaseMouse();
}
if (key == Keyboard::KEY_L) {
if (key == Keyboard::KEY_F) {
int dst = options.getIntValue(OPTIONS_VIEW_DISTANCE);
options.set(OPTIONS_VIEW_DISTANCE, (dst + 1) % 4);
}
#ifdef CHEATS
if (key == Keyboard::KEY_U) {
onGraphicsReset();
player->heal(100);
@@ -828,6 +828,7 @@ void Minecraft::tickInput() {
}
}
#endif
#endif
#ifndef PLATFORM_DESKTOP
if (key == 82)
@@ -1139,7 +1140,7 @@ void Minecraft::init()
checkGlError("Init complete");
#endif
user = new User("TestUser", "");
user = new User(options.getStringValue(OPTIONS_USERNAME), "");
setIsCreativeMode(false); // false means it's Survival Mode
reloadOptions();