Faucet Mod SDK 1.0.0
Modding API for Minecraft Legacy Console Edition
Loading...
Searching...
No Matches
Minecraft Class Reference

The main Minecraft client class. One instance per process. More...

#include <SDK.h>

Collaboration diagram for Minecraft:

Public Member Functions

void pauseGame ()
 Pause the game (shows pause menu).
void stop ()
 Stop the client (exit to main menu).
bool isClientSide ()
 True if this is a client-side (not dedicated server) instance.
shared_ptr< MultiplayerLocalPlayer > getLocalPlayer (int idx=0)
 Get the local player at a splitscreen index.
void setScreen (class Screen *screen)
 Set the active screen (UI overlay). Pass nullptr to close the current screen.
OptionsgetOptions ()
 Get the current game options.
bool handleClientSideCommand (const wstring &chatMessage)
 Handle an in-game console/chat command from the client side.
void connectTo (const wstring &server, int port)
 Connect to a remote server.

Static Public Member Functions

static MinecraftGetInstance ()
 Returns the global Minecraft client instance.

Public Attributes

int width
 Width of the render viewport in pixels.
int height
 Height of the render viewport in pixels.
volatile bool pause
 Whether the game is paused.
volatile bool running
 Whether the main loop is running.
wstring fpsString
 Current FPS string (for display).
MultiPlayerGameMode * gameMode
 The active game mode.
MultiPlayerLevel * level
 The active client-side level (Overworld).
Optionsoptions
 The client-side Options object.

Detailed Description

The main Minecraft client class. One instance per process.

Obtain via SDK::GetClient() or Minecraft::GetInstance().

Definition at line 307 of file SDK.h.

Member Function Documentation

◆ getLocalPlayer()

shared_ptr< MultiplayerLocalPlayer > Minecraft::getLocalPlayer ( int idx = 0)

Get the local player at a splitscreen index.

Parameters
idxSplitscreen slot (0–3).

◆ setScreen()

void Minecraft::setScreen ( class Screen * screen)

Set the active screen (UI overlay). Pass nullptr to close the current screen.

Parameters
screenNew screen to display.

The documentation for this class was generated from the following file: