Minecraft LCE’s Best Modloader!
Find a file
SillyProotSoda 5cf6901918
Merge pull request #4 from Back-Slash-N/main
fix: make BroadcastMessage actually send a message to all players
2026-03-22 07:51:15 +11:00
cmake jhkzdjhrisdk 2026-03-09 16:37:23 +11:00
Minecraft.Client fix: make BroadcastMessage actually send a message to all players 2026-03-21 16:11:31 -04:00
Minecraft.World why 2026-03-11 16:01:41 +11:00
x64 stuff 2026-03-13 14:55:05 +11:00
.gitignore stuff 2026-03-13 14:55:05 +11:00
CMakeLists.txt jhkzdjhrisdk 2026-03-09 16:37:23 +11:00
COMPILE.md jhkzdjhrisdk 2026-03-09 16:37:23 +11:00
MinecraftConsoles.sdf jhkzdjhrisdk 2026-03-09 16:37:23 +11:00
MinecraftConsoles.sln jhkzdjhrisdk 2026-03-09 16:37:23 +11:00
MinecraftConsoles.v11.suo jhkzdjhrisdk 2026-03-09 16:37:23 +11:00
README.md Update library references in README.md 2026-03-10 15:31:29 +11:00

Faucet

A mod loader for Minecraft: Legacy Console Edition

Faucet lets you load custom DLL mods into Minecraft Legacy Console Edition using a custom fork of the game. Mods are written in C++ using the FaucetSDK and placed in the game's mods\ folder.


Requirements

  • Faucet (custom LCE fork) — the modified game executable required to run mods
  • FaucetSDK — headers, lib, and example mod for building your own mods
  • Visual Studio 2022 with the Desktop development with C++ workload
  • Windows x64

Installation

  1. Download and set up the Faucet fork from the link above.
  2. Place any mod .dll files into the mods\ folder in your game directory.
  3. Launch the game. Mods are loaded automatically at startup and logged to mods\modloader.log.

Creating a Mod

Project Setup

  1. In Visual Studio 2022, create a new Dynamic-Link Library (DLL) project targeting x64.
  2. Download the FaucetSDK and copy these files into your project folder:
    • IMod.h
    • SDK.h
    • ModExport.h
    • Faucet.lib
  3. In your project properties:
    • C/C++ → Additional Include Directories: add $(ProjectDir)
    • Linker → Input → Additional Dependencies: add Faucet.lib
    • Linker → General → Additional Library Directories: add $(ProjectDir)
  4. Remove dllmain.cpp from the project (right-click → Remove in Solution Explorer).

Mod Structure

Every mod must implement the IMod interface and export a CreateMod() function:

#include "IMod.h"
#include "SDK.h"

class MyMod final : public IMod {
public:
    const ModInfo* GetInfo() const override {
        static const ModInfo info{
            "com.yourname.mymod",   // Unique mod ID
            "My Mod",               // Display name
            "YourName",             // Author
            "Description here.",    // Description
            { 1, 0, 0 }             // Version
        };
        return &info;
    }

    bool OnLoad()     override { SDK::Log(L"MyMod: loaded");  return true; }
    bool OnInit()     override { SDK::Log(L"MyMod: init");    return true; }
    bool OnUpdate(float dt) override { return true; }
    void OnShutdown() override { SDK::Log(L"MyMod: shutdown"); }
};

extern "C" __declspec(dllexport) IMod* CreateMod() {
    return new MyMod();
}

Build the project and copy the output .dll into your mods\ folder.


SDK Reference

Include SDK.h in your mod to access all game systems.

Logging

SDK::Log(L"Hello from my mod!");
SDK::LogWarn(L"Something seems off.");
SDK::LogError(L"Something went wrong.");

All output is written to mods\modloader.log.

Getting Game Objects

Minecraft*       client = SDK::GetClient();
MinecraftServer* server = SDK::GetServer();
ServerLevel*     level  = SDK::GetServerLevel(0);  // 0=Overworld, -1=Nether, 1=End
PlayerList*      players = SDK::GetPlayerList();
MultiplayerLocalPlayer* localPlayer = SDK::GetLocalPlayer();

Player

auto* player = SDK::GetLocalPlayer();
if (player) {
    float hp = player->getHealth();     // 0.020.0
    player->setHealth(20.0f);           // Full heal
    player->setFlying(true);
    wstring name = player->getName();
}

Server Players

PlayerList* list = SDK::GetPlayerList();
if (list) {
    for (auto& sp : list->players)
        sp->sendMessage(L"Hello!");

    auto steve = list->getPlayer(L"Steve");
    if (steve) steve->disconnect();
}

Messaging

SDK::BroadcastMessage(L"Server restarting soon!");
SDK::SendMessageToPlayer(L"Steve", L"You've been warned.");

Server Control

SDK::ExecuteCommand(L"time set day");
SDK::SetTimeOfDay(6000);   // 0=dawn, 6000=noon, 12000=dusk, 18000=midnight
SDK::SaveAll();
SDK::SetPvpAllowed(false);
SDK::SetFlightAllowed(true);

World / Level

ServerLevel* level = SDK::GetServerLevel(0);
if (level) {
    level->explode(nullptr, 0, 64, 0, 4.0f, false, true);
    level->sendParticles(L"flame", x, y, z, 10);
    level->save(true, nullptr);
}

Notes

  • The mod loader calls OnShutdown each time a world unloads, not only on game exit. Design your mod accordingly if you need persistent state across world loads.
  • Logs are written to mods\modloader.log — check here first if your mod isn't behaving as expected.
  • SDK::GetLocalPlayer() returns nullptr when no world is loaded. Always null-check before use.